| | |
| | | import cn.flightfeather.supervision.domain.ds2.entity.OverallEvaluation |
| | | import cn.flightfeather.supervision.domain.ds2.mapper.OverallEvaluationMapper |
| | | import org.springframework.stereotype.Repository |
| | | import tk.mybatis.mapper.entity.Example |
| | | import java.time.LocalDate |
| | | import java.time.ZoneId |
| | | import java.util.* |
| | |
| | | class OverallEvaluationRep(private val overallEvaluationMapper: OverallEvaluationMapper){ |
| | | |
| | | /** |
| | | * 获取最新记录 |
| | | */ |
| | | fun selectLatest(userId: String?): OverallEvaluation? { |
| | | val res = overallEvaluationMapper.selectByExample(Example(OverallEvaluation::class.java).apply { |
| | | createCriteria().andEqualTo("biGuid", userId) |
| | | orderBy("oeUpdateTime").desc() |
| | | }) |
| | | return if (res.isNotEmpty()) res[0] else null |
| | | } |
| | | |
| | | /** |
| | | * 插入一条环信码记录 |
| | | * @param userId |
| | | * @param score |