| | |
| | | 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> |
| | |
| | | <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 |
| | | c.id, |
| | | b.worldCupId, |
| | | c.name |
| | | 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.appUserId = #{uid} and b.payStatus = 2 and b.refundTime is null and b.state = 1 |
| | | </select> |
| | | </mapper> |