From b2d360d9113b6955287108ca9e90d76a1f3c1419 Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期日, 29 九月 2024 15:05:11 +0800 Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia --- server/service/src/main/java/com/doumee/service/business/InitService.java | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/InitService.java b/server/service/src/main/java/com/doumee/service/business/InitService.java index 0ca6efd..99f6a97 100644 --- a/server/service/src/main/java/com/doumee/service/business/InitService.java +++ b/server/service/src/main/java/com/doumee/service/business/InitService.java @@ -1,5 +1,6 @@ package com.doumee.service.business; +import com.doumee.biz.system.SystemDictDataBiz; import com.doumee.core.utils.Constants; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; @@ -23,14 +24,31 @@ @Autowired @Lazy private ShopService shopService; + @Autowired + @Lazy + private SystemDictDataBiz systemDictDataBiz; - @PostConstruct public void clearImporting(){ redisTemplate.delete(Constants.RedisKeys.IMPORTING_SHOP); + redisTemplate.delete(Constants.RedisKeys.IMPORTING_USERS); + } + public void refreshZbomDictDataCache(){ + redisTemplate.opsForValue().set(Constants.RedisKeys.IAM_APPKEY,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_IAM_APPKEY).getCode()); + redisTemplate.opsForValue().set(Constants.RedisKeys.IAM_APPID,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_IAM_APPID).getCode()); + redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_CRM_API_KEY,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_API_KEY).getCode()); + redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_CRM_POSTCUS_API_KEY,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_POSTCUS_API_KEY).getCode()); + redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_CRM_AUTH_API_KEY,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_AUTH_API_KEY).getCode()); + redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_CRM_API_URL,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_CRM_API_URL).getCode()); + redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_SMS_API_URL,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_SMS_API_URL).getCode()); + redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_SMS_API_KEY,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_SMS_API_KEY).getCode()); + redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_ZHONGTAI_API_URL,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_ZHONGTAI_API_URL).getCode()); + redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_ZHONGTAI_SYS_API_URL,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_ZHONGTAI_SYS_API_URL).getCode()); + redisTemplate.opsForValue().set(Constants.RedisKeys.ZBOM_ENCODE_URL,systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_ENCODE_URL).getCode()); } @PostConstruct public void cacheShopTree(){ // redisTemplate.opsForValue().set(Constants.RedisKeys.SHOP_TREE,shopService.shopTree(null)); } + } -- Gitblit v1.9.3