Commit 60de8906 authored by zhangfeng's avatar zhangfeng

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

bugfix-484: 积分规则启用校验修改

See merge request !23
parents 6551f966 55740aeb
...@@ -386,11 +386,13 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score ...@@ -386,11 +386,13 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
throw exception(SCORE_RULE_TIME_ERROR); throw exception(SCORE_RULE_TIME_ERROR);
} }
//如果是启用,校验同一个规则下,有效期内有没有重复的规则设置,分享不校验 //如果是启用,校验同一个规则下,有效期内有没有重复的规则设置,分享不校验
if (scoreRuleDO.getType() == ScoreRuleTypeEnum.ORDER_V.getValue()) { if (scoreRuleDO.getType() != ScoreRuleTypeEnum.SHARE.getValue()) {
ScoreRuleOrderVExtraVO extraOrderV = JSONUtil.toBean(scoreRuleDO.getExtra(), ScoreRuleOrderVExtraVO.class); if (scoreRuleDO.getType() == ScoreRuleTypeEnum.ORDER_V.getValue()) {
scoreRuleUniqueCheck(scoreRuleDO.getType(), extraOrderV.getTransportType(), scoreRuleDO.getStartTime(), scoreRuleDO.getEndTime(), null); ScoreRuleOrderVExtraVO extraOrderV = JSONUtil.toBean(scoreRuleDO.getExtra(), ScoreRuleOrderVExtraVO.class);
} else { scoreRuleUniqueCheck(scoreRuleDO.getType(), extraOrderV.getTransportType(), scoreRuleDO.getStartTime(), scoreRuleDO.getEndTime(), null);
scoreRuleUniqueCheck(scoreRuleDO.getType(), null, scoreRuleDO.getStartTime(), scoreRuleDO.getEndTime(), null); } else {
scoreRuleUniqueCheck(scoreRuleDO.getType(), null, scoreRuleDO.getStartTime(), scoreRuleDO.getEndTime(), null);
}
} }
upScoreRuleDO.setStatus(scoreRuleStatusReqVO.getStatus()); upScoreRuleDO.setStatus(scoreRuleStatusReqVO.getStatus());
} 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