From 3835848b28f3cf605aa1fbda443024ee11740493 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期一, 10 五月 2021 11:54:14 +0800
Subject: [PATCH] 优化代码

---
 service-fee/src/main/java/com/java110/fee/dao/impl/TempCarFeeConfigServiceDaoImpl.java |   67 ++++++++++++++++++++++-----------
 1 files changed, 44 insertions(+), 23 deletions(-)

diff --git a/service-fee/src/main/java/com/java110/fee/dao/impl/TempCarFeeConfigServiceDaoImpl.java b/service-fee/src/main/java/com/java110/fee/dao/impl/TempCarFeeConfigServiceDaoImpl.java
old mode 100644
new mode 100755
index 553a798..a2af142
--- a/service-fee/src/main/java/com/java110/fee/dao/impl/TempCarFeeConfigServiceDaoImpl.java
+++ b/service-fee/src/main/java/com/java110/fee/dao/impl/TempCarFeeConfigServiceDaoImpl.java
@@ -1,15 +1,14 @@
 package com.java110.fee.dao.impl;
 
 import com.alibaba.fastjson.JSONObject;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.fee.dao.ITempCarFeeConfigServiceDao;
 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.fee.dao.ITempCarFeeConfigServiceDao;
 import org.slf4j.Logger;
 import org.slf4j.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 businessTempCarFeeConfigInfo 涓存椂杞︽敹璐规爣鍑嗕俊鎭� 灏佽
      * @throws DAOException DAO寮傚父
      */
