package com.hzs.system.config.provider;

import com.hzs.common.core.domain.R;
import com.hzs.common.domain.system.config.BdAccount;
import com.hzs.common.domain.system.config.BdWithdrawal;
import com.hzs.common.domain.system.config.BdWithdrawalAuto;
import com.hzs.system.config.IAccountServiceApi;
import com.hzs.system.config.IWithdrawalServiceApi;
import com.hzs.system.config.service.IBdAccountService;
import com.hzs.system.config.service.IBdWithdrawalAutoService;
import com.hzs.system.config.service.IBdWithdrawalService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Description: 提现配置的dubbo服务类
 * @Author: zhang jing
 * @Time: 2022/9/9 14:11
 * @Classname: GradeServiceProvider
 * @PackageName: com.hzs.system.config.provider
 */
@DubboService
public class WithdrawalServiceProvider implements IWithdrawalServiceApi {

    @Autowired
    private IBdWithdrawalService withdrawalService;

    /**
     * @description: 根据国家查询提现配置明细列表
     * @author: zhang jing
     * @date: 2022/9/27 15:08
     * @param: [pkCountry]
     * @return: com.hzs.common.core.domain.R<java.util.List < com.hzs.common.domain.system.config.BdWithdrawal>>
     **/
    @Override
    public R<BdWithdrawal> queryWithdrawal(Integer pkCountry,Integer pkAccount) {
        return R.ok(withdrawalService.queryWithdrawal(pkCountry,pkAccount));
    }

    /**
     * @description: 查询所有自动提现的配置
     * @author: zhang jing
     * @date: 2022/11/1 19:43
     * @param: []
     * @return: com.hzs.common.core.domain.R<java.util.List < com.hzs.common.domain.system.config.BdWithdrawal>>
     **/
    @Override
    public R<List<BdWithdrawal>> queryWithdrawalByIsAuto() {
        return R.ok(withdrawalService.queryWithdrawalByIsAuto());
    }
}
