|
|
@ -20,14 +20,23 @@ |
|
|
|
(2021 - SUBSTR(tcp.id_card FROM 7 FOR 4)) as age, |
|
|
|
tcpro.join_rule as joinRule |
|
|
|
from t_compete_project tcpro |
|
|
|
LEFT JOIN t_compete_project_player tcpp on tcpro.id = tcpp.project_id and tcpp.rec_status =0 |
|
|
|
LEFT JOIN t_compete_player tcp on tcp.id = tcpp.player_id and tcp.rec_status=0 |
|
|
|
LEFT JOIN t_compete_company tcc on tcc.id= tcp.company_id and tcc.rec_status=0 |
|
|
|
LEFT JOIN t_compete_group tcg on tcg.id =tcp.compete_group_id and tcg.rec_status=0 |
|
|
|
LEFT JOIN t_compete_project_player tcpp on tcpro.id = tcpp.project_id |
|
|
|
|
|
|
|
LEFT JOIN t_compete_player tcp on tcp.id = tcpp.player_id |
|
|
|
|
|
|
|
LEFT JOIN t_compete_company tcc on tcc.id= tcp.company_id |
|
|
|
|
|
|
|
LEFT JOIN t_compete_group tcg on tcg.id =tcp.compete_group_id |
|
|
|
|
|
|
|
WHERE tcpro.`level`=#{level} |
|
|
|
and tcpro.type = #{type} |
|
|
|
and tcpro.team = 0 |
|
|
|
and tcpro.rec_status=0 |
|
|
|
|
|
|
|
and tcpp.rec_status =0 |
|
|
|
and tcp.rec_status=0 |
|
|
|
and tcc.rec_status=0 |
|
|
|
and tcg.rec_status=0 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getPlayerForTeam" resultType="com.ccsens.mt.bean.vo.TableVo$CompeteJoin" parameterType="java.util.Map"> |
|
|
@ -43,17 +52,27 @@ |
|
|
|
p.join_rule as joinRule |
|
|
|
FROM |
|
|
|
t_compete_project p |
|
|
|
LEFT JOIN t_compete_team t on p.id = t.project_id and t.rec_status = 0 |
|
|
|
LEFT JOIN t_compete_team_member m on t.id = m.compete_team_id and m.rec_status = 0 |
|
|
|
LEFT JOIN t_compete_company c on t.company_id = c.id and c.rec_status = 0 |
|
|
|
LEFT JOIN t_compete_player pl on m.player_id = pl.id and pl.rec_status = 0 |
|
|
|
LEFT JOIN t_compete_group g on t.gender_group = g.sex and t.group_remark = g.group_remark and g.rec_status = 0 and g.type = 5 |
|
|
|
LEFT JOIN t_compete_team t on p.id = t.project_id |
|
|
|
and t.rec_status = 0 |
|
|
|
LEFT JOIN t_compete_team_member m on t.id = m.compete_team_id |
|
|
|
and m.rec_status = 0 |
|
|
|
LEFT JOIN t_compete_company c on t.company_id = c.id |
|
|
|
|
|
|
|
LEFT JOIN t_compete_player pl on m.player_id = pl.id |
|
|
|
and pl.rec_status = 0 |
|
|
|
LEFT JOIN t_compete_group g on t.gender_group = g.sex and t.group_remark = g.group_remark and g.type = #{type} |
|
|
|
and g.rec_status = 0 |
|
|
|
WHERE |
|
|
|
p.type = #{type} |
|
|
|
and p.`level` = #{level} |
|
|
|
and p.team = 1 |
|
|
|
and p.rec_status = 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and c.rec_status = 0 |
|
|
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
<select id="queryProject" resultMap="com.ccsens.mt.persist.mapper.CompeteProjectMapper.BaseResultMap"> |
|
|
|
SELECT |
|
|
@ -76,12 +95,12 @@ |
|
|
|
FROM |
|
|
|
t_compete_project_player pp |
|
|
|
LEFT JOIN t_compete_player p on pp.player_id = p.id and p.rec_status = 0 |
|
|
|
LEFT JOIN t_compete_group g on p.compete_group_id = g.id and g.rec_status = 0 and g.type = 4 |
|
|
|
LEFT JOIN t_compete_company c on p.company_id = c.id and c.rec_status = 0 |
|
|
|
LEFT JOIN t_compete_group g on p.compete_group_id = g.id and g.rec_status = 0 and g.type = 6 |
|
|
|
LEFT JOIN t_compete_company c on p.company_id = c.id |
|
|
|
WHERE |
|
|
|
pp.project_id = #{projectId} |
|
|
|
and pp.rec_status = 0 |
|
|
|
|
|
|
|
and c.rec_status = 0 |
|
|
|
|
|
|
|
|
|
|
|
ORDER BY g.id |
|
|
@ -91,12 +110,12 @@ |
|
|
|
t.id |
|
|
|
FROM |
|
|
|
t_compete_team t |
|
|
|
LEFT JOIN t_compete_group g on t.group_remark = g.group_remark and t.gender_group = g.sex and g.rec_status = 0 and g.type = 4 |
|
|
|
LEFT JOIN t_compete_company c on t.company_id = c.id and c.rec_status = 0 |
|
|
|
LEFT JOIN t_compete_group g on t.group_remark = g.group_remark and t.gender_group = g.sex and g.rec_status = 0 and g.type = 6 |
|
|
|
LEFT JOIN t_compete_company c on t.company_id = c.id |
|
|
|
WHERE |
|
|
|
t.project_id = #{projectId} |
|
|
|
and t.rec_status = 0 |
|
|
|
|
|
|
|
and c.rec_status = 0 |
|
|
|
|
|
|
|
ORDER BY g.id |
|
|
|
</if> |
|
|
|