From a8fb7eca74fb0851750a04e4088cc3da5e0448f6 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Wed, 6 Dec 2023 12:04:47 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=95=B0=E6=8D=AE=E4=B9=8B=E7=9C=BC-?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=95=86=E5=93=81/=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=EF=BC=8C=E5=9C=B0=E6=96=B9=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E7=BB=9F=E8=AE=A1=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/dataview/Order.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controller/api/dataview/Order.php b/app/controller/api/dataview/Order.php index c5b811be..bfb769b9 100755 --- a/app/controller/api/dataview/Order.php +++ b/app/controller/api/dataview/Order.php @@ -411,7 +411,8 @@ class Order extends BaseController $merchantRankingTotal += $v['total_sales']; } - // 统计每个镇的商品数 + // 统计每个镇的商品数. + $townProductCount = 0; $townProductCountList = []; $geoStreetList = Db::name('geo_street')->field('street_name, street_code')->where('area_code',$this->areaCode)->select()->toArray(); foreach ($geoStreetList as $k => $street) { @@ -420,7 +421,8 @@ class Order extends BaseController ->where('m.street_id', $street['street_code']) ->count(); $townProductCountList[] = $street; + $townProductCount += $street['product_count']; } - return \app('json')->success(compact('productRankingTotal','productRankingList', 'merchantRankingTotal','merchantRankingList', 'townProductCountList')); + return \app('json')->success(compact('productRankingTotal','productRankingList', 'merchantRankingTotal','merchantRankingList', 'townProductCount','townProductCountList')); } } \ No newline at end of file