fix:账户交易记录,增加类别子类字段,用于日常支出统计明细。

This commit is contained in:
tianyongbao
2024-07-15 22:37:00 +08:00
parent 29feba12e0
commit 9f03a851dd
6 changed files with 44 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="accountName" column="account_name" />
<result property="transferRecordId" column="transfer_record_id" />
<result property="currentBalance" column="current_balance" />
<result property="childCategory" column="child_category" />
</resultMap>
<sql id="selectAccountsDealRecordVo">
@@ -40,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.remark,
a.deal_category,
a.current_balance,
a.child_category,
CONCAT(a2."name", '', right(a2.code, 4), '') as account_name
from
accounts_deal_record a
@@ -56,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="accountId != null and accountId != ''"> and a.account_id = #{accountId}</if>
<if test="dealType != null and dealType != ''"> and a.deal_type = #{dealType}</if>
<if test="dealCategory != null and dealCategory != ''"> and a.deal_category = #{dealCategory}</if>
<if test="childCategory != null and childCategory != ''"> and a.child_category = #{childCategory}</if>
<if test="endTime!=null and endTime !=''">
and #{endTime}>=to_char(a.create_time, 'yyyy-MM-dd')
</if>
@@ -102,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dealCategory != null and dealCategory != ''">deal_category,</if>
<if test="transferRecordId != null and transferRecordId != ''">transfer_record_id,</if>
<if test="currentBalance != null">current_balance,</if>
<if test="childCategory != null">child_category,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -119,6 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dealCategory != null and dealCategory != ''">#{dealCategory},</if>
<if test="transferRecordId != null and transferRecordId != ''">#{transferRecordId},</if>
<if test="currentBalance != null">#{currentBalance},</if>
<if test="childCategory != null">#{childCategory},</if>
</trim>
</insert>
@@ -139,6 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dealCategory != null and dealCategory != ''">deal_category = #{dealCategory},</if>
<if test="transferRecordId != null and transferRecordId != ''">transfer_record_id = #{transferRecordId},</if>
<if test="currentBalance != null ">current_balance = #{currentBalance},</if>
<if test="childCategory != null ">child_category = #{childCategory},</if>
</trim>
where id = #{id}
</update>