fix: 修复后台横幅关联产品分类提交
This commit is contained in:
@@ -187,10 +187,7 @@ class BannerItem
|
|||||||
|
|
||||||
// 更新关联的产品分类
|
// 更新关联的产品分类
|
||||||
if (!empty($put['rel_prod_cate_id'])) {
|
if (!empty($put['rel_prod_cate_id'])) {
|
||||||
$ok = SysBannerProdCateMappingModel::where('banner_item_id', '=', $id)->delete();
|
SysBannerProdCateMappingModel::where('banner_item_id', '=', $id)->delete();
|
||||||
if (!$ok) {
|
|
||||||
throw new InvalidOperateException('更新横幅与产品分类关联失败');
|
|
||||||
}
|
|
||||||
$mapping = SysBannerProdCateMappingModel::create([
|
$mapping = SysBannerProdCateMappingModel::create([
|
||||||
'banner_item_id' => $id,
|
'banner_item_id' => $id,
|
||||||
'product_category_id' => $put['rel_prod_cate_id']
|
'product_category_id' => $put['rel_prod_cate_id']
|
||||||
|
|||||||
Reference in New Issue
Block a user