fix: 智聪记账管理,新增睡眠账户统计功能,优化展示余额。

This commit is contained in:
tianyongbao
2025-02-24 13:44:49 +08:00
parent 7459b877f7
commit ba23989d59
8 changed files with 211 additions and 2 deletions

View File

@@ -26,6 +26,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="debitType" column="debit_type" />
<result property="lendType" column="lend_type" />
<result property="status" column="status" />
<result property="recentDealTime" column="recent_deal_time" />
</resultMap>
<sql id="selectAccountsVo">
@@ -50,7 +52,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bcl.pay_date ,
bcl.credit_limit ,
bcl.debit_type,
bcl.lend_type
bcl.lend_type,
(select create_time from accounts_deal_record adr where adr.account_id=a.account_id
order by adr.create_time desc
limit 1
) as recent_deal_time
from
accounts a
left join bank_card_lend bcl on
@@ -68,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="state != null and state != ''"> and a.state = #{state}</if>
<if test="status != null and status != ''"> and a.status = #{status}</if>
<if test="accountId != null and accountId != ''"> and a.account_id = #{accountId}</if>
<if test="repayFlag != null and repayFlag != ''"> and bcl.debit_type in('1','2')</if>
<if test="repayFlag != null and repayFlag != ''"> and bcl.debit_type in('1','2') </if>
</where>
<!-- 数据范围过滤 -->
${params.dataScope}