|  |  | 
 |  |  | import org.springframework.data.redis.core.RedisTemplate; | 
 |  |  | import org.springframework.scheduling.annotation.Async; | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  | import org.springframework.transaction.annotation.Transactional; | 
 |  |  | import org.springframework.util.CollectionUtils; | 
 |  |  |  | 
 |  |  | import java.util.List; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     @Async | 
 |  |  |     public   void dealCateParamSelect() { | 
 |  |  |     @Transactional | 
 |  |  |     public  void dealCateParamSelect() { | 
 |  |  |         LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); | 
 |  |  |         Boolean  isGrouping = (Boolean)redisTemplate.opsForValue().get(loginUserInfo.getCompanyId()+Constants.CATE_PARAM_OPEN); | 
 |  |  |         if(isGrouping!=null && isGrouping ){ | 
 |  |  | 
 |  |  |             //新增当前企业可以使用的数据 | 
 |  |  |             cateParamSelectMapper.insertBatch(loginUserInfo.getCompanyId(),loginUserInfo.getId()); | 
 |  |  |         }catch (Exception e){ | 
 |  |  |  | 
 |  |  |             e.printStackTrace(); | 
 |  |  |         }finally { | 
 |  |  |             redisTemplate.opsForValue().set(loginUserInfo.getCompanyId()+Constants.CATE_PARAM_OPEN,false); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | } |