类 UserThemeCache

java.lang.Object
net.sohelp.boot.admin.core.cache.UserThemeCache

@Component public class UserThemeCache extends Object
界面主题配置及大小缓存管理类 提供用户界面主题与尺寸的获取、更新功能。
从以下版本开始:
2024/12/7 10:27
作者:
AaronFung
  • 构造器详细资料

    • UserThemeCache

      public UserThemeCache()
  • 方法详细资料

    • getTheme

      @Comment("\u83b7\u53d6\u7528\u6237\u754c\u9762\u4e3b\u9898") public Map<String,Object> getTheme(@Comment("\u7528\u6237ID") Long userId) throws SQLException
      获取用户的界面主题配置信息。 若系统默认主题允许用户自定义,并且用户已设置个性化主题,则使用用户设置覆盖默认值。
      参数:
      userId - 用户唯一标识符
      返回:
      包含主题配置的键值对映射表
      抛出:
      SQLException - 数据库访问异常时抛出
    • updateTheme

      @Comment("\u66f4\u65b0\u7528\u6237\u754c\u9762\u4e3b\u9898") public void updateTheme(@Comment("\u7528\u6237ID") Long userId, @Comment("\u4e3b\u9898\u914d\u7f6e") String json) throws SQLException
      更新指定用户的界面主题配置。
      参数:
      userId - 用户唯一标识符
      json - 主题配置的JSON字符串表示
      抛出:
      SQLException - 数据库操作失败时抛出
    • updateSize

      @Comment("\u66f4\u65b0\u7528\u6237\u754c\u9762\u5927\u5c0f") public void updateSize(@Comment("\u7528\u6237ID") Long userId, @Comment("\u4e3b\u9898\u914d\u7f6e") String json) throws SQLException
      更新指定用户的界面尺寸配置。
      参数:
      userId - 用户唯一标识符
      json - 尺寸配置的JSON字符串表示
      抛出:
      SQLException - 数据库操作失败时抛出
    • getSize

      @Comment("\u83b7\u53d6\u7528\u6237\u754c\u9762\u5927\u5c0f") public Map<String,Object> getSize(@Comment("\u7528\u6237ID") Long userId) throws Exception
      获取用户的界面尺寸配置信息。 当系统默认尺寸支持用户自定义并且用户已有相关设置时,将采用用户设定值替换默认值。
      参数:
      userId - 用户唯一标识符
      返回:
      包含尺寸配置的键值对映射表
      抛出:
      Exception - 操作过程中可能发生的通用异常