From 4c68289b0ae81e994147430b6ad62e2a4ef908d6 Mon Sep 17 00:00:00 2001
From: 吴学文 <wuxuewen@wuxuewendeMacBook-Pro.local>
Date: 星期五, 24 五月 2019 21:33:20 +0800
Subject: [PATCH] 加入eureka docker-compose 管理
---
CommunityService/src/main/java/com/java110/community/smo/impl/CommunityInnerServiceSMOImpl.java | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 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 880e783..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,13 +6,13 @@
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;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -33,11 +33,26 @@
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));
+ }
+
public ICommunityServiceDao getCommunityServiceDaoImpl() {
return communityServiceDaoImpl;
}
--
Gitblit v1.8.0