From 8a524787c88a9128cc69af890d4181a01aad0e8c Mon Sep 17 00:00:00 2001
From: 吴学文 <wuxuewen@wuxuewendeMacBook-Pro.local>
Date: 星期六, 06 七月 2019 23:09:33 +0800
Subject: [PATCH] 修改代码生成器生成的app 加入user_id 的问题
---
CommunityService/src/main/java/com/java110/community/dao/impl/CommunityServiceDaoImpl.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 46 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 19e9734..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;
@@ -408,7 +408,6 @@
}
/**
- *
* @param info bId 淇℃伅
* @return
* @throws DAOException
@@ -421,4 +420,49 @@
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