Commit 954206ab authored by zhangfeng's avatar zhangfeng

积分规则启用校验

parent 77525aef
...@@ -344,6 +344,10 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score ...@@ -344,6 +344,10 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
throw exception(SCORE_RULE_UNIQUE_CHECK_ERROR); throw exception(SCORE_RULE_UNIQUE_CHECK_ERROR);
} }
} }
// 如果结束时间比当前时间早,不允许启用
if (scoreRuleDO.getEndTime() != null && scoreRuleDO.getEndTime().before(new Date())) {
throw exception(SCORE_RULE_TIME_ERROR);
}
upScoreRuleDO.setStatus(scoreRuleStatusReqVO.getStatus()); upScoreRuleDO.setStatus(scoreRuleStatusReqVO.getStatus());
} else { } else {
throw exception(SCORE_RULE_STATUS_ERROR); 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