|  |  | 
 |  |  | import doumeemes.core.utils.excel.EasyExcelUtil; | 
 |  |  | import doumeemes.core.utils.redis.RedisUtil; | 
 |  |  | import doumeemes.dao.business.CategoryMapper; | 
 |  |  | import doumeemes.dao.business.CategoryUnionMapper; | 
 |  |  | import doumeemes.dao.business.model.Category; | 
 |  |  | import doumeemes.dao.business.model.CategoryUnion; | 
 |  |  | import doumeemes.service.business.CategoryService; | 
 |  |  | import doumeemes.service.ext.CategoryExtService; | 
 |  |  | import org.apache.commons.lang3.StringUtils; | 
 |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private RedisTemplate<String, Object> redisTemplate; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private CategoryUnionMapper categoryUnionMapper; | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public synchronized String  getNextCode(Integer comId ){ | 
 |  |  |         String prefix =  "FL-" + DateUtil.getDate(new Date(),"yyyyMMdd") +"-"; | 
 |  |  | 
 |  |  |         UpdateWrapper<Category> deleteWrapper = new UpdateWrapper<>(category); | 
 |  |  |         categoryMapper.delete(deleteWrapper); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Transactional(rollbackFor = {Exception.class,BusinessException.class}) | 
 |  |  |     @Override | 
 |  |  |     public void deleteCategory(Integer id) { | 
 |  |  |         Category category = this.findById(Integer.valueOf(id)); | 
 |  |  |         category.setDeleted(Constants.ONE); | 
 |  |  |         updateById(category); | 
 |  |  |  | 
 |  |  |         UpdateWrapper<CategoryUnion> wrapper = new UpdateWrapper<>(); | 
 |  |  |         wrapper.lambda() | 
 |  |  |                 .eq(CategoryUnion::getCateBigId,id) | 
 |  |  |                 .isNull(CategoryUnion::getCateMiddleId) | 
 |  |  |                 .isNull(CategoryUnion::getCateSmallId) | 
 |  |  |                 .set(CategoryUnion::getDeleted,Constants.ONE); | 
 |  |  |         categoryUnionMapper.update(null,wrapper); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public void deleteByIdInBatch(List<Integer> ids) { | 
 |  |  | 
 |  |  |         QueryWrapper<Category> wrapper = new QueryWrapper<>(category); | 
 |  |  |         return categoryMapper.selectList(wrapper); | 
 |  |  |     } | 
 |  |  |    | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public PageData<Category> findPage(PageWrap<Category> pageWrap) { | 
 |  |  |         IPage<Category> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |