Commit 7e02b638 authored by liming's avatar liming

日常赛列表增加报名人数

parent fbfbc4d1
......@@ -39,4 +39,6 @@ public class RespSimpleMatchList {
public BigDecimal climbDistance;
@ApiModelProperty("是否已报名,只有当按用户查询时有效")
public Boolean registered;
@ApiModelProperty("报名人数")
public Integer registeredNum;
}
......@@ -7,6 +7,7 @@
from (
select ifnull(t2.base_order, 0) registered,
t1.start_time as show_time,
ifnull(t3.registered_num, 0) as registered_num,
t1.*
from simple_match t1
left join (
......@@ -14,6 +15,11 @@
from simple_match_player_regist_log j1
where j1.player_id = #{userId}
) t2 on t1.id = t2.match_id
left join (
select j1.match_id, count(1) as registered_num
from simple_match_player_regist_log j1
group by j1.match_id
) t3 on t1.id = t3.match_id
where t1.end_time > #{now}
and t1.deleted = 0
and t1.status = 20
......
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