From e52ddfe8caf7d0027950033a5aff2a1fd3482e9d Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期三, 01 六月 2022 17:50:25 +0800
Subject: [PATCH] 优化装修 跟踪记录 回显

---
 service-user/src/main/java/com/java110/user/dao/impl/OwnerAttrServiceDaoImpl.java |   63 +++++++++++++++++++------------
 1 files changed, 38 insertions(+), 25 deletions(-)

diff --git a/service-user/src/main/java/com/java110/user/dao/impl/OwnerAttrServiceDaoImpl.java b/service-user/src/main/java/com/java110/user/dao/impl/OwnerAttrServiceDaoImpl.java
old mode 100644
new mode 100755
index c0adeae..4595e9a
--- a/service-user/src/main/java/com/java110/user/dao/impl/OwnerAttrServiceDaoImpl.java
+++ b/service-user/src/main/java/com/java110/user/dao/impl/OwnerAttrServiceDaoImpl.java
@@ -1,15 +1,14 @@
 package com.java110.user.dao.impl;
 
 import com.alibaba.fastjson.JSONObject;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.user.dao.IOwnerAttrServiceDao;
 import com.java110.utils.constant.ResponseConstant;
 import com.java110.utils.exception.DAOException;
 import com.java110.utils.util.DateUtil;
-import com.java110.core.base.dao.BaseServiceDao;
-import com.java110.user.dao.IOwnerAttrServiceDao;
 import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import com.java110.core.log.LoggerFactory;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
 import java.util.Map;
@@ -26,6 +25,7 @@
 
     /**
      * 涓氫富灞炴�т俊鎭皝瑁�
+     *
      * @param businessOwnerAttrInfo 涓氫富灞炴�т俊鎭� 灏佽
      * @throws DAOException DAO寮傚父
      */
