From 47cceb8bb2d80e3dabe2baa33c20e53561774f3a Mon Sep 17 00:00:00 2001 From: ztt <835303992@qq.com> Date: Thu, 7 Mar 2024 17:05:01 +0800 Subject: [PATCH] 1 --- app/api/model/Goods.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/api/model/Goods.php b/app/api/model/Goods.php index 2e0525af..95a54449 100644 --- a/app/api/model/Goods.php +++ b/app/api/model/Goods.php @@ -708,8 +708,9 @@ class Goods extends GoodsModel return false; } //批量修改秒杀价格 - $sku_ids = explode(',', $data['sku_id']); - foreach ($sku_ids as $sku_id) { +// var_dump($data['sku_id']); + $sku_id = $data['sku_id']; +// foreach ($sku_ids as $sku_id) { $skuData = GoodsSkuModel::get(['id' => $sku_id,'goods_id' => $data['goods_id']]); if ($skuData) { $up_data = [ @@ -721,7 +722,7 @@ class Goods extends GoodsModel ]; $skuData->save($up_data); } - } +// } return true; } }