From 4a0e2cb64947be737efe8a1c8633186272450816 Mon Sep 17 00:00:00 2001 From: masterspirit Date: Tue, 28 Aug 2018 00:46:10 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8D=A1=E5=88=B8=E6=8A=95=E6=94=BE][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9]:=E6=A0=87=E8=AE=B0=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/simple/service/impl/WxCouponChannelServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/simple/service/impl/WxCouponChannelServiceImpl.java b/mallinkService/src/main/java/com/simple/service/impl/WxCouponChannelServiceImpl.java index 51174ffd0..10533f3b3 100644 --- a/mallinkService/src/main/java/com/simple/service/impl/WxCouponChannelServiceImpl.java +++ b/mallinkService/src/main/java/com/simple/service/impl/WxCouponChannelServiceImpl.java @@ -108,12 +108,16 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { } WxCoupon wxCoupon = wxCouponService.getById(couponid); + if(wxCoupon==null){ + logger.debug(couponid+"没有查到对应的券信息"); + return false; + } if(wxCoupon.getStatus()!=0) { logger.debug(wxCoupon.getId()+"状态不对"); return false; } - if(wxCoupon.getValidEndDate().before(endTime)){ + if(wxCoupon.getValidEndDate()!=null&&wxCoupon.getValidEndDate().before(endTime)){ logger.debug(wxCoupon.getId()+"发放时间不能晚于使用时间"); return false; }