From f39cd4d82c3952f8587ebff9a7e8ede73b46bcda Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期四, 30 五月 2019 00:40:32 +0800
Subject: [PATCH] Merge branch 'master' of https://github.com/java110/MicroCommunity

---
 CommunityService/src/main/java/com/java110/community/smo/impl/CommunityInnerServiceSMOImpl.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 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 d55881d..45db324 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,6 +6,7 @@
 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 org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -32,12 +33,21 @@
 
         logger.debug("communityMemberDto锛歿}", JSONObject.toJSONString(communityMemberDto));
 
+        //鏍¢獙鏄惁浼犱簡 鍒嗛〉淇℃伅
+
+        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(CommunityMemberDto communityMemberDto) {
+    public int getCommunityMemberCount(@RequestBody CommunityMemberDto communityMemberDto) {
          logger.debug("getCommunityMemberCount锛歿}", JSONObject.toJSONString(communityMemberDto));
 
         return communityServiceDaoImpl.getCommunityMemberCount(BeanConvertUtil.beanCovertMap(communityMemberDto));

--
Gitblit v1.8.0