Commit 3c42678b authored by liming's avatar liming

淘汰赛成绩确认

parent 936f8da2
......@@ -147,4 +147,9 @@ public class SeriesController {
return success();
}
@PostMapping("knockout/match/record")
public ResponseEntity<Result<SeriesQualifyingMatchRankPageVO>> getKnockoutMatchRecord(@RequestBody SeriesKnockoutMatchRecordDTO dto) {
return success(seriesService.getKnockoutMatchRecord(dto));
}
}
package com.antai.sport.http.server.management.api.business.series.dto;
import lombok.Data;
@Data
public class SeriesKnockoutMatchRecordDTO {
private Integer pageNo;
private Integer pageSize;
private Long matchId;
}
......@@ -24,4 +24,7 @@ public interface SeriesBusinessMapper {
IPage<SeriesQualifyingMatchRankVO> getSeriesQualifyingMatchRank(IPage<SeriesQualifyingMatchRankVO> page,
@Param("roundId") Long roundId,
@Param("areaId") Long areaId);
IPage<SeriesQualifyingMatchRankVO> getKnockoutMatchRecord(IPage<SeriesQualifyingMatchRankVO> page,
@Param("matchId") Long matchId);
}
......@@ -337,4 +337,18 @@ public class SeriesService {
seriesMatchPlayerRecordMapper.updateById(record);
}
public SeriesQualifyingMatchRankPageVO getKnockoutMatchRecord(SeriesKnockoutMatchRecordDTO dto) {
SeriesQualifyingMatchRankPageVO result = new SeriesQualifyingMatchRankPageVO();
result.setPageNo(dto.getPageNo());
Page<SeriesQualifyingMatchRankVO> pageParam = new Page<>(dto.getPageNo(), dto.getPageSize());
pageParam.addOrder(new OrderItem("t2.match_rank", true));
pageParam.addOrder(new OrderItem("t2.create_time", true));
pageParam.addOrder(new OrderItem("t2.id", true));
IPage<SeriesQualifyingMatchRankVO> rankPage = seriesBusinessMapper
.getKnockoutMatchRecord(pageParam, dto.getMatchId());
result.setData(rankPage.getRecords());
result.setTotalCount(rankPage.getTotal());
return result;
}
}
......@@ -55,4 +55,15 @@
left join series_apply t5 on t1.series_id = t5.series_id and t1.sport_user_id = t5.sport_user_id
where t1.round_id = #{roundId} and t1.area_id = #{areaId}
</select>
<select id="getKnockoutMatchRecord"
resultType="com.antai.sport.http.server.management.api.business.series.vo.SeriesQualifyingMatchRankVO">
select t2.*,t3.avatar,t3.nickname,t4.ftp,t4.heart_rate,t4.avg_heart_rate,t4.height,t5.name as real_name,
t5.phone,t5.id_card,if(t5.sex=1,'男','女') as sex
from series_match_player_record t2
left join sport_user t3 on t2.player_id = t3.id
left join sport_user_training_log t4 on t4.game_mode = 30 and t2.id = t4.record_id
left join series_apply t5 on t2.series_id = t5.series_id and t2.player_id = t5.sport_user_id
where t2.match_id = #{matchId}
</select>
</mapper>
\ No newline at end of file
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