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

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzs.common.core.utils.DateUtils;
import com.hzs.common.domain.system.config.BdWithdrawalProcess;
import com.hzs.system.config.mapper.BdWithdrawalProcessMapper;
import com.hzs.system.config.service.IBdWithdrawalProcessService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 提现手续费配置 服务实现类
 * </p>
 *
 * @author zhangjing
 * @since 2022-11-02
 */
@Service
public class BdWithdrawalProcessServiceImpl extends ServiceImpl<BdWithdrawalProcessMapper, BdWithdrawalProcess> implements IBdWithdrawalProcessService {

    /**
     * @description: 根据国家查询提现手续费配置
     * @author: zhang jing
     * @date: 2022/11/2 17:16
     * @param: [pkCountry]
     * @return: java.util.List<com.hzs.common.domain.system.config.BdWithdrawalProcess>
     **/
    @Override
    public BdWithdrawalProcess queryBdWithdrawalProcess(Integer pkCountry) {
        QueryWrapper<BdWithdrawalProcess> queryWrapper=new QueryWrapper();
        queryWrapper.eq("PK_COUNTRY",pkCountry);
        queryWrapper.le("EFFECTIVE_DATE", DateUtils.currentDateTime());
        return baseMapper.selectOne(queryWrapper);
    }
}
