fix(store_product): 修复商品恢复功能

- 在恢复商品时,使用 withTrashed() 方法确保软删除的商品也能被更新
- 这个修改确保了商品及其关联的分店商品记录都能正确地恢复
This commit is contained in:
mkm 2025-03-03 15:12:49 +08:00
parent 8a8c7116fa
commit c9e57c85b8

View File

@ -306,7 +306,7 @@ class StoreProductLogic extends BaseLogic
throw new BusinessException('数据不存在');
}
$res = $data->restore();
StoreBranchProduct::where('product_id', $params['id'])->update(['delete_time' => null]);
StoreBranchProduct::where('product_id', $params['id'])->withTrashed()->update(['delete_time' => null]);
return $res;
}