@@ -33,17 +33,18 @@
     public void saveBusinessOwnerAttrInfo(Map businessOwnerAttrInfo) throws DAOException {
         businessOwnerAttrInfo.put("month", DateUtil.getCurrentMonth());
         // 鏌ヨbusiness_user 鏁版嵁鏄惁宸茬粡瀛樺湪
-        logger.debug("淇濆瓨涓氫富灞炴�т俊鎭� 鍏ュ弬 businessOwnerAttrInfo : {}",businessOwnerAttrInfo);
-        int saveFlag = sqlSessionTemplate.insert("ownerAttrServiceDaoImpl.saveBusinessOwnerAttrInfo",businessOwnerAttrInfo);
+        logger.debug("淇濆瓨涓氫富灞炴�т俊鎭� 鍏ュ弬 businessOwnerAttrInfo : {}", businessOwnerAttrInfo);
+        int saveFlag = sqlSessionTemplate.insert("ownerAttrServiceDaoImpl.saveBusinessOwnerAttrInfo", businessOwnerAttrInfo);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"淇濆瓨涓氫富灞炴�ф暟鎹け璐ワ細"+ JSONObject.toJSONString(businessOwnerAttrInfo));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "淇濆瓨涓氫富灞炴�ф暟鎹け璐ワ細" + JSONObject.toJSONString(businessOwnerAttrInfo));
         }
     }
 
 
     /**
      * 鏌ヨ涓氫富灞炴�т俊鎭�
+     *
      * @param info bId 淇℃伅
      * @return 涓氫富灞炴�т俊鎭�
      * @throws DAOException DAO寮傚父
@@ -51,43 +52,44 @@
     @Override
     public List<Map> getBusinessOwnerAttrInfo(Map info) throws DAOException {
 
-        logger.debug("鏌ヨ涓氫富灞炴�т俊鎭� 鍏ュ弬 info : {}",info);
+        logger.debug("鏌ヨ涓氫富灞炴�т俊鎭� 鍏ュ弬 info : {}", info);
 
-        List<Map> businessOwnerAttrInfos = sqlSessionTemplate.selectList("ownerAttrServiceDaoImpl.getBusinessOwnerAttrInfo",info);
+        List<Map> businessOwnerAttrInfos = sqlSessionTemplate.selectList("ownerAttrServiceDaoImpl.getBusinessOwnerAttrInfo", info);
 
         return businessOwnerAttrInfos;
     }
 
 
-
     /**
      * 淇濆瓨涓氫富灞炴�т俊鎭� 鍒� instance
-     * @param info   bId 淇℃伅
+     *
+     * @param info bId 淇℃伅
      * @throws DAOException DAO寮傚父
      */
     @Override
     public void saveOwnerAttrInfoInstance(Map info) throws DAOException {
-        logger.debug("淇濆瓨涓氫富灞炴�т俊鎭疘nstance 鍏ュ弬 info : {}",info);
+        logger.debug("淇濆瓨涓氫富灞炴�т俊鎭疘nstance 鍏ュ弬 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.insert("ownerAttrServiceDaoImpl.saveOwnerAttrInfoInstance",info);
+        int saveFlag = sqlSessionTemplate.insert("ownerAttrServiceDaoImpl.saveOwnerAttrInfoInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"淇濆瓨涓氫富灞炴�т俊鎭疘nstance鏁版嵁澶辫触锛�"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "淇濆瓨涓氫富灞炴�т俊鎭疘nstance鏁版嵁澶辫触锛�" + JSONObject.toJSONString(info));
         }
     }
 
 
     /**
      * 鏌ヨ涓氫富灞炴�т俊鎭紙instance锛�
+     *
      * @param info bId 淇℃伅
      * @return List<Map>
      * @throws DAOException DAO寮傚父
      */
     @Override
     public List<Map> getOwnerAttrInfo(Map info) throws DAOException {
-        logger.debug("鏌ヨ涓氫富灞炴�т俊鎭� 鍏ュ弬 info : {}",info);
+        logger.debug("鏌ヨ涓氫富灞炴�т俊鎭� 鍏ュ弬 info : {}", info);
 
-        List<Map> businessOwnerAttrInfos = sqlSessionTemplate.selectList("ownerAttrServiceDaoImpl.getOwnerAttrInfo",info);
+        List<Map> businessOwnerAttrInfos = sqlSessionTemplate.selectList("ownerAttrServiceDaoImpl.getOwnerAttrInfo", info);
 
         return businessOwnerAttrInfos;
     }
@@ -95,28 +97,31 @@
 
     /**
      * 淇敼涓氫富灞炴�т俊鎭�
+     *
      * @param info 淇敼淇℃伅
      * @throws DAOException DAO寮傚父
      */
     @Override
-    public void updateOwnerAttrInfoInstance(Map info) throws DAOException {
-        logger.debug("淇敼涓氫富灞炴�т俊鎭疘nstance 鍏ュ弬 info : {}",info);
+    public int updateOwnerAttrInfoInstance(Map info) throws DAOException {
+        logger.debug("淇敼涓氫富灞炴�т俊鎭疘nstance 鍏ュ弬 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.update("ownerAttrServiceDaoImpl.updateOwnerAttrInfoInstance",info);
+        int saveFlag = sqlSessionTemplate.update("ownerAttrServiceDaoImpl.updateOwnerAttrInfoInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"淇敼涓氫富灞炴�т俊鎭疘nstance鏁版嵁澶辫触锛�"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "淇敼涓氫富灞炴�т俊鎭疘nstance鏁版嵁澶辫触锛�" + JSONObject.toJSONString(info));
         }
+        return saveFlag;
     }
 
-     /**
+    /**
      * 鏌ヨ涓氫富灞炴�ф暟閲�
+     *
      * @param info 涓氫富灞炴�т俊鎭�
      * @return 涓氫富灞炴�ф暟閲�
      */
     @Override
     public int queryOwnerAttrsCount(Map info) {
-        logger.debug("鏌ヨ涓氫富灞炴�ф暟鎹� 鍏ュ弬 info : {}",info);
+        logger.debug("鏌ヨ涓氫富灞炴�ф暟鎹� 鍏ュ弬 info : {}", info);
 
         List<Map> businessOwnerAttrInfos = sqlSessionTemplate.selectList("ownerAttrServiceDaoImpl.queryOwnerAttrsCount", info);
         if (businessOwnerAttrInfos.size() < 1) {
@@ -126,5 +131,13 @@
         return Integer.parseInt(businessOwnerAttrInfos.get(0).get("count").toString());
     }
 
+    @Override
+    public int saveOwnerAttr(Map beanCovertMap) {
+        logger.debug("淇濆瓨涓氫富灞炴�т俊鎭� 鍏ュ弬 info : {}", beanCovertMap);
+
+        int saveFlag = sqlSessionTemplate.insert("ownerAttrServiceDaoImpl.saveOwnerAttr", beanCovertMap);
+        return saveFlag;
+    }
+
 
 }

--
Gitblit v1.8.0