1.排行榜查询数据不准确修复
This commit is contained in:
@@ -299,22 +299,7 @@
|
||||
|
||||
|
||||
<select id="selectInviteUserList" resultType="com.sqx.modules.app.entity.UserEntity">
|
||||
SELECT
|
||||
u.*,
|
||||
IFNULL( b.counts, 0 ) AS counts,
|
||||
0 AS money
|
||||
FROM
|
||||
tb_user u
|
||||
LEFT JOIN ( SELECT inviter_code, COUNT(*) AS counts FROM tb_user u1 GROUP BY inviter_code ) AS b ON u.invitation_code = b.inviter_code
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="userName!=null and userName!=''">
|
||||
and user_name like concat('%',#{userName},'%')
|
||||
</if>
|
||||
<if test="phone!=null and phone!=''">
|
||||
and phone like concat('%',#{phone},'%')
|
||||
</if>
|
||||
order by money desc,counts desc
|
||||
SELECT any_value(user_id) as userId, COUNT(*) AS counts FROM tb_user GROUP BY inviter_code order by counts desc
|
||||
</select>
|
||||
|
||||
<select id="selectUserOnLineCount" resultType="Integer">
|
||||
|
||||
Reference in New Issue
Block a user