From 2f73a671db8bf132baaba12a5c2a9c3b611589e9 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期四, 01 八月 2019 17:14:26 +0800
Subject: [PATCH] 修复 添加房屋时的侦听 类修改

---
 CommunityService/src/main/java/com/java110/community/smo/impl/CommunityInnerServiceSMOImpl.java |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 51 insertions(+), 4 deletions(-)

diff --git a/CommunityService/src/main/java/com/java110/community/smo/impl/CommunityInnerServiceSMOImpl.java b/CommunityService/src/main/java/com/java110/community/smo/impl/CommunityInnerServiceSMOImpl.java
index fbb545c..e50cd2f 100644
--- a/CommunityService/src/main/java/com/java110/community/smo/impl/CommunityInnerServiceSMOImpl.java
+++ b/CommunityService/src/main/java/com/java110/community/smo/impl/CommunityInnerServiceSMOImpl.java
@@ -6,12 +6,16 @@
 import com.java110.core.base.smo.BaseServiceSMO;
 import com.java110.core.smo.community.ICommunityInnerServiceSMO;
 import com.java110.dto.CommunityMemberDto;
+import com.java110.dto.PageDto;
+import com.java110.dto.UserDto;
+import com.java110.dto.community.CommunityDto;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.HashMap;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
@@ -28,15 +32,58 @@
 
 
     @Override
-    public List<CommunityMemberDto> getCommunityMembers(CommunityMemberDto communityMemberDto) {
+    public List<CommunityMemberDto> getCommunityMembers(@RequestBody CommunityMemberDto communityMemberDto) {
 
         logger.debug("communityMemberDto锛歿}", JSONObject.toJSONString(communityMemberDto));
 
-        Map info = new HashMap();
-        List<Map> communityMembers = communityServiceDaoImpl.getCommunityMembers(BeanConvertUtil.covertBean(communityMemberDto, info));
+        //鏍¢獙鏄惁浼犱簡 鍒嗛〉淇℃伅
+
+        int page = communityMemberDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            communityMemberDto.setPage((page - 1) * communityMemberDto.getRow());
+            communityMemberDto.setRow(page * communityMemberDto.getRow());
+        }
+
+        List<Map> communityMembers = communityServiceDaoImpl.getCommunityMembers(BeanConvertUtil.beanCovertMap(communityMemberDto));
         return BeanConvertUtil.covertBeanList(communityMembers, CommunityMemberDto.class);
     }
 
+    @Override
+    public int getCommunityMemberCount(@RequestBody CommunityMemberDto communityMemberDto) {
+         logger.debug("getCommunityMemberCount锛歿}", JSONObject.toJSONString(communityMemberDto));
+
+        return communityServiceDaoImpl.getCommunityMemberCount(BeanConvertUtil.beanCovertMap(communityMemberDto));
+    }
+
+    @Override
+    public List<CommunityDto> queryCommunitys(@RequestBody  CommunityDto communityDto) {
+
+        //鏍¢獙鏄惁浼犱簡 鍒嗛〉淇℃伅
+
+        int page = communityDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            communityDto.setPage((page - 1) * communityDto.getRow());
+            communityDto.setRow(page * communityDto.getRow());
+        }
+
+        List<CommunityDto> communitys = BeanConvertUtil.covertBeanList(communityServiceDaoImpl.getCommunityInfoNew(BeanConvertUtil.beanCovertMap(communityDto)), CommunityDto.class);
+
+
+
+        return communitys;
+    }
+
+
+
+
+
+    @Override
+    public int queryCommunitysCount(@RequestBody CommunityDto communityDto) {
+        return communityServiceDaoImpl.queryCommunitysCount(BeanConvertUtil.beanCovertMap(communityDto));
+    }
+
     public ICommunityServiceDao getCommunityServiceDaoImpl() {
         return communityServiceDaoImpl;
     }

--
Gitblit v1.8.0