Commit 58b980e0 authored by chenlin's avatar chenlin

接口增加计时组别类型

parent c580c51a
......@@ -29,13 +29,22 @@ public class Road {
private double fileSize;
private int times;
@ApiModelProperty(value = "计时组别类型", notes = "(1:个人,2:团队)")
private int roadType;
@ApiModelProperty(value = "组别类型名", notes = "组别类型名")
private String roadTypeName;
private String createTime;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Road road = (Road) o;
return roadId.equals(road.roadId);
}
......
......@@ -3,9 +3,19 @@
<mapper namespace="com.dlbridge.jadp.plugins.cmpt.dao.mapper.RoadMapper">
<select id="queryRoads" resultType="com.dlbridge.jadp.plugins.cmpt.bean.Road">
select road_id roadId,cmpt_id cmptId,road_name name,file_name fileName,file_url fileUrl,times,file_size fileSize
from gk_road
where cmpt_id = #{cmptId} and is_delete = 0
select a.road_id roadId
, a.cmpt_id cmptId
, a.road_name name
, a.file_name fileName
, a.file_url fileUrl
, a.times
, a.file_size fileSize
, b.item_type roadType
, case when b.item_type = 2 then '团队赛' when b.item_type = 1 then '个人赛' else '其他' end roadTypeName
from gk_road a
LEFT JOIN geerunner.cmpt_item b ON a.cmpt_id = b.cmpt_id AND a.road_id = b.item_id
WHERE a.cmpt_id = #{cmptId}
AND a.is_delete = 0
</select>
<update id="delete">
......
......@@ -44,7 +44,9 @@ public class RoadService {
public List<Road> queryRoads(Integer cmptId) {
log.info("RoadService enter");
List<Road> roads = remoteService.getRoads(cmptId);
if(roads == null) return null;
if(roads == null) {
return null;
}
for (Road road : roads) {
log.info("RoadService api接口 getName:" + road.getName() + " getRoadId:" + road.getRoadId() + " getFileName:" + road.getFileName() + " getFileUrl:" + road.getFileUrl());
}
......
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