From 05683f2b2bdbdbe21cf17ad523c21ab338bd1c54 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期二, 19 七月 2022 21:49:55 +0800
Subject: [PATCH] 优化添加设备 功能
---
service-fee/src/main/java/com/java110/fee/dao/impl/TempCarFeeConfigServiceDaoImpl.java | 69 ++++++++++++++++++++++------------
1 files changed, 45 insertions(+), 24 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..37dc1db
--- 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 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 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