瀏覽代碼

小区机构

lin 4 年之前
父節點
當前提交
055ffc4e83

+ 2 - 1
src/main/java/com/zoniot/ccrc/controller/system/CommunityManagerController.java

@@ -72,10 +72,11 @@ public class CommunityManagerController {
 			@ApiParam(value = "省", required = false) @RequestParam(required = false) Integer province,
 			@ApiParam(value = "市", required = false) @RequestParam(required = false) Integer city,
 			@ApiParam(value = "区", required = false) @RequestParam(required = false) Integer region,
+			@ApiParam(value = "机构", required = false) @RequestParam(required = false) Integer orgId,
 			@ApiParam(value = "页数,非必传,默认第一页", required = false, defaultValue = "1") @RequestParam(required = false, defaultValue = "1") int pageNum,
 			@ApiParam(value = "条数,非必传,默认15条", required = false, defaultValue = "15") @RequestParam(required = false, defaultValue = "15") int pageSize
 	) {
-		Pagination<CommunityDto> pageInfo = communityService.getCommunityPage(StringUtils.trim(communityName), province, city, region, pageNum, pageSize);
+		Pagination<CommunityDto> pageInfo = communityService.getCommunityPage(StringUtils.trim(communityName), province, city, region,orgId, pageNum, pageSize);
 		return new AjaxMessage<>(ResultStatus.OK, pageInfo);
 	}
 

+ 1 - 1
src/main/java/com/zoniot/ccrc/dao/CommunityMapper.java

@@ -31,7 +31,7 @@ public interface CommunityMapper {
 
     int findByNameUnique(@Param("siteId") Integer siteId, @Param("id") Integer id, @Param("province") Integer province, @Param("city") Integer city, @Param("region") Integer region, @Param("name") String name);
 
-    List<CommunityDto> getList(@Param("siteId") Integer siteId, @Param("customerId") Integer customerId, @Param("communityName") String communityName, @Param("province") Integer province, @Param("city") Integer city, @Param("region") Integer region);
+    List<CommunityDto> getList(@Param("siteId") Integer siteId, @Param("customerId") Integer customerId, @Param("communityName") String communityName, @Param("province") Integer province, @Param("city") Integer city, @Param("region") Integer region, @Param("orgId") Integer orgId);
 
     Community findByName(@Param("siteId") Integer siteId, @Param("communityName") String communityName);
 

+ 1 - 1
src/main/java/com/zoniot/ccrc/service/CommunityService.java

@@ -23,7 +23,7 @@ public interface CommunityService {
 
     List<CommunityDto> queryCommunity(Community community);
 
-    Pagination<CommunityDto> getCommunityPage(@Param("communityName") String communityName, @Param("province") Integer province, @Param("city") Integer city, @Param("region") Integer region, @Param("pageNum") int pageNum, @Param("pageSize") int pageSize);
+    Pagination<CommunityDto> getCommunityPage(String communityName,  Integer province, Integer city,  Integer region,Integer orgId,  int pageNum,  int pageSize);
 
     void addCommunity(@Param("communityDto") CommunityDto communityDto);
 

+ 2 - 2
src/main/java/com/zoniot/ccrc/service/impl/CommunityServiceImpl.java

@@ -118,11 +118,11 @@ public class CommunityServiceImpl implements CommunityService {
     }
 
     @Override
-    public Pagination<CommunityDto> getCommunityPage(String communityName, Integer province, Integer city, Integer region, int pageNum, int pageSize) {
+    public Pagination<CommunityDto> getCommunityPage(String communityName, Integer province, Integer city, Integer region,Integer orgId, int pageNum, int pageSize) {
         LoginUser loginUser = UserUtil.getCurrentUser();
 
         PageHelper.startPage(pageNum, pageSize);
-        List<CommunityDto> list = communityMapper.getList(loginUser.getSiteId(), null, communityName, province, city, region);
+        List<CommunityDto> list = communityMapper.getList(loginUser.getSiteId(), null, communityName, province, city, region, orgId);
         return new Pagination<>(list);
 
     }

+ 1 - 0
src/main/resources/mapper/CommunityMapper.xml

@@ -417,6 +417,7 @@
         <if test="province != null"> and sc.province = #{province}</if>
         <if test="city != null"> and sc.city = #{city}</if>
         <if test="region != null"> and sc.region = #{region}</if>
+        <if test="orgId != null"> and sc.org_id = #{orgId}</if>
         order by sc.date_create desc
     </select>
     <select id="findByNameUnique" resultType="java.lang.Integer">