From 32f47c162b6638a186135ae1267c870233ec21f9 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期三, 02 八月 2023 16:59:36 +0800
Subject: [PATCH] redis封装

---
 third_data/code_plate_key_manager.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/third_data/code_plate_key_manager.py b/third_data/code_plate_key_manager.py
index a34dc57..1107151 100644
--- a/third_data/code_plate_key_manager.py
+++ b/third_data/code_plate_key_manager.py
@@ -92,7 +92,7 @@
     # 浠婃棩娑ㄥ仠鍘熷洜鍙樺寲
     def set_today_limit_up_reason_change(self, code, from_reason, to_reason):
         RedisUtils.sadd(self.__get_redis(), f"kpl_limit_up_reason_his-{code}", from_reason)
-        self.__get_redis().expire(f"kpl_limit_up_reason_his-{code}", tool.get_expire())
+        RedisUtils.expire(self.__get_redis(), f"kpl_limit_up_reason_his-{code}", tool.get_expire())
         self.__set_total_keys(code)
 
     # 璁剧疆浠g爜鐨勪粖鏃ユ定鍋滃師鍥�
@@ -267,7 +267,7 @@
         reasons = self.__history_limit_up_reason_dict.get(code)
         if reasons is None:
             # 浠庡唴瀛樹腑鍔犺浇
-            val = self.__get_redis().get(f"kpl_his_limit_up_reason-{code}")
+            val = RedisUtils.get(self.__get_redis(), f"kpl_his_limit_up_reason-{code}")
             if val is not None:
                 val = set(json.loads(val))
                 self.__history_limit_up_reason_dict[code] = val
@@ -286,7 +286,7 @@
         reasons = self.__blocks_dict.get(code)
         if reasons is None:
             # 浠庡唴瀛樹腑鍔犺浇
-            val = self.__get_redis().get(f"kpl_blocks-{code}")
+            val = RedisUtils.get(self.__get_redis(), f"kpl_blocks-{code}")
             if val is not None:
                 val = set(json.loads(val))
                 self.__blocks_dict[code] = val

--
Gitblit v1.8.0