From d2b5cdb98bbe6b1dbd5417676d19ff04d6ff0553 Mon Sep 17 00:00:00 2001 From: xhxu Date: Sun, 10 Oct 2021 15:05:00 +0800 Subject: [PATCH] update gift --- .../controller/WxCouponController.java | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxCouponController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxCouponController.java index a88626ce3..c341d23d7 100644 --- a/mallinkCApi/src/main/java/com/iformall/controller/WxCouponController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxCouponController.java @@ -223,13 +223,16 @@ public class WxCouponController extends BaseController { return null; } - WxCoupon c = couponService.getById(cc.getCouponId(),cc.getTenantId()); - if (c == null) { - c = new WxCoupon(); +// WxCoupon c = couponService.getById(cc.getCouponId(),cc.getTenantId()); +// if (c == null) { +// c = new WxCoupon(); +// } + WxCouponCVo wxcv = couponService.getVoById(cc.getCouponId(),cc.getTenantId()); + if(wxcv == null){ + return null; } - - WxCouponCVo wxcv = new WxCouponCVo(); - BeanUtils.copyProperties(wxcv, c); +// WxCouponCVo wxcv = new WxCouponCVo(); +// BeanUtils.copyProperties(wxcv, c); wxcv.setId(cc.getId()); wxcv.setCouponId(cc.getCouponId()); wxcv.setTargetAd(cc.getTargetAd()); @@ -237,10 +240,10 @@ public class WxCouponController extends BaseController { wxcv.setEndTime(cc.getEndTime()); wxcv.setQrCode(cc.getQrCode()); - List chantlist = merchantService.findMerchantVoList(cc.getCouponId(),cc.getTenantId()); - if (null != chantlist && chantlist.size()>0) { - wxcv.setMerchantVoList(chantlist); - } +// List chantlist = merchantService.findMerchantVoList(cc.getCouponId(),cc.getTenantId()); +// if (null != chantlist && chantlist.size()>0) { +// wxcv.setMerchantVoList(chantlist); +// } return wxcv; }