perf(database): 优化数据库配置和用户查询性能

- 更新 Redis 配置为本地 1Panel 实例
- 为 UserMapper 查询添加 LIMIT 1 限制
- 为 credit_user 表创建多个复合索引以提升查询效率
- 添加租户、公司、用户维度的索引支持
- 优化默认分页排序的索引覆盖
- 包含统计关联数的索引优化
This commit is contained in:
2026-03-19 00:00:45 +08:00
parent 6a48722b67
commit 3b723a74c6
3 changed files with 38 additions and 3 deletions

View File

@@ -259,6 +259,7 @@
LEFT JOIN gxwebsoft_core.sys_user_referee h ON a.user_id = h.user_id and h.deleted = 0
WHERE a.user_id = #{userId}
AND a.deleted = 0
LIMIT 1
</select>
</mapper>