| | |
| | | participantType, |
| | | participantId, |
| | | appUserId, |
| | | count(*) as num |
| | | count(*) as num, |
| | | winIntegral, |
| | | drawIntegral, |
| | | loseIntegral |
| | | from t_world_cup_competitor |
| | | where matchResult is not null |
| | | <if test="null != item.year"> |
| | | and DATE_FORMAT(startTime, '%Y') = #{item.year} |
| | | </if> |
| | | <if test="null != sTime and null != eTime"> |
| | | and startTime between #{sTime} and #{eTime} |
| | | </if> |
| | | |
| | | |
| | | <if test="null != item.worldCupId"> |
| | | and worldCupId =#{item.worldCupId} |
| | | </if> |
| | | <if test="null != appUserIds and appUserIds.size() > 0"> |
| | | and appUserId in |
| | |
| | | where matchResult is not null and matchResult != -1 |
| | | <if test="null != item.year"> |
| | | and DATE_FORMAT(startTime, '%Y') = #{item.year} |
| | | </if> |
| | | <if test="null != sTime and null != eTime"> |
| | | and startTime between #{sTime} and #{eTime} |
| | | </if> |
| | | <if test="null != item.worldCupId"> |
| | | and worldCupId =#{item.worldCupId} |
| | | </if> |
| | | <if test="null != appUserIds and appUserIds.size() > 0"> |
| | | and appUserId in |
| | |
| | | #{iten} |
| | | </foreach> |
| | | </if> |
| | | <if test="sTime != null and eTime != null"> |
| | | and startTime between #{sTime} and #{eTime} |
| | | </if> |
| | | group by participantType, participantId, appUserId |
| | | </select> |
| | | |
| | |
| | | <foreach collection="appUserIds" item="iten" index="index" open="(" separator="," close=")"> |
| | | #{iten} |
| | | </foreach> |
| | | </if> |
| | | <if test="sTime != null and eTime != null"> |
| | | and startTime between #{sTime} and #{eTime} |
| | | </if> |
| | | group by participantType, participantId, appUserId |
| | | </select> |
| | |
| | | ourScore, |
| | | opponentScore, |
| | | matchResult, |
| | | b.`name` |
| | | b.`name`, |
| | | CONCAT(a.id, '') as id |
| | | from t_world_cup_competitor a |
| | | left join t_world_cup b on (a.worldCupId = b.id) |
| | | where matchResult is not null |
| | |
| | | <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> |
| | | |
| | | |
| | | |
| | | <select id="getWorldCupListFromRank" resultType="com.dsh.communityWorldCup.model.WorldCupListVo"> |
| | | select |
| | | a.id, |
| | | b.worldCupId, |
| | | c.name, |
| | | c.lon, |
| | | c.lat, |
| | | c.basePeople as heat, |
| | | c.status |
| | | from t_world_cup_payment_participant a |
| | | left join t_world_cup_payment b on (a.worldCupPaymentId = b.id) |
| | | left join t_world_cup c on (b.worldCupId = c.id) |
| | | where a.participantId = #{item.id} and b.payStatus = 2 and b.refundTime is null and b.state = 1 |
| | | order by a.createTime desc |
| | | </select> |
| | | </mapper> |