|
|
|
@@ -95,8 +95,8 @@ public class TtCouponServiceImpl implements TtCouponService { |
|
|
|
record.setStatus(EnumTtCouponStatus.TTCOUPON_STATUS_EXAMINE.getCode()); |
|
|
|
} |
|
|
|
|
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
if (record.getId() == null) { |
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
record.setId(idWorker.nextId()); |
|
|
|
record.setCreateDate(new Date()); |
|
|
|
record.setUpdateDate(new Date()); |
|
|
|
@@ -114,10 +114,18 @@ public class TtCouponServiceImpl implements TtCouponService { |
|
|
|
couponD.setType(EnumTtCouponType.COUPON_MORE.getCode()); |
|
|
|
ttCouponMapper.delete(new QueryWrapper<TtCoupon>(couponD)); |
|
|
|
for (TtCoupon ttc:record.getColumnCoupons()) { |
|
|
|
if(ttc.getId() == null){ |
|
|
|
ttc.setId(idWorker.nextId()); |
|
|
|
ttc.setCreateDate(new Date()); |
|
|
|
} |
|
|
|
ttc.updateTenantInfo(record); |
|
|
|
ttc.setType(EnumTtCouponType.COUPON_MORE.getCode()); |
|
|
|
ttc.setColumnId(record.getId()); |
|
|
|
this.saveOrUpdate(ttc); |
|
|
|
ttc.setSalePrice(0); |
|
|
|
ttc.setIsPayment(EnumYesOrNo.NO.getCode()); |
|
|
|
ttc.setStatus(EnumTtCouponStatus.TTCOUPON_STATUS_DRAFT.getCode()); |
|
|
|
ttc.setUpdateDate(new Date()); |
|
|
|
ttCouponMapper.insert(ttc); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(); |
|
|
|
|