...
|
...
|
@@ -33,11 +33,13 @@ class RecallConfigSortBrandService { |
|
|
|
|
|
@PostConstruct
|
|
|
void init() {
|
|
|
schedule.scheduleAtFixedRate(() -> loadConfigSortBrands(), 0, 1, TimeUnit.MINUTES);
|
|
|
schedule.scheduleAtFixedRate(() -> loadConfigSortBrandsCache(), 0, 1, TimeUnit.MINUTES);
|
|
|
}
|
|
|
|
|
|
private void loadConfigSortBrands() {
|
|
|
private void loadConfigSortBrandsCache() {
|
|
|
try {
|
|
|
RECALL_NEW_LOGGER.info("loadConfigSortBrandsCache begin ........");
|
|
|
long begin = System.currentTimeMillis();
|
|
|
List<SortBrand> tempCache = new ArrayList<>();
|
|
|
List<CsRecallConfigSortBrand> csRecallConfigSortBrands = csRecallConfigSortBrandIndexBaseService.queryAll();
|
|
|
for (CsRecallConfigSortBrand csRecallConfigSortBrand : csRecallConfigSortBrands) {
|
...
|
...
|
@@ -48,9 +50,9 @@ class RecallConfigSortBrandService { |
|
|
}
|
|
|
}
|
|
|
configSortBrandsCache = tempCache;
|
|
|
RECALL_NEW_LOGGER.info("loadConfigSortBrands success,configSortBrandsCache size is[{}]", configSortBrandsCache.size());
|
|
|
RECALL_NEW_LOGGER.info("loadConfigSortBrandsCache success,configSortBrandsCache size is[{}], cost is[{}] ", configSortBrandsCache.size(), System.currentTimeMillis() - begin);
|
|
|
} catch (Exception e) {
|
|
|
RECALL_NEW_LOGGER.error("loadConfigSortBrands error,exception is:" + e.getMessage(), e);
|
|
|
RECALL_NEW_LOGGER.error("loadConfigSortBrandsCache error,exception is:" + e.getMessage(), e);
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|