From 04da3fdd5cd6258fc998cb0c02acb0d590bdc915 Mon Sep 17 00:00:00 2001 From: lizhenhua <1075222162@qq.com> Date: Sun, 16 Nov 2025 14:14:39 +0800 Subject: [PATCH] =?UTF-8?q?youercehsi=E5=8A=9F=E8=83=BD=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/account/AccInfoMapper.xml | 52 ++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccInfoMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccInfoMapper.xml index ed8cb5d..0e9fa28 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccInfoMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/account/AccInfoMapper.xml @@ -250,7 +250,57 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" INNER JOIN sys_user t2 ON t1.user_id = t2.user_id LEFT JOIN account_card ac on t2.user_id = ac.user_id and (ac.card_status is null or ac.card_status in (1,4,5)) LEFT JOIN sys_dept t6 on t6.dept_id = t2.dept_id - + + t1.del_flag = 0 + and t1.account_status in + + #{accStatus} + + + and (t2.nick_name like CONCAT('%',#{accountInfoQueryParam.searchValue},'%') + or t2.user_id like CONCAT('%',#{accountInfoQueryParam.searchValue},'%') + or t2.phonenumber = #{encryptedSearchValue} + or ac.serial_num = #{accountInfoQueryParam.searchValue} + ) + + + and t2.dept_id in + + #{deptId} + + + + and t1.update_time = ]]> #{accountInfoQueryParam.startDateTime} + + + and t1.update_time #{accountInfoQueryParam.endDateTime} + + + and t2.user_type = #{accountInfoQueryParam.userType} + + + AND EXISTS( + SELECT null FROM + ( + SELECT + user_id, + SUM( CASE WHEN wallet_type = 1 THEN wallet_bal ELSE 0 END ) AS walletBal, + SUM( CASE WHEN wallet_type = 2 THEN wallet_bal ELSE 0 END ) AS subsidyBal, + SUM( a.wallet_bal ) + SUM( ifnull(a.frozen_balance, 0) ) accBalTotal + FROM + account_wallet_info a + GROUP BY + user_id + ) AS t4 + + t4.user_id = t1.user_id + + ) + + + and t2.user_code = #{accountInfoQueryParam.userCode} + + order by t1.account_id desc