package cn.qg.qaplatform.zdata.service.risk.impl;

import cn.qg.qaplatform.config.SwitchDataSource;
import cn.qg.qaplatform.zdata.mapper.RuleEngineMapper;
import cn.qg.qaplatform.zdata.service.risk.RuleEngineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 风控相关服务
 */
@Service
public class RuleEngineServiceImpl implements RuleEngineService {

    @Autowired
    RuleEngineMapper ruleEngineMapper;

    /**
     * 添加授信黑名单
     * @param uuid uuid
     * @return 成功与否
     */
    @Override
    public boolean addBlackList(String uuid) {
        SwitchDataSource.dataSourceSwitch("fe", "workflow");
        int insertResult = ruleEngineMapper.addBlackList(uuid);
        return insertResult >= 1;
    }
}
