package cn.flightfeather.supervision.domain.ds1.repository
|
|
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationrule
|
import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationruleMapper
|
import cn.flightfeather.supervision.lightshare.vo.AreaEvaVo
|
import org.springframework.stereotype.Repository
|
import tk.mybatis.mapper.entity.Example
|
|
/**
|
* 评估规则数据库相关操作
|
*/
|
@Repository
|
class EvaluationRuleRep(private val evaluationruleMapper: EvaluationruleMapper) {
|
|
/**
|
* 根据参数查询总规则
|
* @param areaEvaVo 查询参数
|
*/
|
fun findBaseRule(areaEvaVo: AreaEvaVo): List<Evaluationrule?> {
|
return evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply {
|
createCriteria().andEqualTo("tasktypeid", areaEvaVo.taskTypeId)
|
.andEqualTo("scensetypeid", areaEvaVo.scensetypeid)
|
.andEqualTo("provincecode", areaEvaVo.provincecode)
|
.andEqualTo("citycode", areaEvaVo.citycode)
|
.andEqualTo("districtcode", areaEvaVo.districtcode)
|
.andEqualTo("towncode", areaEvaVo.towncode)
|
.andEqualTo("isuse", true)
|
})
|
}
|
}
|