修改机构参数判断

This commit is contained in:
yuyang 2022-01-11 17:26:29 +08:00
parent 9f41267206
commit 060054078f
2 changed files with 9 additions and 7 deletions

View File

@ -206,7 +206,7 @@ public class XhpcCommunityServiceImpl implements IXhpcCommunityService {
BigDecimal rechargeMoney = xhpcCommunityPersonnel.getRechargeMoney();
Long communityPersonnelId = xhpcCommunityPersonnel.getCommunityPersonnelId();
if(new BigDecimal(0).compareTo(rechargeMoney)==-1){
if(rechargeMoney !=null &&new BigDecimal(0).compareTo(rechargeMoney)==-1){
//增加社区用户的剩余金额
Map<String, Object> communityPersonnelById = xhpcCommunityMapper.getCommunityPersonnelById(communityPersonnelId, null, null, 1);
if(communityPersonnelById !=null){

View File

@ -55,7 +55,7 @@ public class XhpcCustomersServiceImpl implements IXhpcCustomersService {
@Override
public AjaxResult addCustomers(HttpServletRequest request, XhpcCustomers xhpcCustomers) {
boolean b = judgeXhpcCustomers(xhpcCustomers);
if(b){
if(!b){
return AjaxResult.error("参数比传");
}
//名称重复不能入库
@ -114,7 +114,7 @@ public class XhpcCustomersServiceImpl implements IXhpcCustomersService {
@Override
public AjaxResult updateCustomers(XhpcCustomers xhpcCustomers) {
boolean b = judgeXhpcCustomers(xhpcCustomers);
if(b){
if(!b){
return AjaxResult.error("参数比传");
}
//名称重复不能入库
@ -166,9 +166,11 @@ public class XhpcCustomersServiceImpl implements IXhpcCustomersService {
}
}
xhpcCustomersMapper.addCustomersPersonnel(xhpcCustomersPersonnel);
//增加一条充值记录
if(new BigDecimal(0).compareTo(rechargeMoney)==-1){
mechanismService.addRechargeOrder(xhpcCustomersPersonnel.getCustomersPersonnelId(),UserTypeUtil.CUSTOMERS_TYPE,rechargeMoney,rechargeMoney,UserTypeUtil.RECHARGE_PT);
if(rechargeMoney !=null){
//增加一条充值记录
if(new BigDecimal(0).compareTo(rechargeMoney)==-1){
mechanismService.addRechargeOrder(xhpcCustomersPersonnel.getCustomersPersonnelId(),UserTypeUtil.CUSTOMERS_TYPE,rechargeMoney,rechargeMoney,UserTypeUtil.RECHARGE_PT);
}
}
return AjaxResult.success();
}
@ -217,7 +219,7 @@ public class XhpcCustomersServiceImpl implements IXhpcCustomersService {
public AjaxResult addRecharge(XhpcCustomersPersonnel xhpcCustomersPersonnel) {
BigDecimal rechargeMoney = xhpcCustomersPersonnel.getRechargeMoney();
Long customersPersonnelId = xhpcCustomersPersonnel.getCustomersPersonnelId();
if(new BigDecimal(0).compareTo(rechargeMoney)==-1){
if(rechargeMoney !=null && new BigDecimal(0).compareTo(rechargeMoney)==-1){
//增加社区用户的剩余金额
Map<String, Object> communityPersonnelById = xhpcCustomersMapper.getCustomersPersonnelById(customersPersonnelId, null, null, 1);
if(communityPersonnelById !=null){