Authored by mali

配置缓存时间

@@ -28,7 +28,7 @@ public class ConfigTypeServiceImpl implements IConfigTypeService { @@ -28,7 +28,7 @@ public class ConfigTypeServiceImpl implements IConfigTypeService {
28 28
29 @PostConstruct 29 @PostConstruct
30 private void init() { 30 private void init() {
31 - localCache.init(NormalConfigTypeList_CACHE_KEY, 2, TimeUnit.HOURS, (String s, Object o) -> { 31 + localCache.init(NormalConfigTypeList_CACHE_KEY, 5, TimeUnit.MINUTES, (String s, Object o) -> {
32 LOGGER.info("NormalConfigTypeList init s = {}, o = {}", s, o); 32 LOGGER.info("NormalConfigTypeList init s = {}, o = {}", s, o);
33 List<ConfigType> expressCompanies = configTypeMapper.selectAllNormal(); 33 List<ConfigType> expressCompanies = configTypeMapper.selectAllNormal();
34 return expressCompanies.stream().collect(Collectors.toMap(ConfigType::getCode,ConfigType::getContent)); 34 return expressCompanies.stream().collect(Collectors.toMap(ConfigType::getCode,ConfigType::getContent));