...
|
...
|
@@ -117,8 +117,8 @@ public class RedpacketConfigServiceImpl implements IRedpacketConfigService { |
|
|
if (redPacketRuleBo.getShowStartTime() != null && redPacketRuleBo.getShowEndTime() != null
|
|
|
&& !Objects.isNull(redpacketConfig.getStartTime()) && !Objects.isNull(redpacketConfig.getEndTime())){
|
|
|
|
|
|
if (Integer.compare(redPacketRuleBo.getShowStartTime(), redpacketConfig.getStartTime())>0
|
|
|
|| Integer.compare(redPacketRuleBo.getShowEndTime(), redpacketConfig.getEndTime())<0){
|
|
|
if (Integer.compare(redPacketRuleBo.getShowStartTime(), redpacketConfig.getStartTime())< 0
|
|
|
|| Integer.compare(redPacketRuleBo.getShowEndTime(), redpacketConfig.getEndTime())>0){
|
|
|
logger.warn("addRedPacketRule token time [start {}] [end {}] < show time [start {}] [end {}] error.",
|
|
|
redpacketConfig.getStartTime(), redpacketConfig.getEndTime(), redPacketRuleBo.getShowStartTime(), redPacketRuleBo.getShowEndTime());
|
|
|
throw new ServiceException(502, "Token的有效期必须>领取时间");
|
...
|
...
|
@@ -138,8 +138,8 @@ public class RedpacketConfigServiceImpl implements IRedpacketConfigService { |
|
|
redpacketRuleConfigMapper.insertSelective(redpacketRuleConfig);
|
|
|
|
|
|
}else{
|
|
|
|
|
|
BeanUtils.copyProperties(redPacketRuleBo, redpacketRuleConfig);
|
|
|
|
|
|
int now = DateUtils.getCurrentTimeSeconds();
|
|
|
redpacketRuleConfig.setUpdateTime(now);
|
|
|
redpacketRuleConfigMapper.updateByPrimaryKeySelective(redpacketRuleConfig);
|
...
|
...
|
|