Commit 700d692c authored by liming's avatar liming

增加查看报名人员接口

parent d4aff474
......@@ -79,4 +79,10 @@ public class SimpleMatchController {
return success(simpleMatchService.rank(matchId));
}
@ApiOperation("获取赛事报名人信息")
@PostMapping("/{matchId}/register/list")
public ResponseEntity<Result<List<Long>>> getRegisterList(@PathVariable("matchId") Long matchId) {
return success(simpleMatchService.getRegisterList(matchId));
}
}
......@@ -31,11 +31,13 @@ public class RespSimpleMatchInfo {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime endTime;
@ApiModelProperty("长度")
public BigDecimal distance;
private BigDecimal distance;
@ApiModelProperty("爬坡高度")
public BigDecimal climbDistance;
private BigDecimal climbDistance;
@ApiModelProperty("是否已报名,只有当按用户查询时有效")
public Boolean registered;
private Boolean registered;
@ApiModelProperty("报名数量")
public Integer registeredNum;
private Integer registeredNum;
@ApiModelProperty("赛事描述")
private String description;
}
......@@ -13,4 +13,6 @@ public interface SimpleMatchBusinessMapper {
List<RespSimpleMatchList> getUnFinishedSimpleMatchListForServer(@Param("now") LocalDateTime now);
List<RespSimpleMatchRank> getSimpleMatchRank(@Param("matchId") Long matchId);
List<Long> getRegisterList(@Param("matchId") Long matchId);
}
......@@ -203,4 +203,14 @@ public class SimpleMatchService {
public List<RespSimpleMatchRank> rank(Long matchId) {
return simpleMatchBusinessMapper.getSimpleMatchRank(matchId);
}
/**
* 赛事注册列表查看
*
* @param matchId
* @return
*/
public List<Long> getRegisterList(Long matchId) {
return simpleMatchBusinessMapper.getRegisterList(matchId);
}
}
......@@ -40,4 +40,8 @@
where t1.match_id = #{matchId}
order by match_rank asc
</select>
<select id="getRegisterList" resultType="java.lang.Long">
select player_id from simple_match_player_regist_log t1 where t1.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