fix: 分期账单,新增收款账户字段。

This commit is contained in:
tianyongbao
2024-08-19 16:19:42 +08:00
parent f116324996
commit 5309bca0bb
4 changed files with 29 additions and 2 deletions

View File

@@ -28,10 +28,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="balance" column="balance" />
<result property="bankName" column="bank_name" />
<result property="bankCode" column="bank_code" />
<result property="receivingAccountName" column="receiving_account_name" />
<result property="receivingAccountCode" column="receiving_account_code" />
<result property="repaymentDate" column="repayment_date" />
<result property="calculateInterestRate" column="calculate_interest_rate" />
<result property="outstandingInterest" column="outstanding_interest" />
<result property="outstandingPrincipal" column="outstanding_principal" />
<result property="receivingAccountId" column="receiving_account_id" />
</resultMap>
<sql id="selectInstallmentHistoryVo">
@@ -44,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.installment_amount,
a.installment_date,
a.period,
a.receiving_account_id,
a.calculate_interest_rate,
(
select
@@ -107,11 +111,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.del_flag,
a.remark,
bc."name" as bank_name,
bc.code as bank_code
bc.code as bank_code,
debit."name" as receiving_account_name,
debit.code as receiving_account_code
from
installment_history a
left join bank_card_lend bc on
bc.id = a.bank_card_lend_id
left join bank_card_lend debit on
debit.id = a.receiving_account_id
</sql>
<select id="selectInstallmentHistoryList" parameterType="InstallmentHistoryDto" resultMap="InstallmentHistoryResult">
@@ -164,6 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">remark,</if>
<if test="balance != null">balance,</if>
<if test="calculateInterestRate != null">calculate_interest_rate,</if>
<if test="receivingAccountId != null">receiving_account_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -188,6 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">#{remark},</if>
<if test="balance != null">#{balance},</if>
<if test="calculateInterestRate != null">#{calculateInterestRate},</if>
<if test="receivingAccountId != null">#{receivingAccountId},</if>
</trim>
</insert>
@@ -215,6 +225,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">remark = #{remark},</if>
<if test="balance != null">balance = #{balance},</if>
<if test="calculateInterestRate != null">calculate_interest_rate = #{calculateInterestRate},</if>
<if test="receivingAccountId != null">receiving_account_id = #{receivingAccountId},</if>
</trim>
where id = #{id}
</update>