| | |
| | | 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 |
| | | WHERE 1 = 1 |
| | | <if test ="comActActivityVO.communityId != null and comActActivityVO.communityId != 0"> |
| | | <if test ="comActActivityVO.communityIds != null and comActActivityVO.communityIds.size() != 0"> |
| | | <if test="comActActivityVO.checkUnitId != null"> |
| | | AND (a.community_id = ${comActActivityVO.communityId} OR a.check_unit_id = #{comActActivityVO.checkUnitId}) |
| | | AND (a.community_id in |
| | | <foreach collection="comActActivityVO.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | OR a.check_unit_id = #{comActActivityVO.checkUnitId}) |
| | | </if> |
| | | <if test="comActActivityVO.checkUnitId == null"> |
| | | AND a.community_id = ${comActActivityVO.communityId} |
| | | AND a.community_id in |
| | | <foreach collection="comActActivityVO.communityIds" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | <if test="comActActivityVO.type == null"> |
| | | AND a.`type` != 5 |
| | | </if> |