From 797863acd9393fd3bf4a35e0e24280caf731b524 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 17 Aug 2023 17:57:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8F=91=E5=B8=83=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/community/Community.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index e101d90a..7018cae2 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -499,8 +499,8 @@ class Community extends BaseController $queryBuilder->where('c.status', 1); } $count = $queryBuilder->count(); - $list = $queryBuilder->field('c.community_id, c.title, c.image')->group('c.community_id')->order('c.community_id', 'desc')->page($page, $limit)->fetchSql(true)->select(); - return app('json')->success(compact('count','list')); + $list = $queryBuilder->setOption('field', [])->field(['c.community_id', 'c.title', 'c.image', 'c.resale_type', 'SUM(`r`.`number` * `r`.`price`) AS total_price'])->group('c.community_id')->order('c.community_id', 'desc')->page($page, $limit)->fetchSql(false)->select(); + return app('json')->success(compact('count', 'list')); } }