Commit 69699f9d authored by zhangfeng's avatar zhangfeng

bugfix-476: 积分规则唯一性校验修改

parent 30b6cd7e
...@@ -134,13 +134,14 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score ...@@ -134,13 +134,14 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
scoreRuleDOLambdaQuery.ne(ScoreRuleDO::getId, delayId); scoreRuleDOLambdaQuery.ne(ScoreRuleDO::getId, delayId);
} }
List<ScoreRuleDO> scoreRuleDOS = scoreRuleMapper.selectList(scoreRuleDOLambdaQuery); List<ScoreRuleDO> scoreRuleDOS = scoreRuleMapper.selectList(scoreRuleDOLambdaQuery);
if (scoreRuleDOS == null || scoreRuleDOS.isEmpty()) {
return;
}
if (transportType != null) { if (transportType != null) {
if (scoreRuleDOS != null && !scoreRuleDOS.isEmpty()) { for (ScoreRuleDO scoreRuleDO : scoreRuleDOS) {
for (ScoreRuleDO scoreRuleDO : scoreRuleDOS) { ScoreRuleOrderVExtraVO bean = JSONUtil.toBean(scoreRuleDO.getExtra(), ScoreRuleOrderVExtraVO.class);
ScoreRuleOrderVExtraVO bean = JSONUtil.toBean(scoreRuleDO.getExtra(), ScoreRuleOrderVExtraVO.class); if (Objects.equals(bean.getTransportType(), transportType) && verifyTimeOverlap(newScoreRuleStart, newScoreRuleEnd, scoreRuleDO)) {
if (Objects.equals(bean.getTransportType(), transportType) && verifyTimeOverlap(newScoreRuleStart, newScoreRuleEnd, scoreRuleDO)) { throw exception(SCORE_RULE_UNIQUE_CHECK_ERROR);
throw exception(SCORE_RULE_UNIQUE_CHECK_ERROR);
}
} }
} }
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment