wesmiler hai 6 días
pai
achega
63bc39652a
Modificáronse 1 ficheiros con 1 adicións e 12 borrados
  1. 1 12
      app/Services/Common/GoodsService.php

+ 1 - 12
app/Services/Common/GoodsService.php

@@ -641,15 +641,11 @@ class GoodsService extends BaseService
 
         if ($id) {
             // 获取商品基本信息(使用关联查询)
-            $goods = $this->model->with(['store', 'category', 'skus'])
+            $goods = $this->model->with(['category', 'skus'])
                 ->where(['id' => $id, 'mark' => 1])
                 ->first();
 
             if ($goods) {
-                // 数据隔离:商户用户只能查看自己的商品
-                if ($storeId > 0 && $goods->store_id != $storeId) {
-                    return message('无权查看此商品', false);
-                }
 
                 $info = $goods->toArray();
 
@@ -671,13 +667,6 @@ class GoodsService extends BaseService
                     $info['category_name'] = '未分类';
                 }
 
-                // 获取商家信息
-                if (isset($info['store']) && !empty($info['store'])) {
-                    $info['store_name'] = $info['store']['name'] ?? '平台商品';
-                } else {
-                    $info['store_name'] = $info['store_id'] > 0 ? '未知商家' : '平台商品';
-                }
-
                 // 添加状态文本
                 $info['status_text'] = $this->getStatusText($info['status'] ?? 1);
             }