| | |
| | | evaluationsubruleList.forEach { |
| | | if (it.fatherid == id) { |
| | | // 根据规则对应的相关问题id,查找用户在当前时间段内是否有发生该问题,有则扣除相应的分数 |
| | | it.problemlist?.let {pId -> |
| | | problemlistMapper.selectByExample(Example(Problemlist::class.java).apply { |
| | | createCriteria().andEqualTo("sguid", info.sceneId) |
| | | .andEqualTo("ptguid", pId) |
| | | .andGreaterThanOrEqualTo("time", info.sTime) |
| | | .andLessThan("time", info.eTime) |
| | | })?.takeIf { p-> p.isNotEmpty() }?.run { |
| | | val pList = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply { |
| | | createCriteria().andEqualTo("sguid", info.sceneId) |
| | | .andGreaterThanOrEqualTo("time", info.sTime) |
| | | .andLessThan("time", info.eTime) |
| | | }).map { p-> p.ptguid } |
| | | it.problemlist?.split(",")?.forEach {pId -> |
| | | if (pList.contains(pId)) { |
| | | it.extension1 = (0 - (it.maxscore ?: 0)).toString() |
| | | } |
| | | } |