|
|
@@ -120,6 +120,7 @@ public class WxCashOutServiceImpl implements WxCashOutService { |
|
|
|
|
|
|
|
|
//扣掉账户金额 |
|
|
//扣掉账户金额 |
|
|
//此处需要加锁,防止并发设置 |
|
|
//此处需要加锁,防止并发设置 |
|
|
|
|
|
Integer olderCashOutNumber = merchant.getCashOutNumber(); |
|
|
long time = System.currentTimeMillis() + RedisLock.TIMEOUT; |
|
|
long time = System.currentTimeMillis() + RedisLock.TIMEOUT; |
|
|
String timeStr = String.valueOf(time); |
|
|
String timeStr = String.valueOf(time); |
|
|
boolean cashsetlock = redisLock.lock("merchantLockReduceCashSet_"+merchant.getId(), timeStr); |
|
|
boolean cashsetlock = redisLock.lock("merchantLockReduceCashSet_"+merchant.getId(), timeStr); |
|
|
@@ -173,13 +174,13 @@ public class WxCashOutServiceImpl implements WxCashOutService { |
|
|
|
|
|
|
|
|
map.put("variables", variablesList); |
|
|
map.put("variables", variablesList); |
|
|
wxFlowService.start(map, buser.getId(), buser.getName(), buser); |
|
|
wxFlowService.start(map, buser.getId(), buser.getName(), buser); |
|
|
return new ResultData(Result.SUCCESS,"提现提交审批成功"); |
|
|
|
|
|
|
|
|
return new ResultData(Result.SUCCESS,"提现提交审批成功",olderCashOutNumber-record.getTotalFee()); |
|
|
}else { |
|
|
}else { |
|
|
//没有审批则发送消息 |
|
|
//没有审批则发送消息 |
|
|
sendCashOutMsg(merchant, cashout.getId(),payWay); |
|
|
sendCashOutMsg(merchant, cashout.getId(),payWay); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return new ResultData("提现提交成功。"); |
|
|
|
|
|
|
|
|
return new ResultData(Result.SUCCESS,"提现提交成功。",olderCashOutNumber-record.getTotalFee()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected boolean hasWorkFlow(TenantEntity tenantEntity) { |
|
|
protected boolean hasWorkFlow(TenantEntity tenantEntity) { |
|
|
|