From 3b884802a934ee8e32a98e90272a9ea8d942cb32 Mon Sep 17 00:00:00 2001 From: dengbw Date: Thu, 18 Aug 2022 17:53:43 +0800 Subject: [PATCH] order_818_2 --- admin/controllers/stats/Order.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/admin/controllers/stats/Order.php b/admin/controllers/stats/Order.php index 42e5eae8..f0c4c905 100644 --- a/admin/controllers/stats/Order.php +++ b/admin/controllers/stats/Order.php @@ -46,12 +46,15 @@ class order extends HD_Controller $month = date('n', strtotime($v . '-01')); $days[$v] = ['month' => $month, 'num' => 0]; } - $bizs = [1 => ['biz_name' => '宁德哪吒品牌店', 'ids' => '70', 'rowspan' => 1], 2 => ['biz_name' => '宁德哪吒代理店', 'city_id' => '350900'] - , 3 => ['biz_name' => '厦门哪吒订单中心', 'city_id' => '350200'], 4 => ['biz_name' => '泉州哪吒代理店', 'city_id' => '350500']]; + $bizs = [1 => ['biz_name' => '宁德哪吒品牌店', 'ids' => '70', 'rowspan' => 1], 2 => ['biz_name' => '宁德哪吒代理店', 'type' => 3, 'city_id' => '350900'] + , 3 => ['biz_name' => '厦门哪吒订单中心', 'city_id' => '350200'], 4 => ['biz_name' => '泉州哪吒订单中心', 'city_id' => '350500'] + , 5 => ['biz_name' => '福州哪吒订单中心', 'city_id' => '350100']]; foreach ($bizs as $k => $v) { $str_ids = $v['ids'] ? $v['ids'] : ''; if (!$str_ids) { - $res = $this->mdBiz->select(['status' => 1, 'type' => 3, 'city_id' => $v['city_id']], 'id desc', 0, 0, 'id'); + $where_b = ['status' => 1, 'city_id' => $v['city_id']]; + $v['type'] && $where_b['type'] = $v['type']; + $res = $this->mdBiz->select($where_b, 'id desc', 0, 0, 'id'); if ($res) { $str_ids = implode(',', array_unique(array_column($res, 'id'))); $str_ids = $str_ids ? $str_ids : '-1';