| | |
| | | // " </if> " + |
| | | // " </where>" + |
| | | // "</script>") |
| | | @Select("<script> " + "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.is_volunteer=1,s.id,null))volunteer_now, " |
| | | + "count(if(s.is_volunteer=0,s.id,null))participant_now, " + "a.participant_max, " + "a.sign_up_begin, " |
| | | + "a.sign_up_end, " + "ca.name as communityName,a.type,a.party_member_max " + "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 " + " where 1=1 " + |
| | | |
| | | "<if test='comActActivityVO.communityId != null and comActActivityVO.communityId!=0'>" + "AND a.community_id = ${comActActivityVO.communityId} " + " </if> " |
| | | + |
| | | "<if test='comActActivityVO.phone != null and comActActivityVO.phone!=""'>" + "AND a.phone = ${comActActivityVO.phone} " + " </if> " |
| | | + |
| | | "<if test='comActActivityVO.areaCode !=null '>" + "AND ca.area_code = ${comActActivityVO.areaCode} " + " </if> " |
| | | + |
| | | "<if test='comActActivityVO.checkUnitId !=null '>" + "AND a.check_unit_id = #{comActActivityVO.checkUnitId} " + " </if> " |
| | | + |
| | | "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName.trim() != ""'>" |
| | | + " and a.activity_name like concat(#{comActActivityVO.activityName},'%') " + " </if> " |
| | | + "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 and comActActivityVO.isIng==null'>" |
| | | + "AND a.`status` = #{comActActivityVO.status} " + " </if> " |
| | | + "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 and comActActivityVO.isIng!=null and comActActivityVO.isIng==1'>" |
| | | + "AND a.`status` in (3,4) " + " </if> " |
| | | + "<if test='comActActivityVO.isApplets != null and comActActivityVO.isApplets ==1'>" |
| | | + "AND a.`status` != 1 AND a.`status` != 6 " + " </if> " + "<if test='comActActivityVO.beginAt != null '>" |
| | | + "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} " |
| | | + " </if> " + "<if test='comActActivityVO.type != null'>" |
| | | + "AND a.type=#{comActActivityVO.type} " + " </if> " |
| | | + " group by a.id " + " ORDER BY a.status = 99 desc,a.publish_at DESC " + "</script>") |
| | | // @Select("<script> " + "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.is_volunteer=1,s.id,null))volunteer_now, " |
| | | // + "count(if(s.is_volunteer=0,s.id,null))participant_now, " + "a.participant_max, " + "a.sign_up_begin, " |
| | | // + "a.sign_up_end, " + "ca.name as communityName,a.type,a.party_member_max " + "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 " + " where 1=1 " + |
| | | // |
| | | // "<if test='comActActivityVO.communityId != null and comActActivityVO.communityId!=0'>" + "AND a.community_id = ${comActActivityVO.communityId} " + " </if> " |
| | | // + |
| | | // "<if test='comActActivityVO.phone != null and comActActivityVO.phone!=""'>" + "AND a.phone = ${comActActivityVO.phone} " + " </if> " |
| | | // + |
| | | // "<if test='comActActivityVO.areaCode !=null '>" + "AND ca.area_code = ${comActActivityVO.areaCode} " + " </if> " |
| | | // + |
| | | // "<if test='comActActivityVO.checkUnitId !=null '>" + "AND a.check_unit_id = #{comActActivityVO.checkUnitId} " + " </if> " |
| | | // + |
| | | // "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName.trim() != ""'>" |
| | | // + " and a.activity_name like concat(#{comActActivityVO.activityName},'%') " + " </if> " |
| | | // + "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 and comActActivityVO.isIng==null'>" |
| | | // + "AND a.`status` = #{comActActivityVO.status} " + " </if> " |
| | | // + "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 and comActActivityVO.isIng!=null and comActActivityVO.isIng==1'>" |
| | | // + "AND a.`status` in (3,4) " + " </if> " |
| | | // + "<if test='comActActivityVO.isApplets != null and comActActivityVO.isApplets ==1'>" |
| | | // + "AND a.`status` != 1 AND a.`status` != 6 " + " </if> " + "<if test='comActActivityVO.beginAt != null '>" |
| | | // + "AND a.begin_at <![CDATA[ >= ]]> #{comActActivityVO.beginAt} AND a.end_at <![CDATA[ <= ]]> #{comActActivityVO.endAt} " |
| | | // + " </if> " + "<if test='comActActivityVO.type != null'>" |
| | | // + "AND a.type=#{comActActivityVO.type} " + " </if> " |
| | | // + " group by a.id " + " ORDER BY a.status = 99 desc,a.publish_at DESC " + "</script>") |
| | | IPage<ComActActivityVO> pageActivity(Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO); |
| | | |
| | | // @Select("SELECT " + "u.name sponsorName, " + "ca.name communityName, " |