Browse Source

20210622

pt
zy_Java 4 years ago
parent
commit
a4de0d241d
  1. 4
      mt/src/main/resources/application.yml
  2. 49
      mt/src/main/resources/mapper_dao/CompeteProjectDao.xml

4
mt/src/main/resources/application.yml

@ -1,6 +1,6 @@
spring: spring:
profiles: profiles:
active: test active: dev
include: common, util-test include: common, util-dev

49
mt/src/main/resources/mapper_dao/CompeteProjectDao.xml

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

Loading…
Cancel
Save