提交 3d32be6c authored 作者: huyufan's avatar huyufan

冻结资金相关

上级 b689d862
......@@ -139,6 +139,9 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
while (true) {
//冻结账户可用金额
OwnerAccount account = ownerAccountDao.getAccountByOwnerUserNoAndAccountType(param.getOwnerUserNo(), param.getAccountType());
if (account.getUsableBalance().compareTo(caseOutBalance) < 0) {
throw new ServiceSystemException(PerformanceResultEnum.HTTP_ERROR, "当前用户可用余额不足,无法提现");
}
OwnerAccount update = new OwnerAccount();
update.setUsableBalance(caseOutBalance);
update.setFrozenBalance(caseOutBalance);
......
......@@ -44,8 +44,8 @@ public class OwnerAccountSqlProvider {
sqlList.append("update owner_account set usable_balance = usable_balance +" +
account.getUsableBalance() + ",account_balance = account_balance +"
+ account.getAccountBalance()+
",modified_time=" + DateUtils.formatDateTime(now, "yyyy-MM-dd HH:mm:ss").get()
+ "where id = " + account.getId() + " and modified_time = " + DateUtils.formatDateTime(account.getModifiedTime(), "yyyy-MM-dd HH:mm:ss").get()
",modified_time='" + DateUtils.formatDateTime(now, "yyyy-MM-dd HH:mm:ss") +"'"
+ " where id = " + account.getId() + " and modified_time = '" + DateUtils.formatDateTime(account.getModifiedTime(), "yyyy-MM-dd HH:mm:ss").get()+"'"
);
return sqlList.toString();
......@@ -57,8 +57,8 @@ public class OwnerAccountSqlProvider {
sqlList.append("update owner_account set usable_balance = usable_balance -" +
account.getUsableBalance() + ",frozen_balance = frozen_balance +"
+ account.getFrozenBalance() +",account_balance = account_balance -" + account.getFrozenBalance()
+ ",modified_time=" + DateUtils.formatDateTime(now, "yyyy-MM-dd HH:mm:ss").get()
+ "where id = " + account.getId() + " and modified_time = " + DateUtils.formatDateTime(account.getModifiedTime(), "yyyy-MM-dd HH:mm:ss").get()
+ ",modified_time='" + DateUtils.formatDateTime(now, "yyyy-MM-dd HH:mm:ss").get()+"'"
+ " where id = " + account.getId() + " and modified_time = '" + DateUtils.formatDateTime(account.getModifiedTime(), "yyyy-MM-dd HH:mm:ss").get()+"'"
);
return sqlList.toString();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论