Commit 55740aeb authored by zhangfeng's avatar zhangfeng

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

parent 69699f9d
...@@ -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