diff --git a/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/format/FileInfoFormatProcess.java b/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/format/FileInfoFormatProcess.java index a7906dcd8..cae10bd06 100644 --- a/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/format/FileInfoFormatProcess.java +++ b/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/format/FileInfoFormatProcess.java @@ -7,6 +7,8 @@ import cn.stylefeng.roses.kernel.rule.format.BaseSimpleFieldFormatProcess; /** * 针对文件id的包装处理,返回文件可以访问的地址和文件的名称 + *

+ * 通过缓存加速获取文件信息 * * @author fengshuonan * @since 2023/11/13 17:49 diff --git a/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/format/FileUrlFormatProcess.java b/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/format/FileUrlFormatProcess.java index f460d95fe..822fa583d 100644 --- a/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/format/FileUrlFormatProcess.java +++ b/kernel-d-file/file-api/src/main/java/cn/stylefeng/roses/kernel/file/api/format/FileUrlFormatProcess.java @@ -7,6 +7,8 @@ import cn.stylefeng.roses.kernel.rule.format.BaseSimpleFieldFormatProcess; /** * Json响应,针对返回的文件信息,响应一个文件的具体url + *

+ * 通过缓存加速获取文件详情 * * @author fengshuonan * @since 2023/3/28 9:30 diff --git a/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/sys/api/format/RoleNameFormatProcess.java b/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/sys/api/format/RoleNameFormatProcess.java index 2d36ccfae..07c837b69 100644 --- a/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/sys/api/format/RoleNameFormatProcess.java +++ b/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/sys/api/format/RoleNameFormatProcess.java @@ -7,6 +7,8 @@ import cn.stylefeng.roses.kernel.sys.api.SysRoleServiceApi; /** * JSON响应对角色id的转化 + *

+ * 通过缓存加快角色名称获取 * * @author fengshuonan * @since 2023/5/4 21:20 diff --git a/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleServiceImpl.java b/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleServiceImpl.java index 6d1a74bed..4a34c39c7 100644 --- a/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleServiceImpl.java +++ b/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleServiceImpl.java @@ -354,7 +354,7 @@ public class SysRoleServiceImpl extends ServiceImpl impl sysRoleLambdaQueryWrapper.select(SysRole::getRoleName); SysRole sysRole = this.getOne(sysRoleLambdaQueryWrapper, false); if (sysRole != null) { - this.roleNameCache.put(roleId.toString(), sysRole.getRoleName()); + this.roleNameCache.put(roleId.toString(), sysRole.getRoleName(), SysConstants.DEFAULT_SYS_CACHE_TIMEOUT_SECONDS); return sysRole.getRoleName(); }