From 08cb90dd8bcdb5b36017f5fc4c4a62c9ca9b0547 Mon Sep 17 00:00:00 2001 From: Burce Date: Mon, 16 Sep 2019 21:39:34 +0800 Subject: [PATCH] =?UTF-8?q?[=E8=B0=83=E6=95=B4]=E6=B3=A8=E5=88=B8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=94=A8=E6=88=B7=E6=8E=88=E6=9D=83=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/controller/WxCouponSendController.java | 4 ++-- .../com/iformall/service/impl/WxCouponSendServiceImpl.java | 7 +++++-- .../iformall/service/impl/WxCreditHistoryServiceImpl.java | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/mallinkBApi/src/main/java/com/iformall/controller/WxCouponSendController.java b/mallinkBApi/src/main/java/com/iformall/controller/WxCouponSendController.java index 21bc55f29..19cd85631 100644 --- a/mallinkBApi/src/main/java/com/iformall/controller/WxCouponSendController.java +++ b/mallinkBApi/src/main/java/com/iformall/controller/WxCouponSendController.java @@ -100,10 +100,10 @@ public class WxCouponSendController extends BaseController { try { wxCouponSendService.handSel(wxCouponSend, cUserId); } catch (MallinkException e) { - logger.error("注异常: " + e.getMessage()); + logger.error("注券异常: " + e.getMessage()); return new ResultData(e.getErrorCode(), e.getMessage()); } catch (Exception e) { - logger.error("注异常: " + e.getMessage()); + logger.error("注券异常: " + e.getMessage()); return new ResultData(ErrorCode.COUPON_HANDSEL_VERIFY, e.getMessage()); } return new ResultData(); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java index 9bca2362d..12b5bef51 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java @@ -605,9 +605,12 @@ public class WxCouponSendServiceImpl implements WxCouponSendService { public void handSel(WxCouponSend wxCouponSend, Object cUserId) { WxCUser cu = wxCUserMapper.selectByPrimaryKey(cUserId); if (Objects.isNull(cu)) { - throw new MallinkException(ErrorCode.SYS_PARAMETER_NOT_NULL); + throw new MallinkException(ErrorCode.USER_IS_EMPTY); + } + + if(StringUtils.isEmpty(cu.getPhone())) { + throw new MallinkException(ErrorCode.USER_NOT_AUTH_PHONE); } - // 1002 ,11012,2020 ,2000,2022,2021,3005,3999,1050,3000 WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectByPrimaryKey(cu.getId()); if (Objects.isNull(wxCUserBasicInfo)) { diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java index 0c3810dbc..f02f8fbd7 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java @@ -194,6 +194,7 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { return wxCreditHistoryMapper.selectByPrimaryKey(id); } + @Override public void check(Long cUserId) { WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectByPrimaryKey(cUserId); if (wxCUserBasicInfo == null) {