@@ -33,17 +33,18 @@
     public void saveBusinessTempCarFeeConfigInfo(Map businessTempCarFeeConfigInfo) throws DAOException {
         businessTempCarFeeConfigInfo.put("month", DateUtil.getCurrentMonth());
         // 鏌ヨbusiness_user 鏁版嵁鏄惁宸茬粡瀛樺湪
-        logger.debug("淇濆瓨涓存椂杞︽敹璐规爣鍑嗕俊鎭� 鍏ュ弬 businessTempCarFeeConfigInfo : {}",businessTempCarFeeConfigInfo);
-        int saveFlag = sqlSessionTemplate.insert("tempCarFeeConfigServiceDaoImpl.saveBusinessTempCarFeeConfigInfo",businessTempCarFeeConfigInfo);
+        logger.debug("淇濆瓨涓存椂杞︽敹璐规爣鍑嗕俊鎭� 鍏ュ弬 businessTempCarFeeConfigInfo : {}", businessTempCarFeeConfigInfo);
+        int saveFlag = sqlSessionTemplate.insert("tempCarFeeConfigServiceDaoImpl.saveBusinessTempCarFeeConfigInfo", businessTempCarFeeConfigInfo);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"淇濆瓨涓存椂杞︽敹璐规爣鍑嗘暟鎹け璐ワ細"+ JSONObject.toJSONString(businessTempCarFeeConfigInfo));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "淇濆瓨涓存椂杞︽敹璐规爣鍑嗘暟鎹け璐ワ細" + JSONObject.toJSONString(businessTempCarFeeConfigInfo));
         }
     }
 
 
     /**
      * 鏌ヨ涓存椂杞︽敹璐规爣鍑嗕俊鎭�
+     *
      * @param info bId 淇℃伅
      * @return 涓存椂杞︽敹璐规爣鍑嗕俊鎭�
      * @throws DAOException DAO寮傚父
@@ -51,43 +52,44 @@
     @Override
     public List<Map> getBusinessTempCarFeeConfigInfo(Map info) throws DAOException {
 
-        logger.debug("鏌ヨ涓存椂杞︽敹璐规爣鍑嗕俊鎭� 鍏ュ弬 info : {}",info);
+        logger.debug("鏌ヨ涓存椂杞︽敹璐规爣鍑嗕俊鎭� 鍏ュ弬 info : {}", info);
 
-        List<Map> businessTempCarFeeConfigInfos = sqlSessionTemplate.selectList("tempCarFeeConfigServiceDaoImpl.getBusinessTempCarFeeConfigInfo",info);
+        List<Map> businessTempCarFeeConfigInfos = sqlSessionTemplate.selectList("tempCarFeeConfigServiceDaoImpl.getBusinessTempCarFeeConfigInfo", info);
 
         return businessTempCarFeeConfigInfos;
     }
 
 
-
     /**
      * 淇濆瓨涓存椂杞︽敹璐规爣鍑嗕俊鎭� 鍒� instance
-     * @param info   bId 淇℃伅
+     *
+     * @param info bId 淇℃伅
      * @throws DAOException DAO寮傚父
      */
     @Override
     public void saveTempCarFeeConfigInfoInstance(Map info) throws DAOException {
-        logger.debug("淇濆瓨涓存椂杞︽敹璐规爣鍑嗕俊鎭疘nstance 鍏ュ弬 info : {}",info);
+        logger.debug("淇濆瓨涓存椂杞︽敹璐规爣鍑嗕俊鎭疘nstance 鍏ュ弬 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.insert("tempCarFeeConfigServiceDaoImpl.saveTempCarFeeConfigInfoInstance",info);
+        int saveFlag = sqlSessionTemplate.insert("tempCarFeeConfigServiceDaoImpl.saveTempCarFeeConfigInfoInstance", 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> getTempCarFeeConfigInfo(Map info) throws DAOException {
-        logger.debug("鏌ヨ涓存椂杞︽敹璐规爣鍑嗕俊鎭� 鍏ュ弬 info : {}",info);
+        logger.debug("鏌ヨ涓存椂杞︽敹璐规爣鍑嗕俊鎭� 鍏ュ弬 info : {}", info);
 
-        List<Map> businessTempCarFeeConfigInfos = sqlSessionTemplate.selectList("tempCarFeeConfigServiceDaoImpl.getTempCarFeeConfigInfo",info);
+        List<Map> businessTempCarFeeConfigInfos = sqlSessionTemplate.selectList("tempCarFeeConfigServiceDaoImpl.getTempCarFeeConfigInfo", info);
 
         return businessTempCarFeeConfigInfos;
     }
@@ -95,28 +97,30 @@
 
     /**
      * 淇敼涓存椂杞︽敹璐规爣鍑嗕俊鎭�
+     *
      * @param info 淇敼淇℃伅
      * @throws DAOException DAO寮傚父
      */
     @Override
     public void updateTempCarFeeConfigInfoInstance(Map info) throws DAOException {
-        logger.debug("淇敼涓存椂杞︽敹璐规爣鍑嗕俊鎭疘nstance 鍏ュ弬 info : {}",info);
+        logger.debug("淇敼涓存椂杞︽敹璐规爣鍑嗕俊鎭疘nstance 鍏ュ弬 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.update("tempCarFeeConfigServiceDaoImpl.updateTempCarFeeConfigInfoInstance",info);
+        int saveFlag = sqlSessionTemplate.update("tempCarFeeConfigServiceDaoImpl.updateTempCarFeeConfigInfoInstance", 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));
         }
     }
 
-     /**
+    /**
      * 鏌ヨ涓存椂杞︽敹璐规爣鍑嗘暟閲�
+     *
      * @param info 涓存椂杞︽敹璐规爣鍑嗕俊鎭�
      * @return 涓存椂杞︽敹璐规爣鍑嗘暟閲�
      */
     @Override
     public int queryTempCarFeeConfigsCount(Map info) {
-        logger.debug("鏌ヨ涓存椂杞︽敹璐规爣鍑嗘暟鎹� 鍏ュ弬 info : {}",info);
+        logger.debug("鏌ヨ涓存椂杞︽敹璐规爣鍑嗘暟鎹� 鍏ュ弬 info : {}", info);
 
         List<Map> businessTempCarFeeConfigInfos = sqlSessionTemplate.selectList("tempCarFeeConfigServiceDaoImpl.queryTempCarFeeConfigsCount", info);
         if (businessTempCarFeeConfigInfos.size() < 1) {
@@ -127,4 +131,21 @@
     }
 
 
+
+    @Override
+    public List<Map> queryTempCarFeeRules(Map info) {
+        logger.debug("鏌ヨ涓存椂杞︽敹璐硅鍒欎俊鎭� 鍏ュ弬 info : {}", info);
+
+        List<Map> businessTempCarFeeConfigInfos = sqlSessionTemplate.selectList("tempCarFeeConfigServiceDaoImpl.queryTempCarFeeRules", info);
+
+        return businessTempCarFeeConfigInfos;
+    }
+    @Override
+    public List<Map> queryTempCarFeeRuleSpecs(Map info) {
+        logger.debug("鏌ヨ涓存椂杞︽敹璐硅鍒欒鏍间俊鎭� 鍏ュ弬 info : {}", info);
+
+        List<Map> businessTempCarFeeConfigInfos = sqlSessionTemplate.selectList("tempCarFeeConfigServiceDaoImpl.queryTempCarFeeRuleSpecs", info);
+
+        return businessTempCarFeeConfigInfos;
+    }
 }

--
Gitblit v1.8.0