修改大客户充值,增加流水

This commit is contained in:
yuyang 2022-01-18 18:02:27 +08:00
parent 604e019955
commit 9a45032ff8
4 changed files with 11 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import com.xhpc.common.core.web.domain.AjaxResult;
import com.xhpc.common.core.web.page.TableDataInfo; import com.xhpc.common.core.web.page.TableDataInfo;
import com.xhpc.common.log.annotation.Log; import com.xhpc.common.log.annotation.Log;
import com.xhpc.common.log.enums.BusinessType; import com.xhpc.common.log.enums.BusinessType;
import com.xhpc.common.util.UserTypeUtil;
import com.xhpc.user.domain.XhpcCommunity; import com.xhpc.user.domain.XhpcCommunity;
import com.xhpc.user.domain.XhpcCommunityPersonnel; import com.xhpc.user.domain.XhpcCommunityPersonnel;
import com.xhpc.user.service.IXhpcCommunityService; import com.xhpc.user.service.IXhpcCommunityService;
@ -142,6 +143,7 @@ public class XhpcCommunityController extends BaseController {
@Log(title = "社区人员-充值", businessType = BusinessType.INSERT) @Log(title = "社区人员-充值", businessType = BusinessType.INSERT)
@PostMapping(value = "/addRecharge") @PostMapping(value = "/addRecharge")
public AjaxResult addRecharge(@RequestBody XhpcCommunityPersonnel xhpcCommunityPersonnel) { public AjaxResult addRecharge(@RequestBody XhpcCommunityPersonnel xhpcCommunityPersonnel) {
xhpcCommunityPersonnel.setRechargeType(UserTypeUtil.RECHARGE_PT);
return xhpcCommunityService.addRecharge(xhpcCommunityPersonnel); return xhpcCommunityService.addRecharge(xhpcCommunityPersonnel);
} }

View File

@ -5,6 +5,7 @@ import com.xhpc.common.core.web.domain.AjaxResult;
import com.xhpc.common.core.web.page.TableDataInfo; import com.xhpc.common.core.web.page.TableDataInfo;
import com.xhpc.common.log.annotation.Log; import com.xhpc.common.log.annotation.Log;
import com.xhpc.common.log.enums.BusinessType; import com.xhpc.common.log.enums.BusinessType;
import com.xhpc.common.util.UserTypeUtil;
import com.xhpc.user.domain.XhpcCustomers; import com.xhpc.user.domain.XhpcCustomers;
import com.xhpc.user.domain.XhpcCustomersPersonnel; import com.xhpc.user.domain.XhpcCustomersPersonnel;
import com.xhpc.user.service.IXhpcCustomersService; import com.xhpc.user.service.IXhpcCustomersService;
@ -129,6 +130,7 @@ public class XhpcCustomersController extends BaseController {
@Log(title = "大客户人员-充值", businessType = BusinessType.INSERT) @Log(title = "大客户人员-充值", businessType = BusinessType.INSERT)
@PostMapping(value = "/addRecharge") @PostMapping(value = "/addRecharge")
public AjaxResult addRecharge(@RequestBody XhpcCustomersPersonnel xhpcCustomersPersonnel) { public AjaxResult addRecharge(@RequestBody XhpcCustomersPersonnel xhpcCustomersPersonnel) {
xhpcCustomersPersonnel.setRechargeType(UserTypeUtil.RECHARGE_PT);
return xhpcCustomersService.addRecharge(xhpcCustomersPersonnel); return xhpcCustomersService.addRecharge(xhpcCustomersPersonnel);
} }

View File

@ -246,6 +246,11 @@ public class XhpcCustomersServiceImpl extends BaseService implements IXhpcCustom
return AjaxResult.error("充值金额大于0"); return AjaxResult.error("充值金额大于0");
} }
/**
* 社区人员状态改变
*
* @param xhpcCustomersPersonnel
*/
@Override @Override
public void updateCustomersPersonnelStatus(XhpcCustomersPersonnel xhpcCustomersPersonnel) { public void updateCustomersPersonnelStatus(XhpcCustomersPersonnel xhpcCustomersPersonnel) {
xhpcCustomersMapper.updateCustomersPersonnelStatus(xhpcCustomersPersonnel.getCustomersPersonnelId(),xhpcCustomersPersonnel.getStatus()); xhpcCustomersMapper.updateCustomersPersonnelStatus(xhpcCustomersPersonnel.getCustomersPersonnelId(),xhpcCustomersPersonnel.getStatus());
@ -273,7 +278,7 @@ public class XhpcCustomersServiceImpl extends BaseService implements IXhpcCustom
if(xhpcCustomersPersonnel.getName()==null || "".equals(xhpcCustomersPersonnel.getName())){ if(xhpcCustomersPersonnel.getName()==null || "".equals(xhpcCustomersPersonnel.getName())){
return R.fail("名称必填"); 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位"); return R.fail("账号必填且BE开头10位");
} }
if(xhpcCustomersPersonnel.getPhone()==null || "".equals(xhpcCustomersPersonnel.getPhone()) || xhpcCustomersPersonnel.getPhone().length() !=11){ if(xhpcCustomersPersonnel.getPhone()==null || "".equals(xhpcCustomersPersonnel.getPhone()) || xhpcCustomersPersonnel.getPhone().length() !=11){

View File

@ -202,6 +202,7 @@
consume_money AS consumeMoney, consume_money AS consumeMoney,
red_packet AS redPacket, red_packet AS redPacket,
surplus_money AS surplusMoney, surplus_money AS surplusMoney,
create_time as createTime,
type, type,
status status
FROM FROM