| | |
| | | <if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'> |
| | | AND a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) |
| | | </if> |
| | | <if test='comActActivityVO.projectId != null'> |
| | | AND a.project_id = #{comActActivityVO.projectId} |
| | | </if> |
| | | <if test='comActActivityVO.status != null and comActActivityVO.status !=0 '> |
| | | AND a.`status` = #{comActActivityVO.status} |
| | | </if> |
| | |
| | | SELECT t.* FROM `com_act_activity` t left join com_act_act_regist t1 on t.id = t1.activity_id left join sys_user t2 on t1.user_id = t2.user_id |
| | | WHERE t1.end_time is not null and t.community_id = #{communityId} and t.type = 3 and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59') group by t.id |
| | | </select> |
| | | <!-- <select id="pageProjectActivity" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO">--> |
| | | <!-- SELECT--> |
| | | <!-- a.id,--> |
| | | <!-- a.activity_name,--> |
| | | <!-- u.`name` sponsorName,--> |
| | | <!-- a.activity_addr,--> |
| | | <!-- a.aattend_people,--> |
| | | <!-- a.`status`,--> |
| | | <!-- a.is_qr_code,--> |
| | | <!-- a.publish_at,--> |
| | | <!-- a.begin_at,--> |
| | | <!-- a.cover,--> |
| | | <!-- a.end_at,--> |
| | | <!-- a.volunteer_max,--> |
| | | <!-- count(IF( s.sign_identity = 1, s.id, NULL )) participant_now,--> |
| | | <!-- count(IF( s.sign_identity = 2, s.id, NULL )) partyMemberNow,--> |
| | | <!-- count(IF( s.sign_identity = 3, s.id, NULL )) volunteer_now,--> |
| | | <!-- a.participant_max,--> |
| | | <!-- a.sign_up_begin,--> |
| | | <!-- a.sign_up_end,--> |
| | | <!-- ca.NAME AS communityName,--> |
| | | <!-- a.type,--> |
| | | <!-- a.party_member_max,--> |
| | | <!-- a.topic_id--> |
| | | <!-- FROM--> |
| | | <!-- com_act_activity a--> |
| | | <!-- LEFT JOIN sys_user u ON a.sponsor_id = u.user_id--> |
| | | <!-- LEFT JOIN ( SELECT * FROM com_act_act_sign WHERE `status` = 1 ) s ON a.id = s.activity_id--> |
| | | <!-- LEFT JOIN com_act ca ON a.community_id = ca.community_id--> |
| | | <!-- JOIN (SELECT * FROM com_act_social_project WHERE (street_id = #{comActActivityVO.streetId} OR community_id = #{comActActivityVO.communityId}) AND `status` =3) t ON a.project_id = t.id--> |
| | | <!-- GROUP BY a.id ORDER BY a.status = 99 desc,a.publish_at DESC--> |
| | | <!-- </select>--> |
| | | |
| | | |
| | | |
| | | <select id="pageProjectActivity" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT |
| | | a.id, |
| | |
| | | a.sign_up_begin, |
| | | a.sign_up_end, |
| | | ca.NAME AS communityName, |
| | | (SELECT responsibility FROM com_act_social_project casp WHERE a.project_id = casp.id) AS responsibilityName, |
| | | a.type, |
| | | a.party_member_max, |
| | | a.topic_id |
| | |
| | | LEFT JOIN sys_user u ON a.sponsor_id = u.user_id |
| | | LEFT JOIN ( SELECT * FROM com_act_act_sign WHERE `status` = 1 ) s ON a.id = s.activity_id |
| | | LEFT JOIN com_act ca ON a.community_id = ca.community_id |
| | | JOIN (SELECT * FROM com_act_social_project WHERE (street_id = #{comActActivityVO.streetId} OR community_id = #{comActActivityVO.communityId}) AND `status` =3) t ON a.project_id = t.id |
| | | JOIN (SELECT * FROM com_act_social_project WHERE (street_id = #{comActActivityVO.streetId} |
| | | OR community_id = #{comActActivityVO.communityId})) t ON a.project_id = t.id |
| | | GROUP BY a.id ORDER BY a.status = 99 desc,a.publish_at DESC |
| | | |
| | | </select> |
| | | |
| | | <select id="pageActivity" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO"> |
| | | SELECT |
| | | a.id, |