package com.copy.trade.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.copy.trade.entity.po.RiskControl;
import com.copy.trade.dao.CustomerMapper;
import com.copy.trade.dao.RiskControlMapper;
import com.copy.trade.service.IRiskControlService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 跟单风险控制表 服务实现类
 * </p>
 *
 * @author wz
 * @since 2022-11-08
 */
@Service
public class RiskControlServiceImpl extends ServiceImpl<RiskControlMapper, RiskControl> implements IRiskControlService {

    @Override
    public RiskControl getByFollowId(Long followId) {
        QueryWrapper<RiskControl> riskControlQueryWrapper = new QueryWrapper<>();
        riskControlQueryWrapper.eq("follow_id",followId);
        return getOne(riskControlQueryWrapper);
    }

	@Override
	public Boolean updateRiskControlById(RiskControl riskControl) {
		((RiskControlMapper) baseMapper).updateRiskControlById(riskControl);
		return true;
	}
    
}
