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();