Commit 1b0a503b by 吕明尚

修改抽奖赠送优惠券

parent 4911674e
...@@ -529,15 +529,7 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe ...@@ -529,15 +529,7 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
newSConsumerCoupon.setSourceType(SourceTypeEnum.GIVE.getCode()); newSConsumerCoupon.setSourceType(SourceTypeEnum.GIVE.getCode());
newSConsumerCoupon.setPlatformType(sCoupon.getPlatformType()); newSConsumerCoupon.setPlatformType(sCoupon.getPlatformType());
newSConsumerCoupon.setStartDate(sCoupon.getStartDate()); newSConsumerCoupon.setStartDate(sCoupon.getStartDate());
if (ObjectUtils.isEmpty(sCoupon.getExpirationNumber())) {
newSConsumerCoupon.setEndDate(sCoupon.getEndDate());
} else {
if (DateUtils.addDays(new Date(), sCoupon.getExpirationNumber()).getTime() < sCoupon.getEndDate().getTime()) {
newSConsumerCoupon.setEndDate(DateUtils.addDays(new Date(), sCoupon.getExpirationNumber())); newSConsumerCoupon.setEndDate(DateUtils.addDays(new Date(), sCoupon.getExpirationNumber()));
} else {
newSConsumerCoupon.setEndDate(sCoupon.getEndDate());
}
}
newSConsumerCoupon.setRemark(sCoupon.getRemark()); newSConsumerCoupon.setRemark(sCoupon.getRemark());
newSConsumerCoupon.setCreateTime(new Date()); newSConsumerCoupon.setCreateTime(new Date());
int insert = baseMapper.insert(newSConsumerCoupon); int insert = baseMapper.insert(newSConsumerCoupon);
......
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