From ef8d16fc6e88df10350273f8d1f05c939b868e11 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 29 Jun 2020 18:09:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E5=85=85?= =?UTF-8?q?=E5=80=BC=E6=8D=A2=E6=A6=9C=E5=AE=9A=E6=97=B6=E5=99=A8=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/TimingController.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Application/Admin/Controller/TimingController.class.php b/Application/Admin/Controller/TimingController.class.php index e12f7b5af..c7bbd2ef9 100644 --- a/Application/Admin/Controller/TimingController.class.php +++ b/Application/Admin/Controller/TimingController.class.php @@ -622,6 +622,11 @@ class TimingController extends AdminController { $promote_data=array_unique($promote_data); sort($promote_data); + if(!$promote_data) { + echo "没有数据"; + die(); + } + $chain_data = M("promote","tab_") ->field("id") ->where(['chain'=>'/','id'=>['in',$promote_data]]) From 3128c079d3ea0c0de2d1747da193934c81a72142 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 29 Jun 2020 18:25:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E5=85=85?= =?UTF-8?q?=E5=80=BC=E6=8D=A2=E6=A6=9C=E5=AE=9A=E6=97=B6=E5=99=A8=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/TimingController.class.php | 7 ++++++- Data/update.sql | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/TimingController.class.php b/Application/Admin/Controller/TimingController.class.php index c7bbd2ef9..aa475884e 100644 --- a/Application/Admin/Controller/TimingController.class.php +++ b/Application/Admin/Controller/TimingController.class.php @@ -609,14 +609,17 @@ class TimingController extends AdminController { public function shiftPromoteStatistics() { - $data = M("shift_task")->where(['status'=>0,'type'=>2])->select(); + $data = M("shift_task")->where(['change_status'=>0,'type'=>2])->select(); $promote_data = []; + $change_id = []; + foreach ($data as $key => $value) { $promote_data[] = $value['from_promote_id']; $promote_data[] = $value['to_promote_id']; + $change_id[] = $value['id']; } $promote_data=array_unique($promote_data); @@ -655,6 +658,8 @@ class TimingController extends AdminController { $this->PromoteStatistics($data); + + M("shift_task")->where(['id'=>['in',$change_id]])->save(['change_status'=>1]); // dump($data); // dump(array_unique($chain_data_secord)); diff --git a/Data/update.sql b/Data/update.sql index c7f53a724..cc019140b 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -2071,3 +2071,6 @@ INSERT INTO `tab_service_agreement` (`id`, `name`, `content`, `status`, `creator ALTER TABLE `tab_company_info` ADD COLUMN `ali_account` varchar(128) NULL COMMENT '支付宝账号' AFTER `last_up_time`, ADD COLUMN `fax_ratio` varchar(20) NULL COMMENT '开票税率' AFTER `ali_account`; + +ALTER TABLE `sys_shift_task` +ADD COLUMN `change_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '推广员充值换榜执行状态 0 未处理 1 已处理' AFTER `status`; \ No newline at end of file