| | |
| | | + " when photo_path IS NOT NULL then photo_path " |
| | | + " when CAST(SUBSTRING(id_card , 17, 1) AS SIGNED)%2=1 then 'https://www.psciio.com/idcard/tst/idcard/a723e5bcbd594a48956ef9354c8b477c.jpg' " |
| | | + " ELSE 'https://www.psciio.com/idcard/tst/idcard/cfb9b58913074068bba8c7002f91e7ff.jpg' END AS photo_path , " |
| | | + " 0 AS total " + " FROM com_pb_member " + " WHERE community_id=#{communityId} " |
| | | + " 0 AS total " + " FROM com_pb_member " + " WHERE community_id = #{communityId} " |
| | | + " ORDER BY join_time ASC " + " LIMIT 3 " + "</script>") |
| | | List<PartyBuildingMemberVO> defaultPartyactivity(@Param("communityId") Long communityId); |
| | | |
| | |
| | | + " ORDER BY idxName " + ")m LEFT JOIN " + "( " + "SELECT " |
| | | + " date_format(activity_time_begin, '%Y-%m') AS idxName, " + " COUNT(id) AS total " |
| | | + " FROM com_pb_activity " + " WHERE " |
| | | + " community_id=#{queryDTO.communityId} AND STATUS IN ( 3, 4, 5 ) AND " |
| | | + " community_id = #{queryDTO.communityId} AND STATUS IN ( 3, 4, 5 ) AND " |
| | | + " activity_time_begin < DATE_FORMAT( DATE_ADD( STR_TO_DATE(#{queryDTO.date}, '%Y-%m-%d'), INTERVAL 1 MONTH ), '%Y-%m-%d' ) AND " |
| | | + " activity_time_begin > DATE_FORMAT( DATE_ADD( STR_TO_DATE(#{queryDTO.date}, '%Y-%m-%d'), INTERVAL - 12 MONTH ), '%Y-%m-%d') " |
| | | + " GROUP BY idxName " + " ORDER BY idxName ASC " + " ) d ON m.idxName = d.idxName " |
| | |
| | | + "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.choice == 0 '>" + "AND a.community_id=#{comActActivityVO.communityId} " + " </if> " |
| | | "<if test='comActActivityVO.choice == 0 '>" + "AND a.community_id = #{comActActivityVO.communityId} " + " </if> " |
| | | + |
| | | |
| | | "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName.trim() != ""'>" |
| | |
| | | // + "a.publish_at, " + "a.is_qr_code, " + "a.begin_at, " + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM " |
| | | // + " com_act_activity a " + " LEFT JOIN sys_user u on a.sponsor_id=u.user_id " |
| | | // + " LEFT JOIN com_act_act_sign s on a.id=s.activity_id " + "WHERE " |
| | | // + " a.`status` = 1 and a.community_id=#{comActActivityVO.communityId} " |
| | | // + " a.`status` = 1 and a.community_id = #{comActActivityVO.communityId} " |
| | | // + "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'>" |
| | | // + " and a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) " + " </if> " |
| | | // + "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 and comActActivityVO.status !=1'>" |
| | |
| | | // + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " + "a.`status`, " + "a.publish_at, " + "a.is_qr_code, " + "a.begin_at, " |
| | | // + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM " + " com_act_activity a " |
| | | // + " LEFT JOIN sys_user u on a.sponsor_id=u.user_id " + " LEFT JOIN com_act_act_sign s on a.id=s.activity_id " |
| | | // + "WHERE " + " a.`status` != 1 and a.community_id=#{comActActivityVO.communityId} " |
| | | // + "WHERE " + " a.`status` != 1 and a.community_id = #{comActActivityVO.communityId} " |
| | | // + "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=""'>" |
| | | // + " and a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' ) " + " </if> " |
| | | // + "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 '>" |
| | |
| | | int updateStatusToBeginAfterSingEnd(); |
| | | |
| | | @Select("select GROUP_CONCAT(t.x1,',',t.x2,',',t.x3,',',t.x4) from ( " + "SELECT " |
| | | + "(select COUNT(d.id) from com_act_discuss d where d.community_id=#{communityId})x1, " |
| | | + "(select COUNT(w.id) from com_act_micro_wish w where w.community_id=#{communityId})x2, " |
| | | + "(select COUNT(p.id) from com_act_easy_photo p where p.community_id=#{communityId})x3, " |
| | | + "(select COUNT(d.id) from com_act_discuss d where d.community_id = #{communityId})x1, " |
| | | + "(select COUNT(w.id) from com_act_micro_wish w where w.community_id = #{communityId})x2, " |
| | | + "(select COUNT(p.id) from com_act_easy_photo p where p.community_id = #{communityId})x3, " |
| | | + " COUNT( a.id ) x4 " + "FROM " + " com_pb_activity a " + "WHERE " + " a.community_id =#{communityId})t") |
| | | String selectCommunityGovernanceTrendsVO(Long communityId); |
| | | |
| | | @Select(" " + " SELECT " |
| | | + " (select COUNT(d.id) from com_act_discuss d where DATE_FORMAT(d.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and d.community_id=#{communityId})discuss, " |
| | | + " (select COUNT(w.id) from com_act_micro_wish w where DATE_FORMAT(w.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and w.community_id=#{communityId})microWish, " |
| | | + " (select COUNT(p.id) from com_act_easy_photo p where DATE_FORMAT(p.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and p.community_id=#{communityId})eashPhoto, " |
| | | + " (select COUNT(pa.id) from com_pb_activity pa where DATE_FORMAT(pa.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and pa.community_id=#{communityId})pbActivity, " |
| | | + " (select COUNT(d.id) from com_act_discuss d where DATE_FORMAT(d.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and d.community_id = #{communityId})discuss, " |
| | | + " (select COUNT(w.id) from com_act_micro_wish w where DATE_FORMAT(w.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and w.community_id = #{communityId})microWish, " |
| | | + " (select COUNT(p.id) from com_act_easy_photo p where DATE_FORMAT(p.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and p.community_id = #{communityId})eashPhoto, " |
| | | + " (select COUNT(pa.id) from com_pb_activity pa where DATE_FORMAT(pa.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and pa.community_id = #{communityId})pbActivity, " |
| | | + " COUNT( a.id ) actActivity " + " FROM " + " com_pb_activity a " + " WHERE " |
| | | + " DATE_FORMAT( a.create_at, '%Y-%m-%d' )=DATE_FORMAT(#{date},'%Y-%m-%d') " |
| | | + " AND a.community_id =#{communityId}") |
| | |
| | | + " order by a.create_at desc" + "</script>") |
| | | IPage<ComActVO> pageCommunity(Page page, @Param("pageComActDTO") PageComActDTO pageComActDTO); |
| | | |
| | | @Update("update sys_user u set u.password=#{password} where u.account=#{account} and u.type=3 and u.community_id=#{communityId}") |
| | | @Update("update sys_user u set u.password=#{password} where u.account=#{account} and u.type=3 and u.community_id = #{communityId}") |
| | | void updateAccountPassword(@Param("password") String password, @Param("account") String account, |
| | | @Param("communityId") Long communityId); |
| | | |
| | |
| | | // + "COUNT( DISTINCT c.id ) commentNum, " + "u.name userName, " + "u.nick_name userNickName, " + "d.create_at " |
| | | // + "FROM " + "com_act_discuss d " + "JOIN sys_user u ON d.user_id = u.user_id " |
| | | // + "LEFT JOIN com_act_discuss_comment c ON d.id = c.discuss_id " |
| | | // + " where d.community_id=#{pageComActDiscussDTO.communityId}" |
| | | // + " where d.community_id = #{pageComActDiscussDTO.communityId}" |
| | | // + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""'>" |
| | | // + " and d.`discuss_subject` LIKE concat( #{pageComActDiscussDTO.subject}, '%' ) " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.begin != null '>" + "AND d.create_at BETWEEN #{pageComActDiscussDTO.begin} " |
| | |
| | | // + "LEFT JOIN com_act_discuss_user du ON d.id = du.discuss_id " |
| | | // + "<if test='pageComActDiscussDTO.loginUserId != null '>" |
| | | // + "LEFT JOIN com_act_discuss_option_user ou on do.id=ou.discuss_option_id and ou.user_id=#{pageComActDiscussDTO.loginUserId} " |
| | | // + " </if> " + " where d.community_id=#{pageComActDiscussDTO.communityId}" + " and d.is_del = 2" |
| | | // + " </if> " + " where d.community_id = #{pageComActDiscussDTO.communityId}" + " and d.is_del = 2" |
| | | // + "<if test='pageComActDiscussDTO.type != null '>" |
| | | // + " and d.`type` = #{pageComActDiscussDTO.type} " + " </if> " |
| | | // + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != ""'>" |
| | |
| | | IPage<ComActDiscussCommentVO> pageDiscussCommentApplets(Page page, |
| | | @Param("pageComActDiscussCommentDTO") PageComActDiscussCommentDTO pageComActDiscussCommentDTO); |
| | | |
| | | @Select("select name,address from com_act where community_id=#{communityId}") |
| | | @Select("select name,address from com_act where community_id = #{communityId}") |
| | | ComActVO selectCommunity(Long communityId); |
| | | |
| | | @Select("SELECT " + "if(du.id is not null,1,0)haveSign, " + "if(ou.id is not null,1,0)haveVote " + "FROM " |
| | |
| | | + "FROM " + "com_act_dyn d " + "LEFT JOIN ( select dyn_id,count(id) as readNum from com_act_dyn_user GROUP BY dyn_id ) u ON d.id = u.dyn_id " |
| | | + "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.choice == 0 '>" + "and d.community_id=#{comActDynVO.communityId} " + " </if> " |
| | | + "<if test='comActDynVO.choice == 0 '>" + "and d.community_id = #{comActDynVO.communityId} " + " </if> " |
| | | + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" |
| | | + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " |
| | | + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " |
| | |
| | | + "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id " |
| | | + "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 " |
| | | + "d.community_id=#{comActDynVO.communityId} " |
| | | + "d.community_id = #{comActDynVO.communityId} " |
| | | + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" |
| | | + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " |
| | | + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " |
| | |
| | | " </if> " + |
| | | "where p.del_tag = 0 and p.status !=2"+ |
| | | "<if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'>" + |
| | | " and p.community_id=#{comActEasyPhotoVO.communityId} " + |
| | | " and p.community_id = #{comActEasyPhotoVO.communityId} " + |
| | | " </if> " + |
| | | "<if test='comActEasyPhotoVO.happenAddr != null and comActEasyPhotoVO.happenAddr.trim() != ""'>" + |
| | | "AND p.happen_addr like concat(#{comActEasyPhotoVO.happenAddr},'%') " + |
| | |
| | | "and p.handler_id=#{comActEasyPhotoVO.backUserId}"+ |
| | | " </if> " + |
| | | "<if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'>" + |
| | | " and p.community_id=#{comActEasyPhotoVO.communityId} " + |
| | | " and p.community_id = #{comActEasyPhotoVO.communityId} " + |
| | | " </if> " + |
| | | "<if test='comActEasyPhotoVO.happenAddr != null and comActEasyPhotoVO.happenAddr.trim() != ""'>" + |
| | | "AND p.happen_addr like concat(#{comActEasyPhotoVO.happenAddr},'%') " + |
| | |
| | | " <where>" + |
| | | " p.del_tag = 0 " + |
| | | "<if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'>" + |
| | | " and p.community_id=#{comActEasyPhotoVO.communityId} " + |
| | | " and p.community_id = #{comActEasyPhotoVO.communityId} " + |
| | | " </if> " + |
| | | "<if test='comActEasyPhotoVO.status != null and comActEasyPhotoVO.status!=0' >" + |
| | | "AND p.`status` = #{comActEasyPhotoVO.status} " + |
| | |
| | | + "SELECT t.id,t.msg_content,t.photo_pah,t.phone,t.sendto_user_id,t.sendto_user_name,t.status,t.ispublic," |
| | | + "t.user_id,t.user_account,t.user_name,t.user_phone,t.community_id,t.create_at,t.type, u.phone as userAccount \n" |
| | | + "FROM \n" + " com_act_message t LEFT JOIN sys_user u ON t.user_id = u.user_id " |
| | | + " where t.community_id=#{comActMessageVO.communityId}\n" |
| | | + " where t.community_id = #{comActMessageVO.communityId}\n" |
| | | + "<if test='comActMessageVO.userAccount != null and comActMessageVO.userAccount.trim() != ""'>" |
| | | + " and u.phone=#{comActMessageVO.userAccount} \n" + " </if> " |
| | | + "<if test='comActMessageVO.userName != null and comActMessageVO.userName.trim() != ""'>" |
| | |
| | | " </if> " + |
| | | " <where>" + |
| | | "<if test='comActMicroWishVO.communityId != null and comActMicroWishVO.communityId != 0'>" + |
| | | " and w.community_id=#{comActMicroWishVO.communityId} " + |
| | | " and w.community_id = #{comActMicroWishVO.communityId} " + |
| | | " </if> " + |
| | | "<if test='comActMicroWishVO.sponsorPhone != null and comActMicroWishVO.sponsorPhone.trim() != ""'>" + |
| | | "AND w.sponsor_phone like concat(#{comActMicroWishVO.sponsorPhone},'%') " + |
| | |
| | | + "a.activity_time_begin,\n" + "a.activity_time_end,\n" + "a.enroll_time_begin,\n" + "a.cover,\n" |
| | | + "if(u.type=3 ,'管理员',u.name)createByName,\n" + "a.enroll_time_end \n" + "FROM\n" + "com_pb_activity a\n" |
| | | + "left join sys_user u on a.create_by=u.user_id \n" |
| | | + "where a.community_id=#{partyBuildingActivityVO.communityId}\n" |
| | | + "where a.community_id = #{partyBuildingActivityVO.communityId}\n" |
| | | + "<if test='partyBuildingActivityVO.name != null and partyBuildingActivityVO.name.trim() != ""'>" |
| | | + "and a.name = #{partyBuildingActivityVO.name} \n" + " </if> " |
| | | + "<if test='partyBuildingActivityVO.isAppliets != null and partyBuildingActivityVO.isAppliets==1'>" |
| | |
| | | * 社区id |
| | | * @return 社区名字 |
| | | */ |
| | | @Select("select name from com_act where community_id=#{communityId}") |
| | | @Select("select name from com_act where community_id = #{communityId}") |
| | | String selectCommunityNameByCommunityId(Long communityId); |
| | | } |
| | |
| | | // "</script>") |
| | | @Select("<script> " + "SELECT\n" + "id,\n" + "area_name,\n" + "area_code,\n" + "address_detail,\n" + "create_at \n" |
| | | + "FROM\n" + "com_mng_struct_area \n" + "WHERE 1=1 \n" + "<if test='comMngStructAreaVO.communityId != null '>" |
| | | + "AND community_id=#{comMngStructAreaVO.communityId} \n" + " </if> " |
| | | + "AND community_id = #{comMngStructAreaVO.communityId} \n" + " </if> " |
| | | + "<if test='comMngStructAreaVO.areaName != null and comMngStructAreaVO.areaName.trim() != ""'>" |
| | | + "AND area_name like concat( '%',#{comMngStructAreaVO.areaName}, '%' )" + " </if> " + "</script>") |
| | | IPage<ComMngStructAreaVO> pageArea(Page page, @Param("comMngStructAreaVO") ComMngStructAreaVO comMngStructAreaVO); |
| | |
| | | // "</script>") |
| | | @Select("<script> " + "SELECT\n" + "id,\n" + "`name`,\n" + "photo_path,\n" + "phone,\n" + "integral,\n" |
| | | + "create_at \n" + "FROM\n" + "com_mng_volunteer_mng \n" |
| | | + " where state=2 and community_id=#{comMngVolunteerMngVO.communityId}" |
| | | + " where state=2 and community_id = #{comMngVolunteerMngVO.communityId}" |
| | | + "<if test='comMngVolunteerMngVO.name != null and comMngVolunteerMngVO.name.trim() != ""'>" |
| | | + " and name like concat(#{comMngVolunteerMngVO.name},'%') \n" + " </if> " |
| | | + "<if test='comMngVolunteerMngVO.phone != null and comMngVolunteerMngVO.phone.trim() != ""'>" |
| | |
| | | + "t.create_at, " + "t.submit_user_id \n" + "FROM\n" + "com_mng_volunteer_mng t\n" + " RIGHT JOIN \n" |
| | | + "(select submit_user_id, MAX(create_at)create_at from com_mng_volunteer_mng where state IN ( 1, 3 ) GROUP BY submit_user_id ) tmp \n" |
| | | + "on t.create_at = tmp.create_at and t.submit_user_id=tmp.submit_user_id " + "WHERE\n" |
| | | + "state in (1,3) and community_id=#{comMngVolunteerMngVO.communityId} \n" |
| | | + "state in (1,3) and community_id = #{comMngVolunteerMngVO.communityId} \n" |
| | | + "<if test='comMngVolunteerMngVO.name != null and comMngVolunteerMngVO.name.trim() != ""'>" |
| | | + "and t.name like concat(#{comMngVolunteerMngVO.name},'%') \n" + " </if> " |
| | | + "<if test='comMngVolunteerMngVO.phone != null and comMngVolunteerMngVO.phone.trim() != ""'>" |
| | |
| | | + " LEFT JOIN sys_user u ON d.user_id = u.user_id\n" |
| | | + " LEFT JOIN com_mng_struct_area sa ON d.house_community_id = sa.id \n" + "where 1=1 " |
| | | + "<if test='pageComOpsHouseDTO.communityId != null '>" |
| | | + "AND ( d.community_id=#{pageComOpsHouseDTO.communityId} or sa.community_id=#{pageComOpsHouseDTO.communityId} )\n" |
| | | + "AND ( d.community_id = #{pageComOpsHouseDTO.communityId} or sa.community_id = #{pageComOpsHouseDTO.communityId} )\n" |
| | | + " </if> " + |
| | | |
| | | "<if test='pageComOpsHouseDTO.userId != null '>" + "AND d.user_id=#{pageComOpsHouseDTO.userId} \n" + " </if> " |
| | |
| | | + "AND d.brn <![CDATA[ >= ]]> 4 \n" + " </if> " + |
| | | |
| | | "<if test='pageComOpsHouseDTO.houseCommunityId != null '>" |
| | | + "AND d.house_community_id=#{pageComOpsHouseDTO.houseCommunityId} \n" + " </if> " |
| | | + "AND d.house_community_id = #{pageComOpsHouseDTO.houseCommunityId} \n" + " </if> " |
| | | + "<if test='pageComOpsHouseDTO.status != null and pageComOpsHouseDTO.status < 4 '>" |
| | | + "AND d.status=#{pageComOpsHouseDTO.status} \n" + " </if> " |
| | | + "<if test='pageComOpsHouseDTO.status != null and pageComOpsHouseDTO.status ==4 '>" |
| | |
| | | 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 |
| | | WHERE a.`status` = 1 AND a.community_id=#{comActActivityVO.communityId} |
| | | WHERE a.`status` = 1 AND a.community_id = #{comActActivityVO.communityId} |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 1'> |
| | | AND a.volunteer_max != 0 |
| | | </if> |
| | |
| | | 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 |
| | | WHERE a.`status` != 1 AND a.community_id=#{comActActivityVO.communityId} |
| | | WHERE a.`status` != 1 AND a.community_id = #{comActActivityVO.communityId} |
| | | <if test='comActActivityVO.type != null and comActActivityVO.type == 1'> |
| | | AND a.volunteer_max != 0 |
| | | </if> |
| | |
| | | <where> |
| | | 1=1 |
| | | <if test="commonPage.communityId!=null"> |
| | | and t.community_id=#{commonPage.communityId} |
| | | and t.community_id = #{commonPage.communityId} |
| | | </if> |
| | | <if test="commonPage.paramId!=null"> |
| | | and t.column_id =#{commonPage.paramId} |
| | |
| | | <if test='pageComActDiscussDTO.loginUserId != null '> |
| | | LEFT JOIN com_act_discuss_option_user ou ON do.id=ou.discuss_option_id AND ou.user_id=#{pageComActDiscussDTO.loginUserId} |
| | | </if> |
| | | WHERE d.community_id=#{pageComActDiscussDTO.communityId} AND d.is_del = 2 AND d.status != 1 |
| | | WHERE d.community_id = #{pageComActDiscussDTO.communityId} AND d.is_del = 2 AND d.status != 1 |
| | | <if test='pageComActDiscussDTO.type != null '> |
| | | AND d.`type` = #{pageComActDiscussDTO.type} |
| | | </if> |
| | |
| | | WHERE |
| | | p.del_tag = 0 and p.`status` != 3 |
| | | <if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'> |
| | | and p.community_id=#{comActEasyPhotoVO.communityId} |
| | | and p.community_id = #{comActEasyPhotoVO.communityId} |
| | | </if> |
| | | <if test='comActEasyPhotoVO.status != null and comActEasyPhotoVO.status!=0' > |
| | | AND p.`status` = #{comActEasyPhotoVO.status} |
| | |
| | | WHERE |
| | | p.del_tag = 0 and p.`is_report_urban` =1 |
| | | <if test='communityId != null and communityId != 0'> |
| | | and p.community_id=#{communityId} |
| | | and p.community_id = #{communityId} |
| | | </if> |
| | | <if test='urbanStatus != null ' > |
| | | AND p.`urban_status` = #{urbanStatus} |
| | |
| | | left JOIN com_pb_service_team su ON w.responsible_id = su.id |
| | | <where> |
| | | <if test='comActMicroWishVO.communityId != null and comActMicroWishVO.communityId != 0'> |
| | | and w.community_id=#{comActMicroWishVO.communityId} |
| | | and w.community_id = #{comActMicroWishVO.communityId} |
| | | </if> |
| | | <if test='comActMicroWishVO.status == 3 and comActMicroWishVO.isApplets != null and comActMicroWishVO.isApplets != 0'> |
| | | AND w.`status` in (2,3) |
| | |
| | | LEFT JOIN sys_user su1 ON w.responsible_id = su1.user_id |
| | | <where> |
| | | <if test='comActMicroWishVO.communityId != null and comActMicroWishVO.communityId != 0'> |
| | | and w.community_id=#{comActMicroWishVO.communityId} |
| | | and w.community_id = #{comActMicroWishVO.communityId} |
| | | </if> |
| | | <if test='comActMicroWishVO.createBegin != null '> |
| | | AND w.create_at BETWEEN #{comActMicroWishVO.createBegin} |
| | |
| | | <where> |
| | | 1=1 |
| | | <if test="commonPage.paramId !=null"> |
| | | and t.community_id=#{commonPage.paramId} |
| | | and t.community_id = #{commonPage.paramId} |
| | | </if> |
| | | <if test="commonPage.status !=null"> |
| | | and t.status=#{commonPage.status} |
| | |
| | | </resultMap> |
| | | |
| | | <select id="select" resultMap="selectMap"> |
| | | select t.village_id as villageId,t.name as villageName,t1.id,t1.name from com_mng_village t left join com_mng_building t1 on t.village_id = t1.village_id where t.community_id=#{id} and t1.id is not null |
| | | select t.village_id as villageId,t.name as villageName,t1.id,t1.name from com_mng_village t left join com_mng_building t1 on t.village_id = t1.village_id where t.community_id = #{id} and t1.id is not null |
| | | </select> |
| | | |
| | | <select id="pageBuildingAdmin" resultType="com.panzhihua.common.model.vos.community.building.admin.PageBuildingListAdminVo"> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="getSecondHouseAddress" resultMap="selectMap"> |
| | | select t.village_id as villageId,concat(t.alley,t.house_num,'号') as villageName,t1.id,concat(t1.unit_no,'栋',t1.floor,'单元',t1.code,'号') as name from com_mng_village t left join com_mng_population_house t1 on t.village_id = t1.village_id where t.community_id=#{communityId} |
| | | select t.village_id as villageId,concat(t.alley,t.house_num,'号') as villageName,t1.id,concat(t1.unit_no,'栋',t1.floor,'单元',t1.code,'号') as name from com_mng_village t left join com_mng_population_house t1 on t.village_id = t1.village_id where t.community_id = #{communityId} |
| | | </select> |
| | | |
| | | <select id="getSecondHouse" resultMap="selectMap"> |
| | | select t.village_id as villageId,concat(t.alley,t.house_num,'号') as villageName,t1.id,concat(t1.unit_no,'栋') as name from com_mng_village t left join com_mng_population_house t1 on t.village_id = t1.village_id where t.community_id=#{communityId} GROUP BY t.village_id,t1.unit_no |
| | | select t.village_id as villageId,concat(t.alley,t.house_num,'号') as villageName,t1.id,concat(t1.unit_no,'栋') as name from com_mng_village t left join com_mng_population_house t1 on t.village_id = t1.village_id where t.community_id = #{communityId} GROUP BY t.village_id,t1.unit_no |
| | | </select> |
| | | |
| | | |
| | |
| | | |
| | | <select id="statics" resultType="com.panzhihua.common.model.vos.community.rentHouse.PreOrderStatics"> |
| | | select * from ( |
| | | (select count(ding_money) as allOrder from renting_hourse_pre_order where 1=1 <if test="communityId !=null and communityId !=0">and community_id=#{communityId}</if> ) allOrder, |
| | | (select count(ding_money) as allRefuse from renting_hourse_pre_order where (status = 3 or status =4) <if test="communityId !=null and communityId !=0">and community_id=#{communityId}</if>) allRefuse, |
| | | (select count(*) as refuseNum from renting_hourse_pre_order where (status = 3 or status =4) <if test="communityId !=null and communityId !=0">and community_id=#{communityId}</if>) refuseNum, |
| | | (select count(ding_money) as settledOrder from renting_hourse_pre_order where status = 2 <if test="communityId !=null and communityId !=0">and community_id=#{communityId}</if>) settledOrder, |
| | | (select count(ding_money) as deductOrder from renting_hourse_pre_order where status = 1 <if test="communityId !=null and communityId !=0">and community_id=#{communityId}</if>) deductOrder ) |
| | | (select count(ding_money) as allOrder from renting_hourse_pre_order where 1=1 <if test="communityId !=null and communityId !=0">and community_id = #{communityId}</if> ) allOrder, |
| | | (select count(ding_money) as allRefuse from renting_hourse_pre_order where (status = 3 or status =4) <if test="communityId !=null and communityId !=0">and community_id = #{communityId}</if>) allRefuse, |
| | | (select count(*) as refuseNum from renting_hourse_pre_order where (status = 3 or status =4) <if test="communityId !=null and communityId !=0">and community_id = #{communityId}</if>) refuseNum, |
| | | (select count(ding_money) as settledOrder from renting_hourse_pre_order where status = 2 <if test="communityId !=null and communityId !=0">and community_id = #{communityId}</if>) settledOrder, |
| | | (select count(ding_money) as deductOrder from renting_hourse_pre_order where status = 1 <if test="communityId !=null and communityId !=0">and community_id = #{communityId}</if>) deductOrder ) |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | + "a.activity_time_begin,\n" + "a.activity_time_end,\n" + "a.enroll_time_begin,\n" + "a.cover,\n" |
| | | + "if(u.type=3 ,'管理员',u.name)createByName,\n" + "a.enroll_time_end \n" + "FROM\n" + "com_pb_activity a\n" |
| | | + "left join sys_user u on a.create_by=u.user_id \n" |
| | | + "where a.community_id=#{partyBuildingActivityVO.communityId}\n" |
| | | + "where a.community_id = #{partyBuildingActivityVO.communityId}\n" |
| | | + "<if test='partyBuildingActivityVO.name != null and partyBuildingActivityVO.name.trim() != ""'>" |
| | | + "and a.name = #{partyBuildingActivityVO.name} \n" + " </if> " |
| | | + "<if test='partyBuildingActivityVO.isAppliets != null and partyBuildingActivityVO.isAppliets==1'>" |
| | |
| | | * 社区id |
| | | * @return 社区名字 |
| | | */ |
| | | @Select("select name from com_act where community_id=#{communityId}") |
| | | @Select("select name from com_act where community_id = #{communityId}") |
| | | String selectCommunityNameByCommunityId(Long communityId); |
| | | } |
| | |
| | | + "m.activity_id =#{id}") |
| | | List<Long> selectAllPartyBuildingActivityMembers(Long id); |
| | | |
| | | @Select("select m.id from sys_user u join com_pb_member m on u.id_card=m.id_card and u.community_id=#{communityId} and u.user_id=#{userId} ") |
| | | @Select("select m.id from sys_user u join com_pb_member m on u.id_card=m.id_card and u.community_id = #{communityId} and u.user_id=#{userId} ") |
| | | Long selectMemberIdByUserId(@Param("userId") Long userId, @Param("communityId") Long communityId); |
| | | |
| | | @Select("select type from sys_user where user_id=#{createBy}") |
| | |
| | | + "DATE_FORMAT( NOW(), '%Y-%m-%d' )) partyAge,\n" + "m.join_time,\n" + "m.employment_time,\n" + "CASE\n" |
| | | + "WHEN u.id_card IS NULL THEN\n" + "'未注册' ELSE '已注册' \n" + "END STATUS \n" + "FROM\n" + "com_pb_member m\n" |
| | | + "LEFT JOIN sys_user u ON m.id_card = u.id_card\n" + "LEFT JOIN com_pb_org o ON m.org_id = o.id" |
| | | + " where m.community_id=#{pagePartyOrganizationVO.communityId} and m.audit_result='1' " |
| | | + " where m.community_id = #{pagePartyOrganizationVO.communityId} and m.audit_result='1' " |
| | | + "<if test='pagePartyOrganizationVO.orgName != null and pagePartyOrganizationVO.orgName != ""'>" |
| | | + "and o.name like concat(#{pagePartyOrganizationVO.orgName},'%') " + " </if> " |
| | | + "<if test='pagePartyOrganizationVO.orgId != null'>" + " and o.id = #{pagePartyOrganizationVO.orgId} " |
| | |
| | | public interface ComPbServiceTeamDAO extends BaseMapper<ComPbServiceTeamDO> { |
| | | |
| | | @Select("<script> " + "SELECT\n" + "* \n" + "FROM\n" + "com_pb_service_team \n" |
| | | + " where community_id=#{pageComPbServiceTeamDTO.communityId}" |
| | | + " where community_id = #{pageComPbServiceTeamDTO.communityId}" |
| | | + "<if test='pageComPbServiceTeamDTO.name != null and pageComPbServiceTeamDTO.name.trim() != ""'>" |
| | | + " and name LIKE concat( #{pageComPbServiceTeamDTO.name}, '%' ) \n" + " </if> " |
| | | + "<if test='pageComPbServiceTeamDTO.job != null and pageComPbServiceTeamDTO.job.trim() != ""'>" |
| | |
| | | ComPbServiceTeamDO selectComPbServiceTeamById(@Param("id") Long id); |
| | | |
| | | @Select("<script> " + "SELECT\n" + "* \n" + "FROM\n" + "com_pb_service_team \n" |
| | | + " where community_id=#{communityId}" + "<if test='param != null and param != ""'>" |
| | | + " where community_id = #{communityId}" + "<if test='param != null and param != ""'>" |
| | | + " and name LIKE concat( #{param}, '%' ) \n" + " </if> " + "</script>") |
| | | List<ComPbServiceTeamVO> getTotlePerson(@Param("param") String param, @Param("communityId") Long communityId); |
| | | } |
| | |
| | | |
| | | |
| | | <select id="pageOperLog" resultType="com.panzhihua.common.model.vos.user.SysOperLogVO"> |
| | | select * from sys_oper_log where community_id=#{sysOperLogVO.communityId} order by oper_time desc |
| | | select * from sys_oper_log where community_id = #{sysOperLogVO.communityId} order by oper_time desc |
| | | </select> |
| | | |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="selectComMngStructArea" resultType="com.panzhihua.common.model.vos.community.ComMngStructAreaVO"> |
| | | select a.id,a.community_id,a.area_name,address_detail from com_mng_struct_area a where a.community_id=#{communityId} |
| | | select a.id,a.community_id,a.area_name,address_detail from com_mng_struct_area a where a.community_id = #{communityId} |
| | | </select> |
| | | |
| | | <select id="specialUserExport" resultType="com.panzhihua.common.model.dtos.user.EexcelUserDTO"> |
| | |
| | | if(u.low_income_households=1,'是','否') lowIncomeHouseholds, if(u.low_income_people=1,'是','否') lowIncomePeople, |
| | | if(u.old_people=1,'是','否') oldPeople, if(u.special_service_family=1,'是','否') specialServiceFamily, |
| | | if(u.key_personnel=1,'是','否') keyPersonnel, u.tags FROM sys_user_input u JOIN com_mng_struct_area c ON u.area_id |
| | | = c.id where u.community_id=#{exportSpecialUserDTO.communityId} |
| | | = c.id where u.community_id = #{exportSpecialUserDTO.communityId} |
| | | <if |
| | | test='exportSpecialUserDTO.areaName != null and exportSpecialUserDTO.areaName.trim() != ""'> |
| | | AND |
| | |
| | | if(u.low_income_households=1,'是','否') lowIncomeHouseholds, if(u.low_income_people=1,'是','否') lowIncomePeople, |
| | | if(u.old_people=1,'是','否') oldPeople, if(u.special_service_family=1,'是','否') specialServiceFamily, |
| | | if(u.key_personnel=1,'是','否') keyPersonnel, u.tags FROM sys_user_input u where |
| | | u.community_id=#{exportUserDTO.communityId} |
| | | u.community_id = #{exportUserDTO.communityId} |
| | | <if |
| | | test='exportUserDTO.areaName != null and exportUserDTO.areaName.trim() != ""'>JOIN |
| | | com_mng_struct_area c ON u.area_id = c.id |
| | |
| | | <select id="indexDataCommunityBackstage" resultType="com.panzhihua.common.model.vos.IndexDataVO"> |
| | | SELECT |
| | | COUNT(DISTINCT u.user_id)allUser, |
| | | (select COUNT(m.id) from com_mng_volunteer_mng m where m.community_id=#{communityId} and m.`state`=2)volunteerUser, |
| | | (select COUNT(m.id) from com_mng_volunteer_mng m where m.community_id = #{communityId} and m.`state`=2)volunteerUser, |
| | | (select count(id) from com_pb_member cpm where cpm.audit_result = 1 and cpm.community_id = #{communityId}) partymemberUser, |
| | | COUNT(h.id)house |
| | | FROM |
| | |
| | | FROM |
| | | com_pb_member_role a |
| | | WHERE |
| | | a.phone = #{phone} and community_id=#{userCommunityId} |
| | | a.phone = #{phone} and community_id = #{userCommunityId} |
| | | </select> |
| | | |
| | | <select id="pageUserAppletsBackstage" resultType="com.panzhihua.common.model.vos.user.SysUserVO"> |
| | |
| | | and u.phone=#{pageUserAppletsBackstageDTO.phone} |
| | | </if> |
| | | <if test='pageUserAppletsBackstageDTO.communityId != null and pageUserAppletsBackstageDTO.communityId != 0'>and |
| | | u.community_id=#{pageUserAppletsBackstageDTO.communityId} |
| | | u.community_id = #{pageUserAppletsBackstageDTO.communityId} |
| | | </if> |
| | | <if test='pageUserAppletsBackstageDTO.status != null and pageUserAppletsBackstageDTO.status != 0'>and |
| | | u.status=#{pageUserAppletsBackstageDTO.status} |
| | |
| | | FROM |
| | | sys_user u LEFT JOIN sys_user_role ur ON u.user_id = ur.user_id |
| | | LEFT JOIN sys_role r ON ur.role_id = r.role_id |
| | | WHERE ur.role_id IS NOT NULL AND u.phone = #{phone} and r.community_id=#{userCommunityId} |
| | | WHERE ur.role_id IS NOT NULL AND u.phone = #{phone} and r.community_id = #{userCommunityId} |
| | | </select> |
| | | |
| | | <delete id="delGridMemberRelation"> |
| | |
| | | <if test='loginUserInfoVO.communityName != null and loginUserInfoVO.communityName.trim() != ""'> |
| | | AND c.`area_name` like concat(#{loginUserInfoVO.communityName},'%') |
| | | </if> |
| | | where u.face_state is not null and u.type=1 and u.community_id=#{loginUserInfoVO.communityId} |
| | | where u.face_state is not null and u.type=1 and u.community_id = #{loginUserInfoVO.communityId} |
| | | <if test='loginUserInfoVO.name != null and loginUserInfoVO.name.trim() != ""'> |
| | | and u.`name` like concat(#{loginUserInfoVO.name},'%') |
| | | </if> |
| | |
| | | FROM |
| | | com_pb_service_team a |
| | | WHERE |
| | | a.phone = #{phone} and community_id=#{userCommunityId} |
| | | a.phone = #{phone} and community_id = #{userCommunityId} |
| | | </select> |
| | | |
| | | <select id="selectExport" resultType="com.panzhihua.common.model.dtos.user.EexcelUserDTO"> |
| | |
| | | <if test='exportUserDTO.areaName != null and exportUserDTO.areaName.trim() != ""'>AND c.`area_name` |
| | | like concat(#{exportUserDTO.areaName},'%') |
| | | </if> |
| | | where u.community_id=#{exportUserDTO.communityId} and u.type=1 |
| | | where u.community_id = #{exportUserDTO.communityId} and u.type=1 |
| | | <if |
| | | test='exportUserDTO.name != null and exportUserDTO.name.trim() != ""'>and u.`name` like |
| | | concat(#{exportUserDTO.name},'%') |
| | |
| | | </update> |
| | | |
| | | <select id="selectCommunity" resultType="com.panzhihua.common.model.vos.community.ComActVO"> |
| | | select name from com_act where community_id=#{communityId} |
| | | select name from com_act where community_id = #{communityId} |
| | | </select> |
| | | |
| | | <delete id="delLcMember"> |