| | |
| | | import com.gkhy.fourierSpecialGasMonitor.commons.domain.Result; |
| | | import com.gkhy.fourierSpecialGasMonitor.commons.domain.SearchResult; |
| | | import com.gkhy.fourierSpecialGasMonitor.commons.enums.ResultCode; |
| | | import com.gkhy.fourierSpecialGasMonitor.commons.enums.SystemCacheKeyEnum; |
| | | import com.gkhy.fourierSpecialGasMonitor.commons.exception.BusinessException; |
| | | import com.gkhy.fourierSpecialGasMonitor.commons.model.PageQuery; |
| | | import com.gkhy.fourierSpecialGasMonitor.domain.account.entity.User; |
| | |
| | | gasCategoryMolecularFormulaRepeatlock.unlock(); |
| | | } |
| | | //清除redis缓存 |
| | | RBucket<List<GasCategory>> bucket = redissonClient.getBucket("gas_category_cache_info"); |
| | | RBucket<List<GasCategory>> bucket = redissonClient.getBucket(SystemCacheKeyEnum.KEY_GAS_CATEGORY.getKey()); |
| | | if (bucket.isExists()) { |
| | | bucket.delete(); |
| | | } |
| | |
| | | gasCategoryMolecularFormulaRepeatlock.unlock(); |
| | | } |
| | | //清除redis缓存 |
| | | RBucket<List<GasCategory>> bucket = redissonClient.getBucket("gas_category_cache_info"); |
| | | RBucket<List<GasCategory>> bucket = redissonClient.getBucket(SystemCacheKeyEnum.KEY_GAS_CATEGORY.getKey()); |
| | | if (bucket.isExists()) { |
| | | bucket.delete(); |
| | | } |
| | |
| | | @Override |
| | | public Result gasCategoryList() { |
| | | Result success = Result.success(); |
| | | RBucket<List<GasCategory>> bucket = redissonClient.getBucket("gas_category_cache_info"); |
| | | RBucket<List<GasCategory>> bucket = redissonClient.getBucket(SystemCacheKeyEnum.KEY_GAS_CATEGORY.getKey()); |
| | | List<GasCategory> categories = bucket.get(); |
| | | if (CollectionUtils.isEmpty(categories)){ |
| | | categories = gasCategoryRepository.findAll(); |