Commit a4c7907a authored by Administrator's avatar Administrator

赛事助手后台赛事列表SQL改写

parent 6ccfc922
......@@ -239,7 +239,9 @@
c.province as province,
c.area as area,
c.location as location
from gk_cmpt a left join common.neucmpt b on a.cmpt_id=b.gtCmptId
from gk_cmpt a
left join common.neucmpt b on a.cmpt_id=b.gtCmptId
left join common.neuuser nu on nu.neuUserId =b.committeeNeuUserId
left join raceenroll.competition c on b.gcmptid=c.cmptid
where a.del_flag=0
<include refid="committee-cmpt-where-sql"/>
......@@ -257,7 +259,7 @@
and now() >= c.startTime and c.endTime >= now()
</if>
<if test="param.userId > 0">
and c.createUserId=#{param.userId}
and c.createUserId=#{param.userId} OR (nu.gUserId = #{param.userId} AND nu.gUserId != c.createUserId)
</if>
<if test="param.userId lt 0">
AND c.createUserId NOT IN (SELECT user_id from gksite.gk_app_info WHERE user_id>0)
......
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