| | |
| | | participantId, |
| | | count(*) as num |
| | | from t_world_cup_competitor |
| | | where DATE_FORMAT(NOW(), '%Y-%m-%d') = DATE_FORMAT(startTime, '%Y-%m-%d') |
| | | where matchResult is not null and DATE_FORMAT(NOW(), '%Y') = DATE_FORMAT(startTime, '%Y') |
| | | <if test="null != appUserIds and appUserIds.size() > 0"> |
| | | and appUserId in |
| | | <foreach collection="appUserIds" item="item" index="index" open="(" separator="," close=")"> |
| | |
| | | </foreach> |
| | | </if> |
| | | group by participantType, participantId |
| | | ) as aa order by aa.num desc |
| | | ) as aa order by aa.num desc,aa.participantId |
| | | </select> |
| | | |
| | | |
| | |
| | | (a.participationIntegral + a.winIntegral) as award |
| | | from t_world_cup_competitor a |
| | | left join t_world_cup b on (a.worldCupId = b.id) |
| | | where a.participantId = #{item.id} and a.participantType = #{item.isStudent} |
| | | where a.matchResult is not null and a.participantId = #{item.id} and a.participantType = #{item.isStudent} |
| | | order by a.startTime desc limit #{item.pageNo}, #{item.pageSize} |
| | | </select> |
| | | |
| | |
| | | ) as b on (a.participantId = b.participantId and a.participantType = b.participantType) |
| | | ) as aa |
| | | <if test="null != item.sort and item.sort == 1"> |
| | | order by aa.totalSession desc |
| | | order by aa.totalSession desc,aa.participantId |
| | | </if> |
| | | <if test="null != item.sort and item.sort == 2"> |
| | | order by aa.winRate desc |
| | | order by aa.winRate desc,aa.participantId |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | group by participantType, participantId, appUserId |
| | | ) as b on (a.participantId = b.participantId and a.participantType = b.participantType) |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="getMatchTime" resultType="int"> |
| | | select count(*) as matchTime from (select code from t_world_cup_competitor where worldCupId = #{worldCupId} group by code) as b |
| | | </select> |
| | | </mapper> |