Compare commits

..

No commits in common. "64e95844bbe5f4ede93de2f5d4e08df34cbd0a8a" and "9b1eccbc06a6925b18a05cee2ea0ff943e653648" have entirely different histories.

1 changed files with 1 additions and 51 deletions

View File

@ -250,57 +250,7 @@ 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
<where>
t1.del_flag = 0
and t1.account_status in
<foreach collection="accountInfoQueryParam.accountStatusList" item="accStatus" separator="," open="(" close=")">
#{accStatus}
</foreach>
<if test="accountInfoQueryParam.searchValue != null and accountInfoQueryParam.searchValue != ''">
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}
)
</if>
<if test="accountInfoQueryParam.deptIdList != null and accountInfoQueryParam.deptIdList.size() > 0">
and t2.dept_id in
<foreach collection="accountInfoQueryParam.deptIdList" item="deptId" separator="," open="(" close=")">
#{deptId}
</foreach>
</if>
<if test="accountInfoQueryParam.startDateTime != null">
and t1.update_time <![CDATA[ >= ]]> #{accountInfoQueryParam.startDateTime}
</if>
<if test="accountInfoQueryParam.endDateTime != null">
and t1.update_time <![CDATA[ <= ]]> #{accountInfoQueryParam.endDateTime}
</if>
<if test="accountInfoQueryParam.userType != null">
and t2.user_type = #{accountInfoQueryParam.userType}
</if>
<if test="accountInfoQueryParam.walletType != null">
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
<where>
t4.user_id = t1.user_id
</where>
)
</if>
<if test = "accountInfoQueryParam.userCode != null">
and t2.user_code = #{accountInfoQueryParam.userCode}
</if>
</where>
<include refid="queryAccountInfo_ref"/>
order by t1.account_id desc
</select>