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

---
 RuleService/src/main/java/com/java110/rule/dao/impl/RuleDaoImpl.java |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/RuleService/src/main/java/com/java110/rule/dao/impl/RuleDaoImpl.java b/RuleService/src/main/java/com/java110/rule/dao/impl/RuleDaoImpl.java
index 6688101..19dc3f1 100644
--- a/RuleService/src/main/java/com/java110/rule/dao/impl/RuleDaoImpl.java
+++ b/RuleService/src/main/java/com/java110/rule/dao/impl/RuleDaoImpl.java
@@ -1,12 +1,14 @@
 package com.java110.rule.dao.impl;
 
-import com.java110.common.constant.RuleDomain;
-import com.java110.common.util.SerializeUtil;
+import com.java110.utils.constant.RuleDomain;
+import com.java110.utils.util.SerializeUtil;
 import com.java110.core.base.dao.BaseServiceDao;
 import com.java110.entity.rule.Rule;
 import com.java110.entity.rule.RuleCondCfg;
 import com.java110.entity.rule.RuleEntrance;
 import com.java110.rule.dao.IRuleDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -22,6 +24,7 @@
 @Service("ruleDaoImpl")
 @Transactional
 public class RuleDaoImpl extends BaseServiceDao implements IRuleDao {
+    private final static Logger logger = LoggerFactory.getLogger(RuleDaoImpl.class);
 
 
     @Override
@@ -67,7 +70,7 @@
     @Cacheable(key=RuleDomain.REDIS_KEY_RULE_ENTRANCE)
     public Map<String, RuleEntrance> getRuleEntranceMap() throws Exception {
 
-        Jedis jedis = jedisPool.getResource();
+        Jedis jedis = getJedis();
 
         Map map = new HashMap();
 
@@ -102,7 +105,7 @@
     public List getRuleGroupRelaList() throws Exception {
         List saopRuleGroupRelaList = new ArrayList();
 
-        Jedis jedis = jedisPool.getResource();
+        Jedis jedis = getJedis();
 
         if(jedis.exists(RuleDomain.REDIS_KEY_RULE_ENTRANCE.getBytes())){
             saopRuleGroupRelaList =  SerializeUtil.unserializeList(jedis.get(RuleDomain.REDIS_KEY_RULE_GROUP.getBytes()),Map.class);
@@ -168,7 +171,7 @@
     @Cacheable(key=RuleDomain.REDIS_KEY_RULE)
     public Map<String, Rule> getRuleMap() throws Exception {
 
-        Jedis jedis = jedisPool.getResource();
+        Jedis jedis = getJedis();
 
         List<Rule> ruleList = null;
 

--
Gitblit v1.8.0