package cn.cecep.talroad.service.impl.effective;

import cn.cecep.talroad.domain.analysis.PcRaProblemType;
import cn.cecep.talroad.mapper.analysis.PcRaProblemTypeMapper;
import cn.cecep.talroad.service.effective.ForecastAccuracyService;
import cn.cecep.talroad.vo.effective.ForecastAccuracyInfo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class ForecastAccuracyServiceImpl implements ForecastAccuracyService {

    @Autowired
    private PcRaProblemTypeMapper pcRaProblemTypeMapper;
    @Override
    public IPage<ForecastAccuracyInfo> getList(String problemType, Date startTime, Date endTime,Integer pageNum,Integer pageSize) {
        Page<ForecastAccuracyInfo> page=new Page<>(pageNum,pageSize);
        return   pcRaProblemTypeMapper.getAIProblemList(page, problemType,startTime,endTime);
    }

    @Override
    public List<PcRaProblemType> getProblemListService() {
        return  pcRaProblemTypeMapper.getProblemList("A");
    }
}
