fix: 账户总览新增接口。
This commit is contained in:
@@ -30,6 +30,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="bankCode" column="bank_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" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInstallmentHistoryVo">
|
||||
@@ -53,10 +55,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
installment_history_detail ihd
|
||||
where
|
||||
ihd.installment_history_id = a.id
|
||||
and ihd .posting_state = '0'
|
||||
and ihd.posting_state = '0'
|
||||
and ihd.del_flag='0'
|
||||
) as balance,
|
||||
(
|
||||
select
|
||||
CASE
|
||||
WHEN sum(ihd.interest) is null THEN 0
|
||||
ELSE sum(ihd.interest)
|
||||
END
|
||||
from
|
||||
installment_history_detail ihd
|
||||
where
|
||||
ihd.installment_history_id = a.id
|
||||
and ihd.posting_state = '0'
|
||||
and ihd.del_flag='0'
|
||||
) as outstanding_interest,
|
||||
(
|
||||
select
|
||||
CASE
|
||||
WHEN sum(ihd.principal) is null THEN 0
|
||||
ELSE sum(ihd.principal)
|
||||
END
|
||||
from
|
||||
installment_history_detail ihd
|
||||
where
|
||||
ihd.installment_history_id = a.id
|
||||
and ihd.posting_state = '0'
|
||||
and ihd.del_flag='0'
|
||||
) as outstanding_principal,
|
||||
(
|
||||
select
|
||||
min(d.repayment_date)
|
||||
from
|
||||
installment_history_detail d
|
||||
|
||||
Reference in New Issue
Block a user