Commit 3fb99a94 authored by liming's avatar liming

增加自己的排名

parent 815099a1
......@@ -157,8 +157,9 @@ public class SeriesService {
SeriesRoundRank myRankData = seriesRoundRankMapper.selectOne(rankQuery);
if (myRankData != null) {
SeriesMatchPlayerRecord record = seriesMatchPlayerRecordMapper.selectById(myRankData.getRecordId());
Integer myRank = seriesBusinessMapper.getMySeriesQualifyingMatchRank(roundId, areaId,
myRankData.getDuration(), myRankData.getCreateTime());
record.getMillisecond(), myRankData.getCreateTime());
result.setMyRank(myRank);
}
}
......
......@@ -45,7 +45,7 @@
</select>
<select id="getBestResult" resultType="java.lang.Integer">
select min(duration)
select min(millisecond)
from series_match_player_record t1
where t1.round_id = #{roundId} and t1.player_id = #{sportUserId} and t1.status = 20
</select>
......@@ -87,9 +87,10 @@
<select id="getMySeriesQualifyingMatchRank" resultType="java.lang.Integer">
select count(1) + 1
from series_round_rank
where round_id = #{roundId} and area_id = #{areaId}
and (duration &lt; #{duration} or (duration = #{duration} and create_time &lt; #{createTime}))
from series_round_rank t1
left join series_match_player_record t2 on t1.record_id = t2.id
where t1.round_id = #{roundId} and t1.area_id = #{areaId}
and (t2.millisecond &lt; #{duration} or (t2.millisecond = #{duration} and t1.create_time &lt; #{createTime}))
</select>
<select id="getSeriesQualifyingMatchRank"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment