| | |
| | | <if test='comActDynVO.choice == 0 '> |
| | | AND d.community_id = ${comActDynVO.communityId} |
| | | </if> |
| | | <if test="comActDynVO.category != null"> |
| | | <if test="comActDynVO.category != null and comActDynVO.category != '' "> |
| | | AND d.category = #{comActDynVO.category} |
| | | </if> |
| | | <if test='comActDynVO.areaCode !=null and comActDynVO.category == 1 '> |
| | | AND ca.area_code = ${comActDynVO.areaCode} |
| | | </if> |
| | | <if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'> |
| | | <if test="comActDynVO.title != null and comActDynVO.title.trim() != '' "> |
| | | AND d.title LIKE concat(#{comActDynVO.title},'%') |
| | | </if> |
| | | <if test='comActDynVO.isTopping != null '> |
| | | <if test="comActDynVO.isTopping != null and comActDynVO.isTopping != '' "> |
| | | AND d.is_topping = #{comActDynVO.isTopping} |
| | | </if> |
| | | <if test='comActDynVO.status != null '> |
| | | <if test="comActDynVO.status != null and comActDynVO.status != '' "> |
| | | AND d.`status` = #{comActDynVO.status} |
| | | </if> |
| | | <if test='comActDynVO.type != null '> |
| | | <if test="comActDynVO.type != null and comActDynVO.type != '' "> |
| | | AND d.type in (${comActDynVO.type}) |
| | | </if> |
| | | <if test='comActDynVO.publishAtBegin != null '> |
| | | <if test="comActDynVO.publishAtBegin != null and comActDynVO.publishAtBegin != '' "> |
| | | AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} AND #{comActDynVO.publishAtEnd} |
| | | </if> |
| | | <if test="comActDynVO.isOrgHatch == 1"> |
| | |
| | | LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type |
| | | LEFT JOIN com_act ca ON d.community_id = ca.community_id |
| | | WHERE 1=1 |
| | | <if test="comActDynVO.communityId != null"> |
| | | <if test="comActDynVO.communityId != null and comActDynVO.communityId != '' "> |
| | | and d.community_id in (${comActDynVO.communityId}) |
| | | </if> |
| | | |
| | |
| | | and d.community_id in (select community_id from com_act where street_id=#{comActDynVO.streetId}) |
| | | </if> |
| | | |
| | | <if test="comActDynVO.category != null"> |
| | | <if test="comActDynVO.category != null and comActDynVO.category != '' "> |
| | | AND d.category = #{comActDynVO.category} |
| | | </if> |
| | | <if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'> |
| | | <if test="comActDynVO.title != null and comActDynVO.title.trim() != '' "> |
| | | AND d.title like concat(#{comActDynVO.title},'%') |
| | | </if> |
| | | <if test='comActDynVO.isTopping != null '> |
| | | <if test="comActDynVO.isTopping != null and comActDynVO.isTopping != '' "> |
| | | AND d.is_topping = #{comActDynVO.isTopping} |
| | | </if> |
| | | <if test='comActDynVO.status != null '> |
| | | <if test="comActDynVO.status != null and comActDynVO.status != '' "> |
| | | AND d.`status` = #{comActDynVO.status} |
| | | </if> |
| | | <if test='comActDynVO.type != null '> |
| | | <if test="comActDynVO.type != null and comActDynVO.type != '' "> |
| | | AND d.type = #{comActDynVO.type} |
| | | </if> |
| | | <if test='comActDynVO.publishAtBegin != null '> |
| | | <if test="comActDynVO.publishAtBegin != null and comActDynVO.publishAtBegin != '' "> |
| | | AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} AND #{comActDynVO.publishAtEnd} |
| | | </if> |
| | | group by d.id order by d.is_topping desc, d.create_at desc |