fix(config): 修正数据库表名与Redis集成配置

- 更新UserDao查询表名从`user`改为`system_user`,字段`phone_number`改为`mobile`
- 添加Spring Data Redis与Sa-Token Redis依赖,关闭多地同时登录
- 调整token名称、超时时间及本地/生产环境Redis和数据库配置
- 清理编译目录冗余配置文件并更新.gitignore忽略AGENTS.md
This commit is contained in:
2026-02-06 22:05:00 +08:00
parent ef02afb5b6
commit 82a13beb09
12 changed files with 47 additions and 153 deletions

View File

@@ -13,7 +13,7 @@ import java.util.List;
public interface UserDao extends BaseMapper<UserModel> {
// 根据用户的手机号查询用户
@Select("SELECT * FROM `user` WHERE phone_number = #{phoneNumber}")
@Select("SELECT * FROM system_user WHERE mobile = #{phoneNumber}")
UserModel queryWithPhoneNumber(@Param("phoneNumber") String phoneNumber);
// 我邀请的pk数据

View File

@@ -5,9 +5,28 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: 123asd
url: jdbc:mysql://localhost:3306/vv_assistant?allowMultiQueries=true
url: jdbc:mysql://localhost:3306/ruoyi-vue-pro?allowMultiQueries=true
redis:
database: 1
host: localhost
port: 6379
timeout: 5000
lettuce:
pool:
# 连接池最大连接数
max-active: 200
# 连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# 连接池中的最大空闲连接
max-idle: 10
# 连接池中的最小空闲连接
min-idle: 0
chat:
appId: 1600092688
appKey: 9bb6df04907a8cff9292eee8d6b32158d008350198acba11607068d91cb65f66
appKey: 9bb6df04907a8cff9292eee8d6b32158d008350198acba11607068d91cb65f66
activateUrl: http://192.168.2.22:8086/activationSuccessful/
verificationMailUrl: http://192.168.2.22:8086/verifyAccount/
forgetPassWordUrl: http://192.168.2.22:8086/resetPassword/

View File

@@ -8,6 +8,13 @@ spring:
url: jdbc:mysql://49.235.115.212:3336/vv_assistant
redis:
database: 1
host: localhost
port: 16379
timeout: 5000
password: ezyPM2UQkPO8O6i8s9
chat:
appId: 1600086767
appKey: 4f240bf11de12b5d8fc596556953f4f732416456ba5bcdc30c689913def0fc35

View File

@@ -27,13 +27,11 @@ mybatis-plus:
############## Sa-Token 配置 (文档: https://sa-token.cc) ##############
sa-token:
# token 名称(同时也是 cookie 名称)
token-name: token
token-name: vvtoken
# token 有效期(单位:秒) 默认30天-1 代表永久有效
timeout: -1
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
active-timeout: 648000
timeout: 172800
# 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录)
is-concurrent: true
is-concurrent: false
# 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token
is-share: false
# token 风格默认可取值uuid、simple-uuid、random-32、random-64、random-128、tik
@@ -41,6 +39,7 @@ sa-token:
# 是否输出操作日志
is-log: true
activateUrl: https://pk.webapp.yolozs.com/activationSuccessful/
verificationMailUrl: https://pk.webapp.yolozs.com/verifyAccount/
forgetPassWordUrl: https://pk.webapp.yolozs.com/resetPassword/