修改活动商品库存的错误

This commit is contained in:
luofei 2024-01-26 11:37:25 +08:00
parent 2dd1348c37
commit eb30849646
2 changed files with 3 additions and 2 deletions

View File

@ -95,7 +95,9 @@ class StoreActivityDao extends BaseDao
if (isset($oldProductList[$v['product']['old_product_id']])) {
$list[$k]['product']['stock'] = $oldProductList[$v['product']['old_product_id']]['stock'];
$list[$k]['stock'] = $oldProductList[$v['product']['old_product_id']]['stock'];
$list[$k]['product']['image'] = $list[$k]['product']->sellOutImage;
if ($list[$k]['stock'] < 1) {
$list[$k]['product']['image'] = $list[$k]['product']->sellOutImage;
}
}
}
if ($value['product_id'] == $v['product_id']) {

View File

@ -1290,7 +1290,6 @@ class ProductRepository extends BaseRepository
$sku = $this->detailAttrValue($attrValue, $userInfo, $productType, $activityId);
if ($activityId == 2 && isset($oldProduct['stock'])) {
$res['stock'] = $oldProduct['stock'];
$res['slider_image'] = $res->sellOutImage;
foreach ($sku as &$skuItem) {
$skuItem['stock'] = $oldProduct['stock'];
}