Commit 10855914 by 王璐琦

fix(approvalRecordsMapper): 优化查询条件以包含申请人用户ID

- 在查询中过滤条件中新增对申请人用户ID的判断
- 扩展FIND_IN_SET条件,支持sp_user和applyer_userid两种匹配
- 确保用户ID能匹配审批人员或申请人,提高数据查询准确性
1 parent dd80bc27
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
inner join nb_cb_transfer ct on ct.dj_serial_no = ar.merchant_sp_no inner join nb_cb_transfer ct on ct.dj_serial_no = ar.merchant_sp_no
inner join nb_cb_acc_detail d on d.serial_no = ct.serial_no inner join nb_cb_acc_detail d on d.serial_no = ct.serial_no
inner join nb_cb_receipt r on r.sub_serial_no = d.sub_serial_no and r.match_code = d.match_code inner join nb_cb_receipt r on r.sub_serial_no = d.sub_serial_no and r.match_code = d.match_code
<where>and FIND_IN_SET(#{qwUserId}, ar.sp_user) <where> and (FIND_IN_SET(#{qwUserId}, ar.sp_user) or ar.applyer_userid=#{qwUserId})
and ct.transfer_source = 0 and ct.transfer_source = 0
and r.deleted_flag = 'N' and r.deleted_flag = 'N'
and d.deleted_flag = 'N' and d.deleted_flag = 'N'
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
inner join nb_cb_acc_detail d on d.serial_no = cbtd.acc_detail_serial_no and d.deleted_flag = 'N' and d.cd_sign = 1 inner join nb_cb_acc_detail d on d.serial_no = cbtd.acc_detail_serial_no and d.deleted_flag = 'N' and d.cd_sign = 1
inner join nb_cb_receipt r on r.sub_serial_no = d.sub_serial_no and r.match_code = d. match_code and r.deleted_flag = 'N' and r.cd_sign = '2' inner join nb_cb_receipt r on r.sub_serial_no = d.sub_serial_no and r.match_code = d. match_code and r.deleted_flag = 'N' and r.cd_sign = '2'
<where> <where>
and FIND_IN_SET(#{qwUserId}, ar.sp_user) and (FIND_IN_SET(#{qwUserId}, ar.sp_user) or ar.applyer_userid=#{qwUserId})
and cbt.deleted_flag = 'N' and cbt.deleted_flag = 'N'
<if test="keyword != null and keyword != ''"> <if test="keyword != null and keyword != ''">
and ( and (
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!