From b784175e978b0fcfca8ca8bed7953ae4eacf49e8 Mon Sep 17 00:00:00 2001
From: shiyj <1098226878@qq.com>
Date: 星期一, 02 九月 2019 20:18:58 +0800
Subject: [PATCH] Merge branch 'master' of https://github.com/java110/MicroCommunity
---
CommunityService/src/main/java/com/java110/community/dao/impl/CommunityServiceDaoImpl.java | 63 ++++++++++++++++++++++++++++++-
1 files changed, 61 insertions(+), 2 deletions(-)
diff --git a/CommunityService/src/main/java/com/java110/community/dao/impl/CommunityServiceDaoImpl.java b/CommunityService/src/main/java/com/java110/community/dao/impl/CommunityServiceDaoImpl.java
index eec2a33..a7b65bf 100644
--- a/CommunityService/src/main/java/com/java110/community/dao/impl/CommunityServiceDaoImpl.java
+++ b/CommunityService/src/main/java/com/java110/community/dao/impl/CommunityServiceDaoImpl.java
@@ -4,8 +4,8 @@
import com.java110.common.constant.ResponseConstant;
import com.java110.common.exception.DAOException;
import com.java110.common.util.DateUtil;
-import com.java110.core.base.dao.BaseServiceDao;
import com.java110.community.dao.ICommunityServiceDao;
+import com.java110.core.base.dao.BaseServiceDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
@@ -21,7 +21,7 @@
//@Transactional
public class CommunityServiceDaoImpl extends BaseServiceDao implements ICommunityServiceDao {
- private final static Logger logger = LoggerFactory.getLogger(CommunityServiceDaoImpl.class);
+ private static Logger logger = LoggerFactory.getLogger(CommunityServiceDaoImpl.class);
/**
* 灏忓尯淇℃伅灏佽
@@ -406,4 +406,63 @@
throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "淇敼灏忓尯鎴愬憳鍔犲叆淇℃伅Instance鏁版嵁澶辫触锛�" + JSONObject.toJSONString(info));
}
}
+
+ /**
+ * @param info bId 淇℃伅
+ * @return
+ * @throws DAOException
+ */
+ @Override
+ public List<Map> getCommunityMembers(Map info) throws DAOException {
+ logger.debug("鏌ヨ灏忓尯鎴愬憳鍔犲叆淇℃伅 鍏ュ弬 info : {}", info);
+
+ List<Map> memberCommunitys = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityMember", info);
+
+ return memberCommunitys;
+ }
+
+ @Override
+ public int getCommunityMemberCount(Map info) {
+ logger.debug("鏌ヨ灏忓尯鎴愬憳鍔犲叆淇℃伅 鍏ュ弬 info : {}", info);
+
+ List<Map> memberCommunitys = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityMemberCount", info);
+
+ if (memberCommunitys.size() < 1) {
+ return 0;
+ }
+
+ return Integer.parseInt(memberCommunitys.get(0).get("count").toString());
+ }
+
+ /**
+ * 鏌ヨ灏忓尯淇℃伅锛坕nstance锛�
+ * @param info bId 淇℃伅
+ * @return List<Map>
+ * @throws DAOException DAO寮傚父
+ */
+ @Override
+ public List<Map> getCommunityInfoNew(Map info) throws DAOException {
+ logger.debug("鏌ヨ灏忓尯淇℃伅 鍏ュ弬 info : {}",info);
+
+ List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityInfoNew",info);
+
+ return businessCommunityInfos;
+ }
+
+ /**
+ * 鏌ヨ灏忓尯鏁伴噺
+ * @param info 灏忓尯淇℃伅
+ * @return 灏忓尯鏁伴噺
+ */
+ @Override
+ public int queryCommunitysCount(Map info) {
+ logger.debug("鏌ヨ灏忓尯鏁版嵁 鍏ュ弬 info : {}",info);
+
+ List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityServiceDaoImpl.queryCommunitysCount", info);
+ if (businessCommunityInfos.size() < 1) {
+ return 0;
+ }
+
+ return Integer.parseInt(businessCommunityInfos.get(0).get("count").toString());
+ }
}
--
Gitblit v1.8.0