diff --git a/bms-back/bms-system/src/main/resources/mapper/price/PayOrderListMapper.xml b/bms-back/bms-system/src/main/resources/mapper/price/PayOrderListMapper.xml index e15dac30..c5f59900 100644 --- a/bms-back/bms-system/src/main/resources/mapper/price/PayOrderListMapper.xml +++ b/bms-back/bms-system/src/main/resources/mapper/price/PayOrderListMapper.xml @@ -17,7 +17,22 @@ ifnull(nullif(trim(b.currency), ''), 'CNY') as currency, b.pay_calc_status as payCalcStatus, b.pay_calc_msg as payCalcMsg, - case when lower(trim(b.update_by)) = 'system' then '系统自动' else b.update_by end as updateBy, + case + when lower(trim(b.update_by)) = 'system' then '系统自动' + else ifnull(( + select case + when nullif(trim(u.nick_name), '') is not null then u.nick_name + else u.user_name + end + from sys_user u + where u.del_flag = '0' + and ( + (b.update_by regexp '^[0-9]+$' and u.user_id = cast(b.update_by as unsigned)) + or (ifnull(b.update_by, '') not regexp '^[0-9]+$' and u.user_name = b.update_by COLLATE utf8mb4_general_ci) + ) + limit 1 + ), b.update_by) + end as updateBy, b.update_time as updateTime, p.biz_date as bizDate from prc_order_bill p diff --git a/bms-back/bms-system/src/main/resources/mapper/price/PrcPayBillFeeMapper.xml b/bms-back/bms-system/src/main/resources/mapper/price/PrcPayBillFeeMapper.xml index cef59f30..f70d9bb4 100644 --- a/bms-back/bms-system/src/main/resources/mapper/price/PrcPayBillFeeMapper.xml +++ b/bms-back/bms-system/src/main/resources/mapper/price/PrcPayBillFeeMapper.xml @@ -59,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where u.del_flag = '0' and ( (${column} regexp '^[0-9]+$' and u.user_id = cast(${column} as unsigned)) - or (ifnull(${column}, '') not regexp '^[0-9]+$' and u.user_name = ${column}) + or (ifnull(${column}, '') not regexp '^[0-9]+$' and u.user_name = ${column} COLLATE utf8mb4_general_ci) ) limit 1 ), ${column})