分类修改问题修复
This commit is contained in:
parent
64e180d293
commit
23deb53971
@ -1,6 +1,6 @@
|
||||
package com.suisung.mall.shop.base.controller.admin;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.suisung.mall.common.api.CommonResult;
|
||||
import com.suisung.mall.common.modules.base.ShopBaseProductCategory;
|
||||
@ -107,6 +107,18 @@ public class ShopBaseProductCategoryController {
|
||||
return CommonResult.failed("商品分类不存在");
|
||||
}
|
||||
oldShopBaseProductCategory.setStore_id(oldShopBaseProductCategory.getStore_id());
|
||||
if(ObjectUtil.equals(oldShopBaseProductCategory.getType_id(), 0)){
|
||||
oldShopBaseProductCategory.setCategory_name(shopBaseProductCategory.getCategory_name());
|
||||
oldShopBaseProductCategory.setCategory_image(shopBaseProductCategory.getCategory_image());
|
||||
oldShopBaseProductCategory.setType_id(shopBaseProductCategory.getType_id());
|
||||
oldShopBaseProductCategory.setCategory_virtual_enable(shopBaseProductCategory.getCategory_virtual_enable());
|
||||
oldShopBaseProductCategory.setCategory_commission_rate(shopBaseProductCategory.getCategory_commission_rate());
|
||||
oldShopBaseProductCategory.setPage_id(shopBaseProductCategory.getPage_id());
|
||||
oldShopBaseProductCategory.setCategory_order(shopBaseProductCategory.getCategory_order());
|
||||
}else {
|
||||
oldShopBaseProductCategory.setCategory_order(shopBaseProductCategory.getCategory_order());
|
||||
}
|
||||
return CommonResult.success(shopBaseProductCategoryService.editCategory(oldShopBaseProductCategory));
|
||||
}
|
||||
|
||||
return CommonResult.success(shopBaseProductCategoryService.editCategory(shopBaseProductCategory));
|
||||
|
||||
1
sql/shop/dev/20250714_ddl.sql
Normal file
1
sql/shop/dev/20250714_ddl.sql
Normal file
@ -0,0 +1 @@
|
||||
alter table shop_base_product_category modify `type_id` mediumint unsigned NOT NULL DEFAULT '0' COMMENT '商品类型编号';
|
||||
Loading…
Reference in New Issue
Block a user