package com.hzs.system.config.provider;

import cn.hutool.core.bean.BeanUtil;
import com.hzs.common.core.domain.R;
import com.hzs.common.domain.system.config.BdTradeWhiteConfig;
import com.hzs.system.config.ITradeConfigServiceApi;
import com.hzs.system.config.dto.TradeConfigDTO;
import com.hzs.system.config.service.IBdTradeConfigService;
import com.hzs.system.config.service.IBdTradeWhiteConfigService;
import com.hzs.system.config.vo.BdTradeWhiteConfigVO;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService
public class ITradeConfigServiceProvider implements ITradeConfigServiceApi {

    @Autowired
    private IBdTradeWhiteConfigService bdTradeWhiteConfigService;

    @Override
    public R<BdTradeWhiteConfig> selectTradeWhiteConfigByCondition(TradeConfigDTO tradeConfigDTO) {
        return R.ok(bdTradeWhiteConfigService.selectTradeWhiteConfigByCondition(BeanUtil.copyProperties(tradeConfigDTO, BdTradeWhiteConfigVO.class)));
    }
}
