diff --git a/api/controllers/plan/Order.php b/api/controllers/plan/Order.php index 33bffecd..8bc3cde2 100644 --- a/api/controllers/plan/Order.php +++ b/api/controllers/plan/Order.php @@ -482,10 +482,20 @@ class Order extends CI_Controller{ public function send_aggs_biz_ding_piao_rpt(){ $params = $this->input->get(); $hour = date('H.i'); - if ( !($hour == 17.50 || $hour == 23.00 || $params['sd'])) { + if ( !($hour >= 17.50 && $hour <= 18.0 || $hour >= 23.00 && $hour >= 23.10 || $params['sd'])) { return false; } + $redis = &load_cache('redis'); + $redisKey = 'send_aggs_biz_ding_piao_rpt'; + if (intval($this->input->get('rds'))) { + $redis->delete($redisKey); + } + if ($redis->get($redisKey)){ + return false; + }; + #$redis->save($redisKey, 1, 60 * 10); # 暂不考虑“执行时间过长时重复执行” + $today_start = $today_end = $total_start = $total_end = $title_today = $title_ding_today = $title_ding = $title_piao_today = $title_piao = ''; if ($params['test']){ $today_start = "2021-12-01 00:00:00"; @@ -547,6 +557,7 @@ class Order extends CI_Controller{ $res[] = $res_send; } + $redis->save($redisKey, 1, 60 * 10); $res['img_path'] = $img_path; $res['image_key'] = $image_key; if ($params['sd']) {