feat: 添加对不存在商品信息的过滤

This commit is contained in:
mkm 2024-07-25 14:20:34 +08:00
parent de036da9fb
commit f132fb7f9b

View File

@ -910,6 +910,7 @@ class WorkbenchLogic extends BaseLogic
->select()->toArray();
foreach ($list as $key => &$item) {
$find = StoreProduct::where('id', $item['product_id'])->field('store_name,image')->find();
if(!$find) continue;
$item['store_name'] = $find['store_name'];
$item['image'] = $find['image'];
if ($item['profit'] == null) $item['profit'] = 0;