🎨 交易记录按时间排序

This commit is contained in:
ronger 2021-02-24 09:17:21 +08:00
parent 1aa4797ef7
commit 8c85ff450d

View File

@ -16,7 +16,7 @@
update forest_bank_account set account_balance = account_balance + #{money} where bank_account = #{toBankAccount}; update forest_bank_account set account_balance = account_balance + #{money} where bank_account = #{toBankAccount};
</update> </update>
<select id="selectTransactionRecords" resultMap="DTOResultMap"> <select id="selectTransactionRecords" resultMap="DTOResultMap">
select * from forest_transaction_record where form_bank_account = #{bankAccount} or to_bank_account = #{bankAccount} select * from forest_transaction_record where form_bank_account = #{bankAccount} or to_bank_account = #{bankAccount} order by transaction_time desc
</select> </select>
<select id="existsWithBankAccountAndFunds" resultType="java.lang.Boolean"> <select id="existsWithBankAccountAndFunds" resultType="java.lang.Boolean">
select ifnull((select false from forest_transaction_record where to_bank_account = #{bankAccount} select ifnull((select false from forest_transaction_record where to_bank_account = #{bankAccount}