|
@@ -181,7 +181,7 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{ |
|
@@ -181,7 +181,7 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{ |
181
|
if (!couponTypeEnum.isPresent()){
|
181
|
if (!couponTypeEnum.isPresent()){
|
182
|
throw new ServiceException(400, "错误:不合法的优惠券类型");
|
182
|
throw new ServiceException(400, "错误:不合法的优惠券类型");
|
183
|
}
|
183
|
}
|
184
|
-// parseSkupForbidType(req);
|
184
|
+ //parseSkupForbidType(req);
|
185
|
req.setSkupForbidType(SKUP_FORBID_TYPE_NONE);
|
185
|
req.setSkupForbidType(SKUP_FORBID_TYPE_NONE);
|
186
|
parseSkupAllowType(req);
|
186
|
parseSkupAllowType(req);
|
187
|
|
187
|
|
|
@@ -233,6 +233,12 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{ |
|
@@ -233,6 +233,12 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{ |
233
|
// 优惠券说明
|
233
|
// 优惠券说明
|
234
|
couponSaveUpdateReq.setRemark(req.getRemark());
|
234
|
couponSaveUpdateReq.setRemark(req.getRemark());
|
235
|
|
235
|
|
|
|
236
|
+ //结束时间
|
|
|
237
|
+ Integer endTime;
|
|
|
238
|
+ if (Objects.nonNull(endTime=req.getEndTime())){
|
|
|
239
|
+ couponSaveUpdateReq.setEndTime(endTime);
|
|
|
240
|
+ }
|
|
|
241
|
+
|
236
|
LOGGER.info("has coupon send, saveOrUpdateCoupon#update,req is {}",req);
|
242
|
LOGGER.info("has coupon send, saveOrUpdateCoupon#update,req is {}",req);
|
237
|
couponMapper.updateByCouponSaveUpdateReq(couponSaveUpdateReq);
|
243
|
couponMapper.updateByCouponSaveUpdateReq(couponSaveUpdateReq);
|
238
|
}else{
|
244
|
}else{
|
|
@@ -406,6 +412,11 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{ |
|
@@ -406,6 +412,11 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{ |
406
|
return new PageResponseBO<>(total, result, req.getRows(), req.getPage());
|
412
|
return new PageResponseBO<>(total, result, req.getRows(), req.getPage());
|
407
|
}
|
413
|
}
|
408
|
|
414
|
|
|
|
415
|
+ /**
|
|
|
416
|
+ * 作废用户券
|
|
|
417
|
+ * @param request
|
|
|
418
|
+ * @return
|
|
|
419
|
+ */
|
409
|
@Override
|
420
|
@Override
|
410
|
public ApiResponse invalidateUserCoupon(UserCouponBaseRequest request) {
|
421
|
public ApiResponse invalidateUserCoupon(UserCouponBaseRequest request) {
|
411
|
if (request == null || StringUtils.isEmpty(request.getCouponCode()) || Objects.isNull(request.getUid())) {
|
422
|
if (request == null || StringUtils.isEmpty(request.getCouponCode()) || Objects.isNull(request.getUid())) {
|