|
|
@ -563,7 +563,7 @@ |
|
|
|
having count(t2.groupName) <= 8 |
|
|
|
</select> |
|
|
|
<select id="queryCountScoreTeam" resultType="com.ccsens.mt.bean.vo.ScoreVo$CountScorePublicity"> |
|
|
|
select t1.*, count(*) as rangee from |
|
|
|
select t1.*, count(*) + 1 as rangee from |
|
|
|
(SELECT |
|
|
|
CONCAT( |
|
|
|
CASE team.group_remark WHEN 1 THEN '小学' WHEN 2 THEN '中学' WHEN 3 THEN '高职院校' WHEN 4 THEN '本科院校' ELSE '俱乐部'END, |
|
|
@ -596,8 +596,8 @@ |
|
|
|
AND startOrder.rec_status = 0 |
|
|
|
AND team.rec_status = 0 |
|
|
|
AND tm.rec_status = 0 |
|
|
|
group by score.id) t1, |
|
|
|
|
|
|
|
group by score.id) t1 |
|
|
|
left join |
|
|
|
(SELECT |
|
|
|
CONCAT( |
|
|
|
CASE team.group_remark WHEN 1 THEN '小学' WHEN 2 THEN '中学' WHEN 3 THEN '高职院校' WHEN 4 THEN '本科院校' ELSE '俱乐部'END, |
|
|
@ -631,14 +631,14 @@ |
|
|
|
AND team.rec_status = 0 |
|
|
|
AND tm.rec_status = 0 |
|
|
|
group by score.id) t2 |
|
|
|
WHERE |
|
|
|
on |
|
|
|
t1.groupName = t2.groupName |
|
|
|
AND t1.finalScore <= t2.finalScore |
|
|
|
AND t1.finalScore < t2.finalScore |
|
|
|
GROUP BY t1.groupName, t1.name |
|
|
|
order by rangee desc |
|
|
|
</select> |
|
|
|
<select id="queryCountScorePerson" resultType="com.ccsens.mt.bean.vo.ScoreVo$CountScorePublicity"> |
|
|
|
select t1.*, count(t2.id) as rangee from |
|
|
|
select t1.*, count(t2.id) + 1 as rangee from |
|
|
|
(SELECT |
|
|
|
competeGroup.group_name as groupName, |
|
|
|
player.NAME as name, |
|
|
@ -666,7 +666,8 @@ |
|
|
|
AND score.rec_status = 0 |
|
|
|
AND player.rec_status = 0 |
|
|
|
AND startOrder.rec_status = 0 |
|
|
|
AND competeGroup.rec_status = 0)t1, |
|
|
|
AND competeGroup.rec_status = 0)t1 |
|
|
|
left join |
|
|
|
(SELECT |
|
|
|
competeGroup.group_name as groupName, |
|
|
|
player.NAME as name, |
|
|
@ -695,7 +696,7 @@ |
|
|
|
AND player.rec_status = 0 |
|
|
|
AND startOrder.rec_status = 0 |
|
|
|
AND competeGroup.rec_status = 0)t2 |
|
|
|
where t1.groupName = t2.groupName and t1.finalScore <= t2.finalScore |
|
|
|
on t1.groupName = t2.groupName and t1.finalScore < t2.finalScore |
|
|
|
group by t1.id |
|
|
|
order by t1.groupName, rangee |
|
|
|
</select> |
|
|
|