From 9a45032ff8279fd71c4f8b35a4d2d194e8145ee7 Mon Sep 17 00:00:00 2001 From: yuyang Date: Tue, 18 Jan 2022 18:02:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=A7=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E5=85=85=E5=80=BC=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=B5=81=E6=B0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xhpc/user/controller/XhpcCommunityController.java | 2 ++ .../com/xhpc/user/controller/XhpcCustomersController.java | 2 ++ .../xhpc/user/service/impl/XhpcCustomersServiceImpl.java | 7 ++++++- .../src/main/resources/mapper/XhpcCustomersMapper.xml | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/controller/XhpcCommunityController.java b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/controller/XhpcCommunityController.java index 9f16aa45..2d569784 100644 --- a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/controller/XhpcCommunityController.java +++ b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/controller/XhpcCommunityController.java @@ -5,6 +5,7 @@ import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.core.web.page.TableDataInfo; import com.xhpc.common.log.annotation.Log; import com.xhpc.common.log.enums.BusinessType; +import com.xhpc.common.util.UserTypeUtil; import com.xhpc.user.domain.XhpcCommunity; import com.xhpc.user.domain.XhpcCommunityPersonnel; import com.xhpc.user.service.IXhpcCommunityService; @@ -142,6 +143,7 @@ public class XhpcCommunityController extends BaseController { @Log(title = "社区人员-充值", businessType = BusinessType.INSERT) @PostMapping(value = "/addRecharge") public AjaxResult addRecharge(@RequestBody XhpcCommunityPersonnel xhpcCommunityPersonnel) { + xhpcCommunityPersonnel.setRechargeType(UserTypeUtil.RECHARGE_PT); return xhpcCommunityService.addRecharge(xhpcCommunityPersonnel); } diff --git a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/controller/XhpcCustomersController.java b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/controller/XhpcCustomersController.java index b36c2cb4..dbb3e958 100644 --- a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/controller/XhpcCustomersController.java +++ b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/controller/XhpcCustomersController.java @@ -5,6 +5,7 @@ import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.core.web.page.TableDataInfo; import com.xhpc.common.log.annotation.Log; import com.xhpc.common.log.enums.BusinessType; +import com.xhpc.common.util.UserTypeUtil; import com.xhpc.user.domain.XhpcCustomers; import com.xhpc.user.domain.XhpcCustomersPersonnel; import com.xhpc.user.service.IXhpcCustomersService; @@ -129,6 +130,7 @@ public class XhpcCustomersController extends BaseController { @Log(title = "大客户人员-充值", businessType = BusinessType.INSERT) @PostMapping(value = "/addRecharge") public AjaxResult addRecharge(@RequestBody XhpcCustomersPersonnel xhpcCustomersPersonnel) { + xhpcCustomersPersonnel.setRechargeType(UserTypeUtil.RECHARGE_PT); return xhpcCustomersService.addRecharge(xhpcCustomersPersonnel); } diff --git a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/service/impl/XhpcCustomersServiceImpl.java b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/service/impl/XhpcCustomersServiceImpl.java index d5c71d37..7819d836 100644 --- a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/service/impl/XhpcCustomersServiceImpl.java +++ b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/service/impl/XhpcCustomersServiceImpl.java @@ -246,6 +246,11 @@ public class XhpcCustomersServiceImpl extends BaseService implements IXhpcCustom return AjaxResult.error("充值金额大于0"); } + /** + * 社区人员状态改变 + * + * @param xhpcCustomersPersonnel + */ @Override public void updateCustomersPersonnelStatus(XhpcCustomersPersonnel xhpcCustomersPersonnel) { xhpcCustomersMapper.updateCustomersPersonnelStatus(xhpcCustomersPersonnel.getCustomersPersonnelId(),xhpcCustomersPersonnel.getStatus()); @@ -273,7 +278,7 @@ public class XhpcCustomersServiceImpl extends BaseService implements IXhpcCustom if(xhpcCustomersPersonnel.getName()==null || "".equals(xhpcCustomersPersonnel.getName())){ return R.fail("名称必填"); } - if(xhpcCustomersPersonnel.getAccount()==null || "".equals(xhpcCustomersPersonnel.getAccount()) || "BE".equals(xhpcCustomersPersonnel.getAccount().substring(0,2))){ + if(xhpcCustomersPersonnel.getAccount()==null || "".equals(xhpcCustomersPersonnel.getAccount()) || !"BE".equals(xhpcCustomersPersonnel.getAccount().substring(0,2))){ return R.fail("账号必填且BE开头10位"); } if(xhpcCustomersPersonnel.getPhone()==null || "".equals(xhpcCustomersPersonnel.getPhone()) || xhpcCustomersPersonnel.getPhone().length() !=11){ diff --git a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcCustomersMapper.xml b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcCustomersMapper.xml index a4e4ff34..8cf5aef7 100644 --- a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcCustomersMapper.xml +++ b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcCustomersMapper.xml @@ -202,6 +202,7 @@ consume_money AS consumeMoney, red_packet AS redPacket, surplus_money AS surplusMoney, + create_time as createTime, type, status FROM