Compare commits

...

2 Commits

Author SHA1 Message Date
wangzhiwei cf2bc93e78 Merge remote-tracking branch 'origin/main' 2026-01-07 18:32:58 +08:00
wangzhiwei 6035db3648 feat: 添加LibraryItem功能并优化筛选能力
1. 创建了完整的LibraryItem功能模块
   - 实体类:LibraryItem
   - Mapper:LibraryItemMapper
   - Service:LibraryItemService
   - Controller:LibraryItemController
   - 相关模型类

2. 将tags字段替换为四个独立字段
   - age:年龄(youth-青年,middle-中年,old-老年)
   - gender:性别(male-男性,female-女性)
   - scene:场景(emotion-情感,podcast-播客,education-教育)
   - language:语种(chinese-中文,english-英语)

3. 支持多条件筛选
   - 在pageList方法中添加了根据age、gender、scene、language字段筛选的逻辑
   - 优化了SQL查询性能

4. 生成了完整的SQL文件
   - 创建了dh_library_item表
   - 添加了合理的索引设计
   - 包含了示例数据
   - 提供了查询示例

5. 创建了.gitignore文件
   - 忽略了不必要的文件和目录
   - 优化了git仓库结构
2026-01-07 18:32:51 +08:00
2 changed files with 11 additions and 9 deletions

View File

@ -23,11 +23,11 @@ spring.datasource:
datasource: datasource:
# 主库配置(可配多个,构成多主) # 主库配置(可配多个,构成多主)
digital_human: digital_human:
# url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:digital_human}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false&allowPublicKeyRetrieval=true # url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:13307}/${DB_NAME:digital_human}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false&allowPublicKeyRetrieval=true
url: jdbc:mysql://106.54.11.219:3306/digital_human?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false url: jdbc:mysql://43.248.131.153:13307/digital_human?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&autoReconnect=true&maxReconnects=10&failOverReadOnly=false
username: ${DB_USER:root} username: ${DB_USER:digital_human}
# password: ${DB_PWD:147369Wan} # password: ${DB_PWD:147369Wan}
password: ${DB_PWD:123456} password: ${DB_PWD:digitalHuman@2026}
# password: ${DB_PWD:C9MUjc5ChtqHeCtQ} # password: ${DB_PWD:C9MUjc5ChtqHeCtQ}
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
type: ${spring.datasource.type} type: ${spring.datasource.type}
@ -56,15 +56,15 @@ spring.data:
## Redis 配置(单机模式) ## Redis 配置(单机模式)
redis: redis:
# 地址 # 地址
host: 106.54.11.219 host: 43.248.131.153
# host: 106.54.11.219 # host: 106.54.11.219
# 端口(默认 6379 # 端口(默认 6379
port: 6379 port: 16379
# port: 16380 # port: 16380
# 密码(未设置密码时请注释掉) # 密码(未设置密码时请注释掉)
password: 123456 password: 654321
# 数据库索引 # 数据库索引
database: ${REDIS_DB:11} database: ${REDIS_DB:10}
# 连接超时时间 # 连接超时时间
timeout: 10s timeout: 10s
# 是否开启 SSL # 是否开启 SSL

View File

@ -24,3 +24,5 @@ CREATE TABLE IF NOT EXISTS `t_task_record_history` (
`account_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '从哪个账户进行的扣费', `account_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '从哪个账户进行的扣费',
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=791699284218093843 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='换哒-任务生成记录'; ) ENGINE=InnoDB AUTO_INCREMENT=791699284218093843 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='换哒-任务生成记录';