|
|
@@ -51,43 +51,34 @@
|
|
|
<select id="getShareholderHighScoreUserList"
|
|
|
resultType="com.kxs.user.api.vo.kxsapp.subGetShareholderUserList.UserScoreListVO">
|
|
|
SELECT
|
|
|
+ a.id, u.username, u.user_code, a.user_id, u.avatar,
|
|
|
<choose>
|
|
|
<when test="type == 1">
|
|
|
- first_score/3 AS score
|
|
|
+ FLOOR(a.first_score/3) AS score
|
|
|
</when>
|
|
|
<when test="type == 2">
|
|
|
- center_score/3 AS score
|
|
|
+ FLOOR(a.center_score/3) AS score
|
|
|
</when>
|
|
|
<when test="type == 3">
|
|
|
- high_score/3 AS score
|
|
|
- </when>
|
|
|
- </choose>,
|
|
|
- id,username,user_code,id,user_id
|
|
|
- FROM kxs_shd_score
|
|
|
- WHERE del_flag != 1
|
|
|
- <choose>
|
|
|
- <when test="type == 1">
|
|
|
- AND first_score >= 3
|
|
|
- </when>
|
|
|
- <when test="type == 2">
|
|
|
- AND center_score >= 3
|
|
|
- </when>
|
|
|
- <when test="type == 3">
|
|
|
- AND high_score >= 3
|
|
|
+ FLOOR(a.high_score/3) AS score
|
|
|
</when>
|
|
|
</choose>
|
|
|
- AND month = #{month}
|
|
|
+ FROM kxs_shd_score a
|
|
|
+ LEFT JOIN kxs_user u on u.id = a.user_id
|
|
|
+ WHERE a.del_flag != 1
|
|
|
<choose>
|
|
|
<when test="type == 1">
|
|
|
- ORDER BY first_score DESC
|
|
|
+ AND a.first_score >= 3
|
|
|
</when>
|
|
|
<when test="type == 2">
|
|
|
- ORDER BY center_score DESC
|
|
|
+ AND a.center_score >= 3
|
|
|
</when>
|
|
|
<when test="type == 3">
|
|
|
- ORDER BY high_score DESC
|
|
|
+ AND a.high_score >= 3
|
|
|
</when>
|
|
|
</choose>
|
|
|
+ AND a.month = #{month}
|
|
|
+ ORDER BY score DESC, id ASC
|
|
|
</select>
|
|
|
|
|
|
|