Commit 55740aeb authored by zhangfeng's avatar zhangfeng

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

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