From 8156b3624c1be1d59233eb6c0f4c80f62638310c Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Sat, 9 Sep 2023 15:32:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=A7=94=E6=89=98=E5=95=86?= =?UTF-8?q?=E5=93=81=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/community/Community.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index 002f35ae..10439922 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -777,9 +777,10 @@ class Community extends BaseController $queryBuilder->where('c.mer_status', 2); } $count = $queryBuilder->count(); - $list = $queryBuilder->setOption('field', [])->field(['c.community_id', 'c.uid', 'c.title', 'c.image', 'c.entrust_mer_id', 'm.credit_buy', 'm.settle_cycle', 'm.interest_rate', 'm.mer_name', 'm.mer_avatar', 'c.mer_status', 'c.entrust_order_id', 'c.entrust_finish'])->order('c.community_id', 'desc')->page($page, $limit)->fetchSql(false)->select(); + $list = $queryBuilder->setOption('field', [])->field(['c.community_id', 'c.uid', 'c.title', 'c.image', 'c.entrust_mer_id', 'm.credit_buy', 'm.settle_cycle', 'm.interest_rate', 'm.mer_name', 'm.mer_avatar', 'c.mer_status', 'c.entrust_order_id', 'c.entrust_finish', 'c.entrust_start_date'])->order('c.community_id', 'desc')->page($page, $limit)->fetchSql(false)->select(); if ($list) $list = $list->toArray(); foreach($list as $k => $v) { + $list[$k]['entrust_day'] = Db::name('entrust')->where('community_id', $v['community_id'])->value('entrust_day', 0); // type:1发起的委托 2收到的委托 if ($type == 2) { $merchantInfo = Db::name('merchant')->where('uid', $v['uid'])->find();