ztt 9 months ago
parent a39cf3ab75
commit 47cceb8bb2
  1. 7
      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;
}
}

Loading…
Cancel
Save