package com.hzs.system.config.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzs.common.domain.system.config.BdAreaCurrencyDetail;
import com.hzs.common.domain.system.config.ext.BdAreaCurrencyDetailExt;
import com.hzs.system.config.mapper.BdAreaCurrencyDetailMapper;
import com.hzs.system.config.service.IBdAreaCurrencyDetailService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 消费配置详情表 服务实现类
 *
 * @author zhangjing
 * @since 2022-08-26
 */
@Service
public class BdAreaCurrencyDetailServiceImpl extends ServiceImpl<BdAreaCurrencyDetailMapper, BdAreaCurrencyDetail> implements IBdAreaCurrencyDetailService {

    /**
     * 获取可使用最扣除大比例
     *
     * @param areaCurrencyDetail
     * @return
     */
    @Override
    public BdAreaCurrencyDetail getSumDeductRatio(BdAreaCurrencyDetail areaCurrencyDetail) {
        return baseMapper.getSumDeductRatio(areaCurrencyDetail);
    }

    /**
     * 校验扣款顺序是否唯一
     *
     * @param areaCurrencyDetail
     * @return
     */
    @Override
    public BdAreaCurrencyDetail checkDeductSort(BdAreaCurrencyDetail areaCurrencyDetail) {
        return baseMapper.checkDeductSort(areaCurrencyDetail);
    }

    /**
     * @description: 获取消费配置详情列表
     * @author: zhang jing
     * @date: 2022/8/30 17:51
     * @param: [areaCurrencyDetailVo]
     * @return: java.util.List<com.hzs.common.domain.system.config.vo.BdAreaCurrencyDetailVo>
     **/
    @Override
    public List<BdAreaCurrencyDetailExt> getAreaCurrencyDetailList(BdAreaCurrencyDetailExt areaCurrencyDetailExt) {
        return baseMapper.getAreaCurrencyDetailList(areaCurrencyDetailExt);
    }

}
