main
rong.liu 11 months ago
parent b9c2592d4b
commit 7915da7ad4
  1. 37
      competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionMapper.xml

@ -673,7 +673,22 @@
c.create_time, c.create_time,
c.sponsor, c.sponsor,
IFNULL( IFNULL(
( SELECT count( 1 ) FROM c_competition_registration WHERE competition_id = c.id GROUP BY competition_id HAVING count( 1 ) > 0 ), (
SELECT
count( 1 )
FROM
c_competition_registration r
INNER JOIN nakadai.hr_user_account a ON a.id = r.account_id
AND a.is_del = 0
INNER JOIN nakadai.hr_user_info u ON u.user_id = a.user_id
AND u.is_del = 0
WHERE
competition_id = c.id
GROUP BY
competition_id
HAVING
count( 1 ) > 0
),
0 0
) AS applicant_num, ) AS applicant_num,
c.is_open, c.is_open,
@ -689,7 +704,7 @@
c_competition c c_competition c
WHERE WHERE
c.is_open = 0 c.is_open = 0
and c.publish_status = 1 AND c.publish_status = 1
<if test=" req.startTime!=null and req.endTime!=null "> <if test=" req.startTime!=null and req.endTime!=null ">
@ -735,7 +750,22 @@
c.create_time, c.create_time,
c.sponsor, c.sponsor,
IFNULL( IFNULL(
( SELECT count( 1 ) FROM c_competition_registration WHERE competition_id = c.id GROUP BY competition_id HAVING count( 1 ) > 0 ), (
SELECT
count( 1 )
FROM
c_competition_registration r
INNER JOIN nakadai.hr_user_account a ON a.id = r.account_id
AND a.is_del = 0
INNER JOIN nakadai.hr_user_info u ON u.user_id = a.user_id
AND u.is_del = 0
WHERE
competition_id = c.id
GROUP BY
competition_id
HAVING
count( 1 ) > 0
),
0 0
) AS applicant_num, ) AS applicant_num,
c.is_open, c.is_open,
@ -747,6 +777,7 @@
INNER JOIN c_competition c ON c.id = r.competition_id INNER JOIN c_competition c ON c.id = r.competition_id
WHERE WHERE
r.account_id = #{req.accountId} r.account_id = #{req.accountId}
AND r.is_disable = 0 AND r.is_disable = 0
) t ) t
WHERE WHERE

Loading…
Cancel
Save