From bdfb519e59d7119dcf5835a4b6ebd6c4d2006470 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期一, 16 十二月 2019 18:33:13 +0800
Subject: [PATCH] 合并代码

---
 CommunityService/src/main/java/com/java110/community/dao/impl/CommunityServiceDaoImpl.java |   69 ++++++++++++++++++++++++++++++++--
 1 files changed, 64 insertions(+), 5 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..634cdb0 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
@@ -1,11 +1,11 @@
 package com.java110.community.dao.impl;
 
 import com.alibaba.fastjson.JSONObject;
-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.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
 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