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