package cn.iocoder.yudao.module.crm.service.crmanalysis;

import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.ContractVO;
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.TimeQueryVO;
import cn.iocoder.yudao.module.crm.dal.mysql.crmcontract.CrmContractMapper;
import cn.iocoder.yudao.module.crm.dal.mysql.crmcontractreceivables.CrmContractReceivablesMapper;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;
import java.util.List;

/**
 * 排行分析 Service 实现类
 *
 * @author yshop
 */
@Service
@Validated
public class RankServiceImpl implements RankService {

    @Resource
    private CrmContractMapper contractMapper;
    @Resource
    private CrmContractReceivablesMapper contractReceivablesMapper;


    @Override
    public  List<ContractVO> getContractRank(TimeQueryVO vo) {
        return contractMapper.selectContractTop(vo);
    }

    @Override
    public List<ContractVO> getReceivablesRank(TimeQueryVO vo) {
        return contractReceivablesMapper.selectReceivablesTop(vo);
    }
}
