提交
This commit is contained in:
@@ -441,31 +441,13 @@ public class Userservice {
|
||||
return true;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
|
||||
if(promotion.getTypeCode().equals("MG")){
|
||||
cash.setStatus(1);
|
||||
aliPayService.alipayTransfer(cash.getVirrealcashamt().toString(),cash.getAccountno(),cash.getAccountname(),"",cash.getCashnumber());
|
||||
modFunds(cash.getUserid(),cash.getCashamt());
|
||||
}
|
||||
cash.setCashstatus(JSONUtil.toJsonStr(cashStatusList));
|
||||
|
||||
//释放资金
|
||||
TbPlussUserAccount userAccount= tbPlussUserAccountMapper.selectByPrimaryKey(cash.getUserid());
|
||||
if(ObjectUtil.isEmpty(userAccount)|| N.gt(cash.getCashamt(),userAccount.getFreezeBalance())){
|
||||
throw new Exception("冻结资金不足");
|
||||
}
|
||||
|
||||
userAccount.setFreezeBalance(userAccount.getFreezeBalance().subtract(cash.getCashamt()));
|
||||
userAccount.setUpdateTime(new Date());
|
||||
tbPlussUserAccountMapper.updateByPrimaryKey(userAccount);
|
||||
|
||||
TbPlussUserAccountFlow flow=new TbPlussUserAccountFlow();
|
||||
|
||||
flow.setUserId(cash.getUserid());
|
||||
flow.setBizCode("105");
|
||||
flow.setBizName("提现拒绝解冻");
|
||||
flow.setAmount(cash.getCashamt());
|
||||
flow.setBalance(userAccount.getBalance());
|
||||
flow.setCreateTime(new Date());
|
||||
tbPlussUserAccountFlowMapper.insert(flow);
|
||||
|
||||
break;
|
||||
case "2":
|
||||
@@ -473,13 +455,29 @@ public class Userservice {
|
||||
if(it.getUserId().toString().equals(userId))
|
||||
it.setStatus("2");
|
||||
if(it.getUserType().equals("MG")){
|
||||
//支付宝打款
|
||||
try {
|
||||
aliPayService.alipayTransfer(cash.getVirrealcashamt().toString(),cash.getAccountno(),cash.getAccountname(),"",cash.getCashnumber());
|
||||
modFunds(cash.getUserid(),cash.getCashamt());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
//释放资金
|
||||
TbPlussUserAccount userAccount= tbPlussUserAccountMapper.selectByPrimaryKey(cash.getUserid());
|
||||
if(ObjectUtil.isEmpty(userAccount)|| N.gt(cash.getCashamt(),userAccount.getFreezeBalance())){
|
||||
try {
|
||||
throw new Exception("冻结资金不足");
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
userAccount.setFreezeBalance(userAccount.getFreezeBalance().subtract(cash.getCashamt()));
|
||||
userAccount.setUpdateTime(new Date());
|
||||
tbPlussUserAccountMapper.updateByPrimaryKey(userAccount);
|
||||
|
||||
TbPlussUserAccountFlow flow=new TbPlussUserAccountFlow();
|
||||
|
||||
flow.setUserId(cash.getUserid());
|
||||
flow.setBizCode("105");
|
||||
flow.setBizName("提现拒绝解冻");
|
||||
flow.setAmount(cash.getCashamt());
|
||||
flow.setBalance(userAccount.getBalance());
|
||||
flow.setCreateTime(new Date());
|
||||
tbPlussUserAccountFlowMapper.insert(flow);
|
||||
}
|
||||
return true;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
Reference in New Issue
Block a user