From 6cf38e9b175d43d4c5c70f002209287f1035f160 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Thu, 14 Mar 2019 10:56:07 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=A0=B8=E9=94=80][=E4=BF=AE=E6=94=B9]:?= =?UTF-8?q?=E6=A0=B8=E9=94=80=E6=A3=80=E6=9F=A5=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/controller/WxCouponOrderController.java | 2 +- .../service/impl/WxCouponOrderServiceImpl.java | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mallinkBApi/src/main/java/com/iformall/controller/WxCouponOrderController.java b/mallinkBApi/src/main/java/com/iformall/controller/WxCouponOrderController.java index f2c7f4bee..e9dc83799 100644 --- a/mallinkBApi/src/main/java/com/iformall/controller/WxCouponOrderController.java +++ b/mallinkBApi/src/main/java/com/iformall/controller/WxCouponOrderController.java @@ -118,7 +118,7 @@ public class WxCouponOrderController extends BaseController { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); } - WxCouponOrderCVo wxCouponOrderCVo = wxCouponOrderService.detailCUserVo(getUser().getId(), couponOrderIdStr); + WxCouponOrderCVo wxCouponOrderCVo = wxCouponOrderService.detailCUserVo(null, couponOrderIdStr); if (wxCouponOrderCVo == null) return new ResultData(ErrorCode.COUPON_ORDER_IS_NULL); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java index 06aa46464..8c420e6fc 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java @@ -204,10 +204,12 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { @Override public WxCouponOrderCVo detailCUserVo(Long cUserId, String couponOrderId) { - WxCUser wxCuser = wxCUserMapper.selectByPrimaryKey(cUserId); - if (wxCuser == null) { - logger.error("用户不存在:" + cUserId); - throw new MallinkException(ErrorCode.USER_IS_EMPTY); + if(cUserId != null) { + WxCUser wxCuser = wxCUserMapper.selectByPrimaryKey(cUserId); + if (wxCuser == null) { + logger.error("用户不存在:" + cUserId); + throw new MallinkException(ErrorCode.USER_IS_EMPTY); + } } WxCouponOrderCVo wxCouponOrderCVo = wxCouponOrderMapper.findDetailOfCUser(Long.valueOf(couponOrderId));