提现修改
This commit is contained in:
@@ -61,10 +61,24 @@
|
||||
GROUP BY
|
||||
user_id
|
||||
</select>
|
||||
|
||||
|
||||
<select id="countByUserIdList" resultType="com.sqx.modules.pay.entity.CashOut">
|
||||
SELECT user_id as userId,
|
||||
ROUND(SUM(CASE WHEN state = 1 THEN money ELSE 0 END), 2) AS total,
|
||||
COUNT(CASE WHEN state = 1 THEN 1 END) AS count,
|
||||
ROUND(SUM(CASE WHEN state = 3 THEN money ELSE 0 END), 2) AS verifyTotal,
|
||||
COUNT(CASE WHEN state = 3 THEN 1 END) AS verifyCount
|
||||
FROM cash_out
|
||||
GROUP BY user_id;
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCashOutPage" resultType="com.sqx.modules.pay.entity.CashOut">
|
||||
SELECT c.*,
|
||||
ifnull(u.user_name,"用户不存在") as userName,
|
||||
s.username as sysUserName
|
||||
ifnull(u.user_name,"用户不存在") as userName
|
||||
# s.username as sysUserName
|
||||
<if test="isApp == false">
|
||||
,ifnull(t.total,0.00) as total,
|
||||
ifnull(t.count,0) as count,
|
||||
@@ -73,7 +87,7 @@
|
||||
</if>
|
||||
FROM cash_out c
|
||||
left join tb_user u on c.user_id = u.user_id
|
||||
left join sys_user s on s.user_id= c.sys_user_id
|
||||
# left join sys_user s on s.user_id= c.sys_user_id
|
||||
<if test="isApp == false">
|
||||
left join (select user_id,ROUND(sum(money),2) as total,count(*) as count from cash_out where state = 1 GROUP BY user_id) t on c.user_id = t.user_id
|
||||
left join (select user_id,ROUND(sum(money),2) as total,count(*) as count from cash_out where state = 3 GROUP BY user_id) t1 on c.user_id = t1.user_id
|
||||
@@ -91,9 +105,9 @@
|
||||
<if test="cashOut.sysUserId!=null">
|
||||
and c.sys_user_id = #{cashOut.sysUserId}
|
||||
</if>
|
||||
<if test="cashOut.sysUserName!=null and cashOut.sysUserName!=''">
|
||||
and s.username = #{cashOut.sysUserName}
|
||||
</if>
|
||||
<!-- <if test="cashOut.sysUserName!=null and cashOut.sysUserName!=''">-->
|
||||
<!-- and s.username = #{cashOut.sysUserName}-->
|
||||
<!-- </if>-->
|
||||
<if test="cashOut.userType!=null">
|
||||
and c.user_type = #{cashOut.userType}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user