|
@@ -48,8 +48,6 @@ class ImportProduct extends Form
|
|
|
// 获取 base_product_image 表中与当前 base_product 相关的图片记录
|
|
|
$baseProductImages = BaseProductImage::where('product_id', $baseProduct->id)->get();
|
|
|
|
|
|
-
|
|
|
-
|
|
|
// 创建新的 DistProduct 记录
|
|
|
$distProduct = DistProduct::create([
|
|
|
'category_id' => $categoryId,
|
|
@@ -66,6 +64,8 @@ class ImportProduct extends Form
|
|
|
'dist_id' => getDistributorId(),
|
|
|
'created_at' => now(), // 自动填充创建时间
|
|
|
'updated_at' => now(), // 自动填充更新时间
|
|
|
+ 'status' => 2,
|
|
|
+ 'review_reply' => '',
|
|
|
]);
|
|
|
DistProduct::where('id', $distProduct->id)->update(['slug' => $distProduct->id]);
|
|
|
// 遍历 base_product_image 表中的记录,并插入到 dist_product_image 表中
|