Commit 6551f966 authored by zhangfeng's avatar zhangfeng

Merge branch 'release-feat-zhangfeng' into 'release'

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

See merge request !22
parents ac74974c 69699f9d
......@@ -134,15 +134,16 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
scoreRuleDOLambdaQuery.ne(ScoreRuleDO::getId, delayId);
}
List<ScoreRuleDO> scoreRuleDOS = scoreRuleMapper.selectList(scoreRuleDOLambdaQuery);
if (scoreRuleDOS == null || scoreRuleDOS.isEmpty()) {
return;
}
if (transportType != null) {
if (scoreRuleDOS != null && !scoreRuleDOS.isEmpty()) {
for (ScoreRuleDO scoreRuleDO : scoreRuleDOS) {
ScoreRuleOrderVExtraVO bean = JSONUtil.toBean(scoreRuleDO.getExtra(), ScoreRuleOrderVExtraVO.class);
if (Objects.equals(bean.getTransportType(), transportType) && verifyTimeOverlap(newScoreRuleStart, newScoreRuleEnd, scoreRuleDO)) {
throw exception(SCORE_RULE_UNIQUE_CHECK_ERROR);
}
}
}
} else {
for (ScoreRuleDO scoreRuleDO : scoreRuleDOS) {
if (verifyTimeOverlap(newScoreRuleStart, newScoreRuleEnd, scoreRuleDO)) {
......
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