From a8bfc865c10c1ad75322510c1901edd8a46b12de Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 07 三月 2024 11:11:14 +0800
Subject: [PATCH] 合并代码
---
cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml b/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml
index d3f9fb2..265f7f5 100644
--- a/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml
+++ b/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupCompetitorMapper.xml
@@ -178,7 +178,11 @@
appUserId,
count(*) as num
from t_world_cup_competitor
- where worldCupId = #{worldCupId} group by participantType, participantId, appUserId
+ where 1 = 1
+ <if test="null != worldCupId">
+ and worldCupId = #{worldCupId}
+ </if>
+ group by participantType, participantId, appUserId
) as a
left join (
select
@@ -187,7 +191,11 @@
appUserId,
count(*) as num
from t_world_cup_competitor
- where matchResult = 1 and worldCupId = #{worldCupId} group by participantType, participantId, appUserId
+ where matchResult = 1
+ <if test="null != worldCupId">
+ and worldCupId = #{worldCupId}
+ </if>
+ group by participantType, participantId, appUserId
) as b on (a.participantId = b.participantId and a.participantType = b.participantType)
) as aa order by aa.totalSession desc
</select>
--
Gitblit v1.7.1