mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-11-18 08:40:29 +00:00
--author:scott--date:20261013--for:【issues/9838】字典前端缓存增加版本号,管理员修改字典后其他用户刷新页面自动同步最新字典(字典未变不重复拉取)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7187cf3e8d
commit
91b807ccfc
@ -746,4 +746,9 @@ public interface CommonConstant {
|
||||
* 发送短信方式:阿里云
|
||||
*/
|
||||
String SMS_SEND_TYPE_ALI_YUN = "aliyun";
|
||||
|
||||
/**
|
||||
* 系统字典版本号(Redis key),字典变更时更新,前端据此判断是否需要重新拉取字典缓存
|
||||
*/
|
||||
String SYS_DICT_VERSION = "sys:cache:dict:version";
|
||||
}
|
||||
|
||||
@ -164,6 +164,9 @@ public class LoginController {
|
||||
log.debug("2 获取用户信息耗时 (首页面配置)" + (System.currentTimeMillis() - start) + "毫秒");
|
||||
|
||||
obj.put("userInfo",sysUser);
|
||||
//update-begin---author:scott ---date:20261013 for:【issues/9838】返回字典版本号;先取版本号再查字典,避免期间字典变更导致前端拿到新版本号+旧数据-----------
|
||||
obj.put("dictVersion", sysDictService.getDictVersion());
|
||||
//update-end---author:scott ---date:20261013 for:【issues/9838】返回字典版本号;先取版本号再查字典,避免期间字典变更导致前端拿到新版本号+旧数据-----------
|
||||
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
||||
log.debug("3 获取用户信息耗时 (字典数据)" + (System.currentTimeMillis() - start) + "毫秒");
|
||||
|
||||
@ -561,6 +564,9 @@ public class LoginController {
|
||||
// 5.vue3版本不加载字典数据,vue2下加载字典
|
||||
String vue3Version = request.getHeader(CommonConstant.VERSION);
|
||||
if(oConvertUtils.isEmpty(vue3Version)){
|
||||
//update-begin---author:scott ---date:20261013 for:【issues/9838】返回字典版本号;先取版本号再查字典,避免期间字典变更导致前端拿到新版本号+旧数据-----------
|
||||
obj.put("dictVersion", sysDictService.getDictVersion());
|
||||
//update-end---author:scott ---date:20261013 for:【issues/9838】返回字典版本号;先取版本号再查字典,避免期间字典变更导致前端拿到新版本号+旧数据-----------
|
||||
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
||||
}
|
||||
|
||||
|
||||
@ -399,6 +399,7 @@ public class SysDictController {
|
||||
sysDict.setCreateTime(new Date());
|
||||
sysDict.setDelFlag(CommonConstant.DEL_FLAG_0);
|
||||
sysDictService.save(sysDict);
|
||||
sysDictService.refreshDictVersion();
|
||||
result.success("保存成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
@ -472,6 +473,9 @@ public class SysDictController {
|
||||
log.error("第 {} 个字典[{}]处理异常: {}", i + 1, sysDictPage.getDictCode(), e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (successCount > 0) {
|
||||
sysDictService.refreshDictVersion();
|
||||
}
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
returnMap.put("successCount", successCount);
|
||||
returnMap.put("failCount", failCount);
|
||||
@ -511,6 +515,7 @@ public class SysDictController {
|
||||
sysDict.setUpdateTime(new Date());
|
||||
boolean ok = sysDictService.updateById(sysDict);
|
||||
if(ok) {
|
||||
sysDictService.refreshDictVersion();
|
||||
result.success("编辑成功!");
|
||||
}
|
||||
}
|
||||
@ -529,6 +534,7 @@ public class SysDictController {
|
||||
Result<SysDict> result = new Result<SysDict>();
|
||||
boolean ok = sysDictService.removeById(id);
|
||||
if(ok) {
|
||||
sysDictService.refreshDictVersion();
|
||||
result.success("删除成功!");
|
||||
}else{
|
||||
result.error500("删除失败!");
|
||||
@ -550,6 +556,7 @@ public class SysDictController {
|
||||
result.error500("参数不识别!");
|
||||
}else {
|
||||
sysDictService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
sysDictService.refreshDictVersion();
|
||||
result.success("删除成功!");
|
||||
}
|
||||
return result;
|
||||
@ -589,7 +596,9 @@ public class SysDictController {
|
||||
redisUtil.removeAll(CacheConstant.SYS_DEPART_IDS_CACHE);
|
||||
redisUtil.removeAll("jmreport:cache:dict");
|
||||
redisUtil.removeAll("jmreport:cache:dictTable");
|
||||
|
||||
// 刷新字典版本号(兜底:直接改库后手动刷新缓存,其他用户刷新页面也能同步)
|
||||
sysDictService.refreshDictVersion();
|
||||
|
||||
// 清除当前用户的授权缓存信息
|
||||
Subject currentUser = SecurityUtils.getSubject();
|
||||
if (currentUser.isAuthenticated()) {
|
||||
@ -704,6 +713,9 @@ public class SysDictController {
|
||||
errorMessage.add("第 " + lineNumber + " 行:字典编码已经存在,忽略导入。");
|
||||
}
|
||||
}
|
||||
if (successLines > 0) {
|
||||
sysDictService.refreshDictVersion();
|
||||
}
|
||||
return ImportExcelUtil.imporReturnRes(errorLines,successLines,errorMessage);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
@ -743,6 +755,7 @@ public class SysDictController {
|
||||
public Result<?> deletePhysic(@PathVariable("id") String id) {
|
||||
try {
|
||||
sysDictService.deleteOneDictPhysically(id);
|
||||
sysDictService.refreshDictVersion();
|
||||
return Result.ok("删除成功!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@ -760,6 +773,7 @@ public class SysDictController {
|
||||
public Result<?> back(@PathVariable("id") String id) {
|
||||
try {
|
||||
sysDictService.updateDictDelFlag(0,id);
|
||||
sysDictService.refreshDictVersion();
|
||||
return Result.ok("操作成功!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@ -779,6 +793,7 @@ public class SysDictController {
|
||||
String ids = jsonObject.getString("ids");
|
||||
if (StringUtils.isNotBlank(ids)) {
|
||||
sysDictService.revertLogicDeleted(Arrays.asList(ids.split(",")));
|
||||
sysDictService.refreshDictVersion();
|
||||
return Result.ok("操作成功!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@ -848,6 +863,7 @@ public class SysDictController {
|
||||
sysDictVo.setLowAppId(lowAppId);
|
||||
sysDictVo.setTenantId(oConvertUtils.getInteger(tenantId, null));
|
||||
sysDictService.addDictByLowAppId(sysDictVo);
|
||||
sysDictService.refreshDictVersion();
|
||||
return Result.ok("添加成功");
|
||||
}
|
||||
|
||||
@ -856,6 +872,7 @@ public class SysDictController {
|
||||
String lowAppId = oConvertUtils.getString(TokenUtils.getLowAppIdByRequest(request));
|
||||
sysDictVo.setLowAppId(lowAppId);
|
||||
sysDictService.editDictByLowAppId(sysDictVo);
|
||||
sysDictService.refreshDictVersion();
|
||||
return Result.ok("编辑成功");
|
||||
}
|
||||
|
||||
|
||||
@ -18,6 +18,7 @@ import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.system.entity.SysDictItem;
|
||||
import org.jeecg.modules.system.service.ISysDictItemService;
|
||||
import org.jeecg.modules.system.service.ISysDictService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@ -48,6 +49,8 @@ public class SysDictItemController {
|
||||
|
||||
@Autowired
|
||||
private ISysDictItemService sysDictItemService;
|
||||
@Autowired
|
||||
private ISysDictService sysDictService;
|
||||
|
||||
/**
|
||||
* @功能:查询字典数据
|
||||
@ -82,6 +85,7 @@ public class SysDictItemController {
|
||||
try {
|
||||
sysDictItem.setCreateTime(new Date());
|
||||
sysDictItemService.save(sysDictItem);
|
||||
sysDictService.refreshDictVersion();
|
||||
result.success("保存成功!");
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
@ -108,6 +112,7 @@ public class SysDictItemController {
|
||||
boolean ok = sysDictItemService.updateById(sysDictItem);
|
||||
//TODO 返回false说明什么?
|
||||
if(ok) {
|
||||
sysDictService.refreshDictVersion();
|
||||
result.success("编辑成功!");
|
||||
}
|
||||
}
|
||||
@ -130,6 +135,7 @@ public class SysDictItemController {
|
||||
}else {
|
||||
boolean ok = sysDictItemService.removeById(id);
|
||||
if(ok) {
|
||||
sysDictService.refreshDictVersion();
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
@ -150,6 +156,7 @@ public class SysDictItemController {
|
||||
result.error500("参数不识别!");
|
||||
}else {
|
||||
this.sysDictItemService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
sysDictService.refreshDictVersion();
|
||||
result.success("删除成功!");
|
||||
}
|
||||
return result;
|
||||
|
||||
@ -71,6 +71,9 @@ public class SysPermissionController {
|
||||
@Autowired
|
||||
private ShiroRealm shiroRealm;
|
||||
|
||||
@Autowired
|
||||
private ISysDictService sysDictService;
|
||||
|
||||
/**
|
||||
* 子菜单
|
||||
*/
|
||||
@ -337,6 +340,9 @@ public class SysPermissionController {
|
||||
json.put("allAuth", allauthjsonArray);
|
||||
//数据源安全模式
|
||||
json.put("sysSafeMode", jeecgBaseConfig.getFirewall()!=null? jeecgBaseConfig.getFirewall().getDataSourceSafe(): false);
|
||||
//update-begin---author:scott ---date:20261013 for:【issues/9838】返回字典版本号,前端刷新页面时比对,变化才重新拉取字典缓存-----------
|
||||
json.put("dictVersion", sysDictService.getDictVersion());
|
||||
//update-end---author:scott ---date:20261013 for:【issues/9838】返回字典版本号,前端刷新页面时比对,变化才重新拉取字典缓存-----------
|
||||
result.setResult(json);
|
||||
} catch (Exception e) {
|
||||
result.error500("查询失败:" + e.getMessage());
|
||||
|
||||
@ -370,6 +370,9 @@ public class ThirdLoginController {
|
||||
//用户登录信息
|
||||
obj.put("userInfo", sysUser);
|
||||
//获取字典缓存【解决 #jeecg-boot/issues/3998】
|
||||
//update-begin---author:scott ---date:20261013 for:【issues/9838】返回字典版本号;先取版本号再查字典,避免期间字典变更导致前端拿到新版本号+旧数据-----------
|
||||
obj.put("dictVersion", sysDictService.getDictVersion());
|
||||
//update-end---author:scott ---date:20261013 for:【issues/9838】返回字典版本号;先取版本号再查字典,避免期间字典变更导致前端拿到新版本号+旧数据-----------
|
||||
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
||||
//token 信息
|
||||
obj.put("token", token);
|
||||
|
||||
@ -59,6 +59,21 @@ public interface ISysDictService extends IService<SysDict> {
|
||||
*/
|
||||
public Map<String,List<DictModel>> queryAllDictItems();
|
||||
|
||||
/**
|
||||
* 获取系统字典版本号(前端据此判断本地字典缓存是否过期)
|
||||
* @return
|
||||
* @author scott
|
||||
* @since 2026-10-13 【issues/9838】管理员修改字典后,其他用户刷新页面自动同步最新字典
|
||||
*/
|
||||
String getDictVersion();
|
||||
|
||||
/**
|
||||
* 刷新系统字典版本号(字典或字典项变更后调用)
|
||||
* @author scott
|
||||
* @since 2026-10-13 【issues/9838】管理员修改字典后,其他用户刷新页面自动同步最新字典
|
||||
*/
|
||||
void refreshDictVersion();
|
||||
|
||||
/**
|
||||
* 查通过查询指定table的 text code 获取字典
|
||||
* @param tableFilterSql
|
||||
|
||||
@ -236,6 +236,32 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
||||
return sysAllDictItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统字典版本号,Redis 中不存在时初始化
|
||||
* @author scott
|
||||
* @since 2026-10-13 【issues/9838】管理员修改字典后,其他用户刷新页面自动同步最新字典
|
||||
*/
|
||||
@Override
|
||||
public String getDictVersion() {
|
||||
Object version = redisUtil.get(CommonConstant.SYS_DICT_VERSION);
|
||||
if (oConvertUtils.isEmpty(version)) {
|
||||
// Redis 中不存在(首次或被清理)时初始化,前端会因版本不一致重新拉取一次字典
|
||||
version = String.valueOf(System.currentTimeMillis());
|
||||
redisUtil.set(CommonConstant.SYS_DICT_VERSION, version);
|
||||
}
|
||||
return version.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新系统字典版本号(写入当前时间戳)
|
||||
* @author scott
|
||||
* @since 2026-10-13 【issues/9838】管理员修改字典后,其他用户刷新页面自动同步最新字典
|
||||
*/
|
||||
@Override
|
||||
public void refreshDictVersion() {
|
||||
redisUtil.set(CommonConstant.SYS_DICT_VERSION, String.valueOf(System.currentTimeMillis()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过查询指定code 获取字典值text
|
||||
* @param code
|
||||
|
||||
@ -45,6 +45,8 @@ export interface GetUserInfoModel {
|
||||
userInfo?: any;
|
||||
// 缓存字典项
|
||||
sysAllDictItems?: any;
|
||||
// 字典版本号
|
||||
dictVersion?: string;
|
||||
// 三级等保强密码开关
|
||||
enableStrongPwd?: boolean;
|
||||
}
|
||||
|
||||
@ -11,6 +11,8 @@ export const ROLES_KEY = 'ROLES__KEY__';
|
||||
|
||||
// dict info key
|
||||
export const DB_DICT_DATA_KEY = 'UI_CACHE_DB_DICT_DATA';
|
||||
// dict version key(与字典数据成对存储,用于判断本地字典是否过期)
|
||||
export const DB_DICT_VERSION_KEY = 'UI_CACHE_DB_DICT_VERSION';
|
||||
|
||||
// project config key
|
||||
export const PROJ_CFG_KEY = 'PROJ__CFG__KEY__';
|
||||
|
||||
@ -126,7 +126,11 @@ export const usePermissionStore = defineStore('app-permission', {
|
||||
const codeList = systemPermission.codeList;
|
||||
this.setPermCodeList(codeList);
|
||||
this.setAuthData(systemPermission);
|
||||
|
||||
// 代码逻辑说明: 【issues/9838】字典版本号变化时后台刷新字典缓存,不阻塞菜单构建
|
||||
useUserStore()
|
||||
.refreshDictItemsIfChanged(systemPermission.dictVersion)
|
||||
.catch((e) => console.warn('刷新字典缓存失败', e));
|
||||
|
||||
//菜单路由
|
||||
const routeList = systemPermission.menu;
|
||||
return routeList;
|
||||
|
||||
@ -4,10 +4,11 @@ import { defineStore } from 'pinia';
|
||||
import { store } from '/@/store';
|
||||
import { RoleEnum } from '/@/enums/roleEnum';
|
||||
import { PageEnum } from '/@/enums/pageEnum';
|
||||
import { ROLES_KEY, TOKEN_KEY, USER_INFO_KEY, LOGIN_INFO_KEY, DB_DICT_DATA_KEY, TENANT_ID, OAUTH2_THIRD_LOGIN_TENANT_ID } from '/@/enums/cacheEnum';
|
||||
import { ROLES_KEY, TOKEN_KEY, USER_INFO_KEY, LOGIN_INFO_KEY, DB_DICT_DATA_KEY, DB_DICT_VERSION_KEY, TENANT_ID, OAUTH2_THIRD_LOGIN_TENANT_ID } from '/@/enums/cacheEnum';
|
||||
import { getAuthCache, setAuthCache, removeAuthCache } from '/@/utils/auth';
|
||||
import { GetUserInfoModel, LoginParams, ThirdLoginParams } from '/@/api/sys/model/userModel';
|
||||
import { doLogout, getUserInfo, loginApi, phoneLoginApi, thirdLogin } from '/@/api/sys/user';
|
||||
import { queryAllDictItems } from '/@/views/system/dict/dict.api';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { router } from '/@/router';
|
||||
@ -116,9 +117,30 @@ export const useUserStore = defineStore('app-user', {
|
||||
this.loginInfo = info;
|
||||
setAuthCache(LOGIN_INFO_KEY, info);
|
||||
},
|
||||
setAllDictItems(dictItems) {
|
||||
/**
|
||||
* 设置全量字典缓存
|
||||
* @param dictItems 字典数据
|
||||
* @param dictVersion 字典版本号,与字典数据成对存储;不传则清空,下次刷新页面会重新拉取一次字典
|
||||
*/
|
||||
setAllDictItems(dictItems, dictVersion?: string | null) {
|
||||
this.dictItems = dictItems;
|
||||
setAuthCache(DB_DICT_DATA_KEY, dictItems);
|
||||
setAuthCache(DB_DICT_VERSION_KEY, dictVersion ?? null);
|
||||
},
|
||||
/**
|
||||
* 后端字典版本号与本地不一致时,后台重新拉取全量字典
|
||||
* @param dictVersion 后端返回的字典版本号
|
||||
* @author scott
|
||||
* @since 2026-10-13 【issues/9838】管理员修改字典后,其他用户刷新页面即可同步最新字典
|
||||
*/
|
||||
async refreshDictItemsIfChanged(dictVersion?: string) {
|
||||
if (!dictVersion || dictVersion === getAuthCache<string>(DB_DICT_VERSION_KEY)) {
|
||||
return;
|
||||
}
|
||||
const res = await queryAllDictItems();
|
||||
if (res?.success && res.result) {
|
||||
this.setAllDictItems(res.result, dictVersion);
|
||||
}
|
||||
},
|
||||
setAllDictItemsByLocal() {
|
||||
// 代码逻辑说明: 【QQYUN-8572】表格行选择卡顿问题(customRender中字典引起的)
|
||||
@ -260,7 +282,7 @@ export const useUserStore = defineStore('app-user', {
|
||||
if (!this.getToken) {
|
||||
return null;
|
||||
}
|
||||
const { userInfo, sysAllDictItems, enableStrongPwd } = await getUserInfo();
|
||||
const { userInfo, sysAllDictItems, dictVersion, enableStrongPwd } = await getUserInfo();
|
||||
if (userInfo) {
|
||||
const { roles = [] } = userInfo;
|
||||
if (isArray(roles)) {
|
||||
@ -278,7 +300,7 @@ export const useUserStore = defineStore('app-user', {
|
||||
* @updateDate:2021-09-08
|
||||
*/
|
||||
if (sysAllDictItems) {
|
||||
this.setAllDictItems(sysAllDictItems);
|
||||
this.setAllDictItems(sysAllDictItems, dictVersion);
|
||||
}
|
||||
this.enableStrongPwd = enableStrongPwd ?? false;
|
||||
return userInfo;
|
||||
|
||||
4
jeecgboot-vue3/src/utils/cache/memory.ts
vendored
4
jeecgboot-vue3/src/utils/cache/memory.ts
vendored
@ -1,4 +1,4 @@
|
||||
import { TOKEN_KEY, ROLES_KEY, USER_INFO_KEY, DB_DICT_DATA_KEY, TENANT_ID, LOGIN_INFO_KEY, PROJ_CFG_KEY } from '/@/enums/cacheEnum';
|
||||
import { TOKEN_KEY, ROLES_KEY, USER_INFO_KEY, DB_DICT_DATA_KEY, DB_DICT_VERSION_KEY, TENANT_ID, LOGIN_INFO_KEY, PROJ_CFG_KEY } from '/@/enums/cacheEnum';
|
||||
import { omit } from 'lodash-es';
|
||||
|
||||
export interface Cache<V = any> {
|
||||
@ -103,7 +103,7 @@ export class Memory<T = any, V = any> {
|
||||
});
|
||||
// 代码逻辑说明: 不删除登录用户的租户id,其他缓存信息都清除----
|
||||
this.cache = {
|
||||
...omit(this.cache, [TOKEN_KEY, USER_INFO_KEY, ROLES_KEY, DB_DICT_DATA_KEY, TENANT_ID, LOGIN_INFO_KEY, PROJ_CFG_KEY]),
|
||||
...omit(this.cache, [TOKEN_KEY, USER_INFO_KEY, ROLES_KEY, DB_DICT_DATA_KEY, DB_DICT_VERSION_KEY, TENANT_ID, LOGIN_INFO_KEY, PROJ_CFG_KEY]),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
2
jeecgboot-vue3/src/utils/cache/persistent.ts
vendored
2
jeecgboot-vue3/src/utils/cache/persistent.ts
vendored
@ -14,6 +14,7 @@ import {
|
||||
APP_SESSION_CACHE_KEY,
|
||||
MULTIPLE_TABS_KEY,
|
||||
DB_DICT_DATA_KEY,
|
||||
DB_DICT_VERSION_KEY,
|
||||
TENANT_ID,
|
||||
LOGIN_INFO_KEY,
|
||||
OAUTH2_THIRD_LOGIN_TENANT_ID,
|
||||
@ -32,6 +33,7 @@ interface BasicStore {
|
||||
[PROJ_CFG_KEY]: ProjectConfig;
|
||||
[MULTIPLE_TABS_KEY]: RouteLocationNormalized[];
|
||||
[DB_DICT_DATA_KEY]: string;
|
||||
[DB_DICT_VERSION_KEY]: string;
|
||||
[TENANT_ID]: string;
|
||||
[LOGIN_INFO_KEY]: LoginInfo;
|
||||
[OAUTH2_THIRD_LOGIN_TENANT_ID]: string
|
||||
|
||||
@ -110,7 +110,10 @@
|
||||
* 删除
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteItem({ id: record.id }, reload);
|
||||
await deleteItem({ id: record.id }, () => {
|
||||
reload();
|
||||
doRefreshDictCache();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -120,7 +120,10 @@
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteDict({ id: record.id }, reload);
|
||||
await deleteDict({ id: record.id }, () => {
|
||||
reload();
|
||||
handlerRefreshCache(false);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 批量删除事件
|
||||
@ -131,6 +134,7 @@
|
||||
reload();
|
||||
selectedRowKeys.value = [];
|
||||
selectedRows.value = [];
|
||||
handlerRefreshCache(false);
|
||||
});
|
||||
}
|
||||
/**
|
||||
@ -141,9 +145,9 @@
|
||||
updateTableDataRecord(values.id, values);
|
||||
} else {
|
||||
reload();
|
||||
// 代码逻辑说明: 新增字典后同步刷新字典缓存,避免新增字典后页面引用不到
|
||||
await handlerRefreshCache(false);
|
||||
}
|
||||
// 代码逻辑说明: 新增/编辑字典后同步刷新字典缓存,避免页面引用不到或显示旧值
|
||||
await handlerRefreshCache(false);
|
||||
}
|
||||
/**
|
||||
* 刷新缓存
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user