|
@@ -10,7 +10,6 @@
|
|
|
|
|
|
|
|
package com.yami.shop.service.impl;
|
|
package com.yami.shop.service.impl;
|
|
|
|
|
|
|
|
-import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -27,12 +26,10 @@ import com.yami.shop.bean.vo.ListCategoryForUserVO;
|
|
|
import com.yami.shop.bean.vo.ListCategoryVO;
|
|
import com.yami.shop.bean.vo.ListCategoryVO;
|
|
|
import com.yami.shop.common.config.Constant;
|
|
import com.yami.shop.common.config.Constant;
|
|
|
import com.yami.shop.common.exception.GlobalException;
|
|
import com.yami.shop.common.exception.GlobalException;
|
|
|
-import com.yami.shop.config.ShopConfig;
|
|
|
|
|
import com.yami.shop.dao.*;
|
|
import com.yami.shop.dao.*;
|
|
|
import com.yami.shop.service.CategoryService;
|
|
import com.yami.shop.service.CategoryService;
|
|
|
import com.yami.shop.service.SysConfigService;
|
|
import com.yami.shop.service.SysConfigService;
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
|
-import org.apache.poi.ss.usermodel.*;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
@@ -44,8 +41,6 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
-import static java.util.stream.Collectors.groupingBy;
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* @author LGH
|
|
* @author LGH
|
|
|
*/
|
|
*/
|
|
@@ -54,7 +49,6 @@ import static java.util.stream.Collectors.groupingBy;
|
|
|
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements CategoryService {
|
|
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements CategoryService {
|
|
|
|
|
|
|
|
private final CategoryMapper categoryMapper;
|
|
private final CategoryMapper categoryMapper;
|
|
|
- private final ShopConfig shopConfig;
|
|
|
|
|
|
|
|
|
|
private final CategoryBrandMapper categoryBrandMapper;
|
|
private final CategoryBrandMapper categoryBrandMapper;
|
|
|
|
|
|
|
@@ -86,7 +80,6 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> i
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
-// @CacheEvict(cacheNames = "CategoryListByParentIdAndShopId", key = "#category.parentId + ':' + #category.shopId")
|
|
|
|
|
@Caching(evict = {
|
|
@Caching(evict = {
|
|
|
@CacheEvict(cacheNames = "CategoryListByParentIdAndShopId", key = "#category.parentId + ':' + #category.shopId"),
|
|
@CacheEvict(cacheNames = "CategoryListByParentIdAndShopId", key = "#category.parentId + ':' + #category.shopId"),
|
|
|
@CacheEvict(cacheNames = "CategoryListByShopId", key = "#category.shopId + ':category'")
|
|
@CacheEvict(cacheNames = "CategoryListByShopId", key = "#category.shopId + ':category'")
|