|
|
@@ -59,8 +59,18 @@
|
|
|
udsr.reward
|
|
|
from user_distribute_rank_statistics_record udsr
|
|
|
left join user u on u.id = udsr.user_id
|
|
|
- where statistics_start_time = #{date}
|
|
|
- order by ${filed} desc limit 20)
|
|
|
+ <where>
|
|
|
+ <if test="date != null">
|
|
|
+ statistics_start_time = #{date}
|
|
|
+ </if>
|
|
|
+ <if test="userId != null">
|
|
|
+ udsr.user_id = #{userId}
|
|
|
+ </if>
|
|
|
+ <if test="nickname != null">
|
|
|
+ u.nickname like concat('%${nickname}%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by statistics_start_time desc, ${filed} desc limit 20)
|
|
|
s
|
|
|
<if test="orderBy!=null">
|
|
|
order by ${orderBy} ${sort}
|