From dbf04c25c5665468ffaa4ebfaf2742353ac18ddb Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 14 Jan 2020 20:48:55 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PromoteController.class.php | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index 4fe8c80d9..e08f08cdb 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -232,20 +232,20 @@ class PromoteController extends BaseController $this->assign("rules", $rules); $this->assign("rules_count", count($rules)); -// $redis = new \Org\RedisSDK\Redis(['host'=>'127.0.0.1','port'=>6379],[]); -// $cacheKey = "pop:rule:set"; -// if (!$redis->sIsMember($cacheKey, get_pid())) { -// $currentTime = strtotime(date('Y-m-d')); -// $weekArray = [7,1,2,3,4,5,6]; -// $week = $weekArray[date("w")]; -// $match_rules = M("document_pop_rules") -// ->field('id') -// ->where("(type = 1 and pop_time = {$currentTime}) or (type = 2 and pop_time = {$week})") -// ->order("sort asc, id desc") -// ->select(); -// } else { -// $match_rules = []; -// } + $redis = new \Org\RedisSDK\Redis(['host'=>'127.0.0.1','port'=>6379],[]); + $cacheKey = "pop:rule:set"; + if (!$redis->sIsMember($cacheKey, get_pid())) { + $currentTime = strtotime(date('Y-m-d')); + $weekArray = [7,1,2,3,4,5,6]; + $week = $weekArray[date("w")]; + $match_rules = M("document_pop_rules") + ->field('id') + ->where("(type = 1 and pop_time = {$currentTime}) or (type = 2 and pop_time = {$week})") + ->order("sort asc, id desc") + ->select(); + } else { + $match_rules = []; + } $this->assign("match_rules_id", $match_rules ? json_encode(array_column($match_rules, 'id')) : 'null'); From b7dd9c5b45866242fad7ab595573e611700fe761 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 14 Jan 2020 20:56:20 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E7=AE=A1=E7=90=86--?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/View/default/Finance/withdrawRecord.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/View/default/Finance/withdrawRecord.html b/Application/Home/View/default/Finance/withdrawRecord.html index 88b4d3225..d604fb0bf 100644 --- a/Application/Home/View/default/Finance/withdrawRecord.html +++ b/Application/Home/View/default/Finance/withdrawRecord.html @@ -237,7 +237,7 @@