|
|
|
@ -61,12 +61,27 @@ |
|
|
|
|
c.play_end_time, |
|
|
|
|
c.create_time, |
|
|
|
|
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 |
|
|
|
|
) AS applicant_num, |
|
|
|
|
c.is_open, |
|
|
|
|
create_source, |
|
|
|
|
( CASE create_source WHEN 0 THEN '平台创建' WHEN 1 THEN '组织创建' ELSE '无' end) as createSource |
|
|
|
|
( CASE create_source WHEN 0 THEN '平台创建' WHEN 1 THEN '组织创建' ELSE '无' END ) AS createSource |
|
|
|
|
FROM |
|
|
|
|
c_competition c |
|
|
|
|
WHERE |
|
|
|
@ -658,7 +673,22 @@ |
|
|
|
|
c.create_time, |
|
|
|
|
c.sponsor, |
|
|
|
|
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 |
|
|
|
|
) AS applicant_num, |
|
|
|
|
c.is_open, |
|
|
|
@ -674,7 +704,7 @@ |
|
|
|
|
c_competition c |
|
|
|
|
WHERE |
|
|
|
|
c.is_open = 0 |
|
|
|
|
and c.publish_status = 1 |
|
|
|
|
AND c.publish_status = 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<if test=" req.startTime!=null and req.endTime!=null "> |
|
|
|
@ -720,7 +750,22 @@ |
|
|
|
|
c.create_time, |
|
|
|
|
c.sponsor, |
|
|
|
|
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 |
|
|
|
|
) AS applicant_num, |
|
|
|
|
c.is_open, |
|
|
|
@ -732,6 +777,7 @@ |
|
|
|
|
INNER JOIN c_competition c ON c.id = r.competition_id |
|
|
|
|
WHERE |
|
|
|
|
r.account_id = #{req.accountId} |
|
|
|
|
|
|
|
|
|
AND r.is_disable = 0 |
|
|
|
|
) t |
|
|
|
|
WHERE |
|
|
|
|