From 5522f256331fb6dfdde26abba8cb528b9d96fdf0 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期六, 30 五月 2020 18:53:24 +0800
Subject: [PATCH] 优化小区成员加入报错

---
 CommunityService/src/main/java/com/java110/community/dao/impl/ServiceServiceDaoImpl.java |   73 +++++++++++++++++++++++++++++++++++-
 1 files changed, 70 insertions(+), 3 deletions(-)

diff --git a/CommunityService/src/main/java/com/java110/community/dao/impl/ServiceServiceDaoImpl.java b/CommunityService/src/main/java/com/java110/community/dao/impl/ServiceServiceDaoImpl.java
index 019f589..57c997a 100644
--- a/CommunityService/src/main/java/com/java110/community/dao/impl/ServiceServiceDaoImpl.java
+++ b/CommunityService/src/main/java/com/java110/community/dao/impl/ServiceServiceDaoImpl.java
@@ -1,9 +1,9 @@
 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.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
 import com.java110.community.dao.IServiceServiceDao;
 import com.java110.core.base.dao.BaseServiceDao;
 import org.slf4j.Logger;
@@ -127,4 +127,71 @@
     }
 
 
+    /**
+     * 鏈嶅姟淇℃伅灏佽
+     *
+     * @param businessServiceInfo 鏈嶅姟淇℃伅 灏佽
+     * @throws DAOException DAO寮傚父
+     */
+    @Override
+    public int saveServiceProvideInfo(Map businessServiceInfo) throws DAOException {
+        // 鏌ヨbusiness_user 鏁版嵁鏄惁宸茬粡瀛樺湪
+        logger.debug("淇濆瓨鏈嶅姟鎻愪緵淇℃伅 鍏ュ弬 saveServiceProvideInfo : {}", businessServiceInfo);
+        int saveFlag = sqlSessionTemplate.insert("serviceServiceDaoImpl.saveServiceProvideInfo", businessServiceInfo);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 鏌ヨ鏈嶅姟淇℃伅锛坕nstance锛�
+     *
+     * @param info bId 淇℃伅
+     * @return List<Map>
+     * @throws DAOException DAO寮傚父
+     */
+    @Override
+    public List<Map> getServiceProvideInfo(Map info) throws DAOException {
+        logger.debug("鏌ヨ鏈嶅姟淇℃伅 鍏ュ弬 info : {}", info);
+
+        List<Map> businessServiceInfos = sqlSessionTemplate.selectList("serviceServiceDaoImpl.getServiceProvideInfo", info);
+
+        return businessServiceInfos;
+    }
+
+
+    /**
+     * 淇敼鏈嶅姟淇℃伅
+     *
+     * @param info 淇敼淇℃伅
+     * @throws DAOException DAO寮傚父
+     */
+    @Override
+    public int updateServiceProvideInfo(Map info) throws DAOException {
+        logger.debug("淇敼鏈嶅姟淇℃伅Instance 鍏ュ弬 info : {}", info);
+
+        int saveFlag = sqlSessionTemplate.update("serviceServiceDaoImpl.updateServiceProvideInfo", info);
+
+        return saveFlag;
+    }
+
+    /**
+     * 鏌ヨ鏈嶅姟鏁伴噺
+     *
+     * @param info 鏈嶅姟淇℃伅
+     * @return 鏈嶅姟鏁伴噺
+     */
+    @Override
+    public int queryServiceProvidesCount(Map info) {
+        logger.debug("鏌ヨ鏈嶅姟鏁版嵁 鍏ュ弬 info : {}", info);
+
+        List<Map> businessServiceInfos = sqlSessionTemplate.selectList("serviceServiceDaoImpl.queryServiceProvidesCount", info);
+        if (businessServiceInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessServiceInfos.get(0).get("count").toString());
+    }
+
+
 }

--
Gitblit v1.8.0