feat(themes): 支持主题标签数组存储与按风格查询

- 新增 StringArrayTypeHandler 实现 PostgreSQL text[] ↔ Java String[] 映射
- 将 theme_tag 字段类型由 VARCHAR 改为 ARRAY,实体与 VO 同步调整为 String[]
- 移除废弃的 selectAllThemes 方法,统一使用 selectThemesByStyle(Long)
- 9999 风格 ID 保留查询全部上架主题逻辑,其余按风格过滤
- 开放 /themes/listByStyle 接口免鉴权,并修正 theme_status=true 查询条件
This commit is contained in:
2025-12-10 15:55:55 +08:00
parent 0447959f52
commit 5227b81acb
12 changed files with 117 additions and 27 deletions

View File

@@ -14,7 +14,7 @@
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="prompt" jdbcType="VARCHAR" property="prompt" />
<result column="rank" jdbcType="INTEGER" property="rank" />
<result column="emoji" jdbcType="BOOLEAN" property="emoji" />
<result column="emoji" jdbcType="VARCHAR" property="emoji" />
</resultMap>
<sql id="Base_Column_List">
id, character_name, "character_background", avatar_url, download, tag, deleted, created_at,

View File

@@ -7,7 +7,7 @@
<id column="id" jdbcType="BIGINT" property="id" />
<result column="theme_name" jdbcType="VARCHAR" property="themeName" />
<result column="theme_price" jdbcType="NUMERIC" property="themePrice" />
<result column="theme_tag" jdbcType="VARCHAR" property="themeTag" />
<result column="theme_tag" jdbcType="ARRAY" property="themeTag" typeHandler="com.yolo.keyborad.typehandler.StringArrayTypeHandler" />
<result column="theme_download" jdbcType="VARCHAR" property="themeDownload" />
<result column="theme_style" jdbcType="BIGINT" property="themeStyle" />
<result column="theme_status" jdbcType="BOOLEAN" property="themeStatus" />