Commit 23b1dbb6 authored by Administrator's avatar Administrator

事助手后台搜不到分配给组委会的赛事1

parent ce03a64b
...@@ -149,8 +149,6 @@ ...@@ -149,8 +149,6 @@
select count(1) select count(1)
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 raceenroll.competition c on b.gcmptid=c.cmptid left join raceenroll.competition c on b.gcmptid=c.cmptid
LEFT JOIN common.neuuser nu ON nu.neuUserId = b.committeeNeuUserId
LEFT JOIN raceenroll.registerinfo cbf ON cbf.userId = nu.gUserId
where a.del_flag=0 where a.del_flag=0
<include refid="cmpt-where-sql"/> <include refid="cmpt-where-sql"/>
...@@ -179,8 +177,6 @@ ...@@ -179,8 +177,6 @@
c.location as location 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 raceenroll.competition c on b.gcmptid=c.cmptid left join raceenroll.competition c on b.gcmptid=c.cmptid
LEFT JOIN common.neuuser nu ON nu.neuUserId = b.committeeNeuUserId
LEFT JOIN raceenroll.registerinfo cbf ON cbf.userId = nu.gUserId
where a.del_flag=0 where a.del_flag=0
<include refid="cmpt-where-sql"/> <include refid="cmpt-where-sql"/>
order by c.startTime desc order by c.startTime desc
...@@ -189,7 +185,7 @@ ...@@ -189,7 +185,7 @@
<sql id="cmpt-where-sql"> <sql id="cmpt-where-sql">
<if test="@org.apache.commons.lang3.StringUtils@isNotBlank(param.keyword)"> <if test="@org.apache.commons.lang3.StringUtils@isNotBlank(param.keyword)">
and (a.cmpt_name like concat('%',#{param.keyword},'%') or a.cmpt_id=#{param.keyword} or c.cmptId=#{param.keyword}) and a.cmpt_name like concat('%',#{param.keyword},'%')
</if> </if>
<if test="param.type == 1"> <if test="param.type == 1">
and now() >= c.openTime and c.deadLine >= now() and now() >= c.openTime and c.deadLine >= now()
...@@ -198,7 +194,8 @@ ...@@ -198,7 +194,8 @@
and now() >= c.startTime and c.endTime >= now() and now() >= c.startTime and c.endTime >= now()
</if> </if>
<if test="param.userId > 0"> <if test="param.userId > 0">
AND (c.createUserId=#{param.userId} OR cbf.userId = #{param.userId}) and c.createUserId=#{param.userId}
and a.cmpt_status = 2
</if> </if>
<if test="param.userId lt 0"> <if test="param.userId lt 0">
AND c.createUserId NOT IN (SELECT user_id from gksite.gk_app_info WHERE user_id>0) AND c.createUserId NOT IN (SELECT user_id from gksite.gk_app_info WHERE user_id>0)
...@@ -218,7 +215,7 @@ ...@@ -218,7 +215,7 @@
left join common.neucmpt b on a.cmpt_id=b.gtCmptId left join common.neucmpt b on a.cmpt_id=b.gtCmptId
left join common.neuuser nu on nu.neuUserId =b.committeeNeuUserId left join common.neuuser nu on nu.neuUserId =b.committeeNeuUserId
left join raceenroll.competition c on b.gcmptid=c.cmptid left join raceenroll.competition c on b.gcmptid=c.cmptid
LEFT JOIN geerunner.sys_admin sa ON sa.registerId =nu.gtUserId LEFT JOIN raceenroll.registerinfo cbf ON cbf.userId = nu.gUserId
where a.del_flag=0 where a.del_flag=0
<include refid="committee-cmpt-where-sql"/> <include refid="committee-cmpt-where-sql"/>
</select> </select>
...@@ -248,7 +245,7 @@ ...@@ -248,7 +245,7 @@
left join common.neucmpt b on a.cmpt_id = b.gtCmptId left join common.neucmpt b on a.cmpt_id = b.gtCmptId
left join common.neuuser nu on nu.neuUserId = b.committeeNeuUserId left join common.neuuser nu on nu.neuUserId = b.committeeNeuUserId
left join raceenroll.competition c on b.gcmptid =c.cmptid left join raceenroll.competition c on b.gcmptid =c.cmptid
LEFT JOIN geerunner.sys_admin sa ON sa.registerId =nu.gtUserId LEFT JOIN raceenroll.registerinfo cbf ON cbf.userId = nu.gUserId
where a.del_flag=0 where a.del_flag=0
<include refid="committee-cmpt-where-sql"/> <include refid="committee-cmpt-where-sql"/>
order by c.startTime desc order by c.startTime desc
...@@ -256,7 +253,7 @@ ...@@ -256,7 +253,7 @@
</select> </select>
<sql id="committee-cmpt-where-sql"> <sql id="committee-cmpt-where-sql">
<if test="@org.apache.commons.lang3.StringUtils@isNotBlank(param.keyword)"> <if test="@org.apache.commons.lang3.StringUtils@isNotBlank(param.keyword)">
and a.cmpt_name like concat('%',#{param.keyword},'%') and (a.cmpt_name like concat('%',#{param.keyword},'%') or a.cmpt_id=#{param.keyword} or c.cmptId=#{param.keyword})
</if> </if>
<if test="param.type == 1"> <if test="param.type == 1">
and now() >= c.openTime and c.deadLine >= now() and now() >= c.openTime and c.deadLine >= now()
...@@ -265,7 +262,7 @@ ...@@ -265,7 +262,7 @@
and now() >= c.startTime and c.endTime >= now() and now() >= c.startTime and c.endTime >= now()
</if> </if>
<if test="param.userId > 0"> <if test="param.userId > 0">
and c.createUserId=#{param.userId} OR (nu.gUserId = #{param.userId} AND nu.gUserId != c.createUserId AND sa.org_id = (SELECT org_id FROM geerunner.sys_admin WHERE registerId=#{param.userId} )) AND (c.createUserId=#{param.userId} OR cbf.userId = #{param.userId})
</if> </if>
<if test="param.userId lt 0"> <if test="param.userId lt 0">
AND c.createUserId NOT IN (SELECT user_id from gksite.gk_app_info WHERE user_id>0) AND c.createUserId NOT IN (SELECT user_id from gksite.gk_app_info WHERE user_id>0)
......
...@@ -55,6 +55,7 @@ public class GuideController { ...@@ -55,6 +55,7 @@ public class GuideController {
Map<String,String> param = new HashMap<>(); Map<String,String> param = new HashMap<>();
param.put("partnerId",partnerId); param.put("partnerId",partnerId);
param.put("userId",partner.getUserId()+""); param.put("userId",partner.getUserId()+"");
param.put("keyword",cmptPageDTO.getKeyword());
Page<List<Cmpt>> result = cmptService.queryCommitteeCmpt(cmptPageDTO.toPageable(), param); Page<List<Cmpt>> result = cmptService.queryCommitteeCmpt(cmptPageDTO.toPageable(), param);
result.setCode(200); result.setCode(200);
return result; return result;
......
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