From b09e1a8b036553d1e161d127aa738a504593490a Mon Sep 17 00:00:00 2001
From: mrzcc <121184950@qq.com>
Date: 星期三, 19 二月 2020 12:14:55 +0800
Subject: [PATCH] 优化巡检路线查询sql

---
 CommunityService/src/main/java/com/java110/community/dao/impl/CommunityServiceDaoImpl.java |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 51 insertions(+), 4 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 a9976df..cfff047 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,9 +1,10 @@
 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.dto.community.CommunityAttrDto;
+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;
@@ -431,5 +432,51 @@
             return 0;
         }
 
-        return Integer.parseInt(memberCommunitys.get(0).get("count").toString());    }
+        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());
+    }
+
+    @Override
+    public int getCommunityAttrsCount(Map info) {
+        logger.debug("鏌ヨ灏忓尯鏁版嵁 鍏ュ弬 info : {}",info);
+
+        List<Map> businessCommunityInfos = sqlSessionTemplate.selectList("communityServiceDaoImpl.getCommunityAttrsCount", info);
+        if (businessCommunityInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessCommunityInfos.get(0).get("count").toString());
+    }
+
 }

--
Gitblit v1.8.0