客户余额,额度记录流水

This commit is contained in:
luojiaquan
2026-09-16 11:37:08 +08:00
parent 7172621fd3
commit f3be74b7a4
13 changed files with 1157 additions and 29 deletions
@@ -198,6 +198,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and (biz_type = 'customer' or biz_type is null or biz_type = '')
</update>
<!-- 额度调整后回写客户档案额度字段(数据源为客户余额账户) -->
<update id="updateCustomerCredit">
update bms_customer
set credit_ed = #{creditEd},
temp_ed = #{tempEd},
update_by = #{updateBy},
update_time = now()
where customer_id = #{customerId}
</update>
<!-- 只取档案物理额度列(列表查询里的 credit_ed 是账户可用额度子查询) -->
<select id="selectRawCreditByCustomerId" resultType="BmsCustomer">
select customer_id as customerId,
credit_ed as creditEd,
temp_ed as tempEd
from bms_customer
where customer_id = #{customerId}
</select>
<delete id="deleteBmsCustomerAttachmentByAttachmentIds" parameterType="String">
update bms_customer_attachment set del_flag = '2' where attachment_id in
<foreach item="attachmentId" collection="attachmentIds" open="(" separator="," close=")">
@@ -287,12 +306,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
service_user_id = #{serviceUserId},
service_user = #{serviceUser},
<if test="settlementType != null">settlement_type = #{settlementType},</if>
<if test="tempEd != null">temp_ed = #{tempEd},</if>
<if test="accountBalance != null">account_balance = #{accountBalance},</if>
<if test="foreignCurrencyBalance != null">foreign_currency_balance = #{foreignCurrencyBalance},</if>
<if test="weightThreshold != null">weight_threshold = #{weightThreshold},</if>
<if test="throwRatio != null">throw_ratio = #{throwRatio},</if>
<if test="creditEd != null">credit_ed = #{creditEd},</if>
<if test="productIds != null">product_ids = #{productIds},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>