更新委托商品列表

This commit is contained in:
yaooo 2023-09-09 15:32:36 +08:00
parent 156da4fe35
commit 8156b3624c

View File

@ -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);
// type1发起的委托 2收到的委托
if ($type == 2) {
$merchantInfo = Db::name('merchant')->where('uid', $v['uid'])->find();