提交 03ed29ce authored 作者: huyufan's avatar huyufan

资金相关

上级 c5ddf16f
...@@ -41,7 +41,9 @@ public class OwnerAccountDaoImpl extends BaseDaoImpl<OwnerAccountMapper, OwnerAc ...@@ -41,7 +41,9 @@ public class OwnerAccountDaoImpl extends BaseDaoImpl<OwnerAccountMapper, OwnerAc
@Override @Override
public Integer updateOwnerAccountForConfirm(OwnerAccount account) { public Integer updateOwnerAccountForConfirm(OwnerAccount account) {
return baseMapper.updateOwnerAccountForConfirm(account); String nowStr = DateUtils.formatDateTime(LocalDateTime.now(),"yyyy-MM-dd HH:mm:ss").get();
return baseMapper.updateOwnerAccountForConfirm(account,nowStr);
} }
@Override @Override
......
...@@ -25,24 +25,24 @@ public interface OwnerAccountMapper extends BaseMapper<OwnerAccount> { ...@@ -25,24 +25,24 @@ public interface OwnerAccountMapper extends BaseMapper<OwnerAccount> {
@SelectProvider(type = OwnerAccountSqlProvider.class, method = "pageList") @SelectProvider(type = OwnerAccountSqlProvider.class, method = "pageList")
IPage<OwnerAccountVO> pageList(Page<OwnerAccountVO> page, PageOwnerAccountListParam param); IPage<OwnerAccountVO> pageList(Page<OwnerAccountVO> page, PageOwnerAccountListParam param);
// @SelectProvider(type = OwnerAccountSqlProvider.class, method = "addAccount") // @SelectProvider(type = OwnerAccountSqlProvider.class, method = "addAccount")
@Update("update owner_account set usable_balance = usable_balance + #{account.usableBalance}" @Update("update owner_account set usable_balance = usable_balance + #{account.usableBalance}"
+",account_balance = account_balance + #{account.accountBalance}" + ",account_balance = account_balance + #{account.accountBalance}"
+",modified_time= #{now}" + ",modified_time= #{now}"
+"where id = #{account.id} and modified_time = #{account.modifiedTime}" + "where id = #{account.id} and modified_time = #{account.modifiedTime}"
) )
Integer addAccount(@Param("account") OwnerAccount account, @Param("now")String now); Integer addAccount(@Param("account") OwnerAccount account, @Param("now") String now);
@Update("update owner_account set usable_balance = usable_balance - #{account.usableBalance}," + @Update("update owner_account set usable_balance = usable_balance - #{account.usableBalance}," +
"frozen_balance = frozen_balance + #{account.frozenBalance},account_balance = account_balance - #{account.accountBalance}," + "frozen_balance = frozen_balance + #{account.frozenBalance},account_balance = account_balance - #{account.accountBalance}," +
"modified_time=#{now}" "modified_time=#{now}"
+"where id = #{account.id} and modified_time = #{account.modifiedTime}" + "where id = #{account.id} and modified_time = #{account.modifiedTime}"
) )
Integer subAccount(@Param("account") OwnerAccount account, @Param("now")String now); Integer subAccount(@Param("account") OwnerAccount account, @Param("now") String now);
@Update("update owner_account set frozen_balance = frozen_balance - #{account.frozenBalance}," + @Update("update owner_account set frozen_balance = frozen_balance - #{account.frozenBalance}," +
"modified_time=#{now}" "modified_time=#{now}"
+"where id = #{account.id} and modified_time = #{account.modifiedTime}" + "where id = #{account.id} and modified_time = #{account.modifiedTime}"
) )
Integer updateOwnerAccountForConfirm(@Param("account") OwnerAccount account); Integer updateOwnerAccountForConfirm(@Param("account") OwnerAccount account, @Param("now") String now);
} }
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论