From 7bec493ac791dd45f2057727d4ea616078a8ceb0 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Tue, 19 Dec 2023 15:34:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E6=88=B7=20=E5=90=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/dataview/Merchant.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controller/api/dataview/Merchant.php b/app/controller/api/dataview/Merchant.php index 6fb40ac9..4ef0e5e9 100644 --- a/app/controller/api/dataview/Merchant.php +++ b/app/controller/api/dataview/Merchant.php @@ -138,7 +138,7 @@ class Merchant extends BaseController ->field(\think\facade\Db::raw('sum(A.product_num) as total,A.product_id,cart_info')) ->whereBetweenTime('B.pay_time', $startDate, $endDate) ->where('B.mer_id', $merId) - ->where('B.paid', 1)->group('A.product_id')->limit(30)->order('total DESC')->select(); + ->where('B.paid', 1)->group('A.product_id')->limit(30)->order('total DESC')->fetchSql()->select(); $totalCount = 0; foreach ($list as $item) { $totalCount += $item['total']; @@ -168,7 +168,7 @@ class Merchant extends BaseController ->join('Merchant C', 'C.mer_id = B.mer_id') ->field(\think\facade\Db::raw('count(A.type_id) as total,B.image,B.store_name')) ->whereBetweenTime('A.create_time', $startDate, $endDate) - ->where('A.type', 'product')->where('B.mer_id', $merId)->group('A.type_id')->order('total DESC') + ->where('A.type', 'product')->where('B.mer_id', $merId)->group('A.type_id')->order('total DESC')->fetchSql() ->limit(30)->select(); $totalCount = 0; foreach ($list as $item) { @@ -200,7 +200,7 @@ class Merchant extends BaseController ->whereBetweenTime('B.create_time', $startDate, $endDate) ->where('A.mer_id', $merId) ->where('B.product_type', 0)->where('B.is_pay', 0)->where('B.is_del', 0) - ->where('B.is_new', 0)->where('B.is_fail', 0)->group('A.product_id')->limit(30)->order('total DESC')->select(); + ->where('B.is_new', 0)->where('B.is_fail', 0)->group('A.product_id')->limit(30)->order('total DESC')->fetchSql()->select(); $totalCount = 0; foreach ($list as $item) { $totalCount += $item['total'];