From 54e40d24083cd835aa845ee5c855e28818772ee3 Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Fri, 24 Mar 2023 09:35:08 +0800 Subject: [PATCH] edit-plan-syt-subscribemsg --- api/controllers/plan/Syt.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api/controllers/plan/Syt.php b/api/controllers/plan/Syt.php index b19beb1e..bac62890 100644 --- a/api/controllers/plan/Syt.php +++ b/api/controllers/plan/Syt.php @@ -41,7 +41,12 @@ class Syt extends CI_Controller $size = $this->input->get('size'); !$size && $size = 10; $this->load->model('market/market_sylive_subscribemsg_model', 'mdSytSubscribemsg'); - $date = date('Y-m-d H:i:s', strtotime('+10 minute'));//提前10分钟发送 + $count = $this->mdSytSubscribemsg->count(['status'=>0]); + if($count>5000){ + $date = date('Y-m-d H:i:s', strtotime('+10 minute'));//提前10分钟发送 + }else{ + $date = date('Y-m-d H:i:s'); + } $where['timeStart<='] = $date; $where['status'] = 0; $count = $this->mdSytSubscribemsg->count($where);