|
@@ -46,16 +46,15 @@
|
|
|
WHEN 2 THEN '离线'
|
|
|
END AS isDisableName,
|
|
|
u.user_id AS userId,
|
|
|
+ u.is_disable AS isDisable,
|
|
|
ROW_NUMBER() OVER (PARTITION BY u.nike_name ORDER BY u.create_time DESC) as rn
|
|
|
FROM
|
|
|
user_state_statistics u
|
|
|
- <where>
|
|
|
- <if test="isDisable != null and isDisable != 0">
|
|
|
- AND u.is_disable = #{isDisable}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
) t
|
|
|
WHERE t.rn = 1
|
|
|
+ <if test="isDisable != null and isDisable != 0">
|
|
|
+ AND t.isDisable = #{isDisable}
|
|
|
+ </if>
|
|
|
ORDER BY t.createTime DESC
|
|
|
</select>
|
|
|
</mapper>
|