| | |
| | | import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationMapper |
| | | import cn.flightfeather.supervision.domain.ds1.mapper.ItemevaluationMapper |
| | | import org.springframework.stereotype.Component |
| | | import org.springframework.transaction.annotation.Transactional |
| | | import tk.mybatis.mapper.entity.Example |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 将评分记录输出至数据库 |
| | | */ |
| | | @Transactional |
| | | fun toDbEvaluation(evaluationScene: AopDataSource.EvaluationScene, p: Pair<Evaluation, List<Itemevaluation>>) { |
| | | //去除已有记录 |
| | | evaluationMapper.deleteByExample(Example(Evaluation::class.java).apply { |
| | |
| | | /** |
| | | * 将评分记录更新至数据库 |
| | | */ |
| | | @Transactional |
| | | fun updateDbEvaluation(evaluationScene: AopDataSource.EvaluationScene, p: Pair<Evaluation, List<Itemevaluation>>) { |
| | | evaluationMapper.updateByPrimaryKey(p.first) |
| | | p.second.forEach { il -> itemevaluationMapper.updateByPrimaryKey(il) } |