满减活动问题
分类Pid问题
This commit is contained in:
@@ -89,13 +89,14 @@ public class ShopProdCategoryServiceImpl extends ServiceImpl<ShopProdCategoryMap
|
||||
|
||||
@Override
|
||||
public void updateShopProdCategory(ShopProdCategoryDTO dto) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
dto.setShopId(shopId);
|
||||
boolean exists = super.exists(query().eq(ShopProdCategory::getName, dto.getName()).eq(ShopProdCategory::getShopId, shopId).ne(ShopProdCategory::getId, dto.getId()));
|
||||
if (exists) {
|
||||
throw new CzgException("商品分类已存在");
|
||||
}
|
||||
ShopProdCategory entity = BeanUtil.copyProperties(dto, ShopProdCategory.class);
|
||||
entity.setPid(0L);
|
||||
super.updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user