From dd556df997e268153bf1a74616f49b25db11ed3f Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期五, 08 八月 2025 15:37:35 +0800 Subject: [PATCH] 赛事模块 --- cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml | 38 +++++++++++++++++++++++++++++++++++++- 1 files changed, 37 insertions(+), 1 deletions(-) diff --git a/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml b/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml index 4df4120..22b6429 100644 --- a/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml +++ b/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml @@ -110,11 +110,22 @@ 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 @@ -136,6 +147,12 @@ 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 @@ -162,6 +179,9 @@ #{iten} </foreach> </if> + <if test="sTime != null and eTime != null"> + and startTime between #{sTime} and #{eTime} + </if> group by participantType, participantId, appUserId </select> @@ -178,6 +198,9 @@ <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> @@ -311,4 +334,17 @@ <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> \ No newline at end of file -- Gitblit v1.7.1