feat: 移除了商品标签文本的获取逻辑
This commit is contained in:
parent
a3531fd253
commit
c32ced1c0e
@ -205,12 +205,7 @@ class MerchantController extends BaseAdminController
|
|||||||
}
|
}
|
||||||
$data = Db::name('merchant_bind_goods')->where('mer_id', $mer_id)->page($page_no, $page_size)->select()->each(function ($item) {
|
$data = Db::name('merchant_bind_goods')->where('mer_id', $mer_id)->page($page_no, $page_size)->select()->each(function ($item) {
|
||||||
$item['goods_info'] = Goods::where('id', $item['goods_id'])->with(['className', 'brandName', 'unitName', 'warehouseName'])->findOrEmpty();
|
$item['goods_info'] = Goods::where('id', $item['goods_id'])->with(['className', 'brandName', 'unitName', 'warehouseName'])->findOrEmpty();
|
||||||
if (!empty($item['goods_info']['sys_labels'])) {
|
$item['goods_info']['sys_labels_text'] = '';
|
||||||
$goodslabel = GoodsLabel::where('id', 'in', trim($item['goods_info']['sys_labels'], ','))->column('name');
|
|
||||||
$item['goods_info']['sys_labels_text'] = implode(',', $goodslabel);
|
|
||||||
} else {
|
|
||||||
$item['goods_info']['sys_labels_text'] = '';
|
|
||||||
}
|
|
||||||
return $item;
|
return $item;
|
||||||
})->toArray();
|
})->toArray();
|
||||||
$count = Db::name('merchant_bind_goods')->where('mer_id', $mer_id)->count();
|
$count = Db::name('merchant_bind_goods')->where('mer_id', $mer_id)->count();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user