fix: 修复用户分组过滤功能 - 补全 providerGroup 字段查询#31
Merged
ding113 merged 1 commit intoding113:mainfrom Oct 31, 2025
Merged
Conversation
修复问题: validateApiKeyAndGetUser 函数在查询用户信息时遗漏了 providerGroup 字段,导致 session.authState.user.providerGroup 始终为 undefined,供应商选择器中的用户分组过滤逻辑无法生效。 修改内容: - 在 SELECT 查询中添加 userProviderGroup: users.providerGroup - 在构建 User 对象时传递 providerGroup: row.userProviderGroup 影响范围: - 恢复用户分组过滤功能,使设置了 providerGroup 的用户请求能够正确过滤到对应 groupTag 的供应商 - 向后兼容,未设置 providerGroup 的用户行为不变 - 无需数据库迁移或环境变更"
Closed
Closed
ding113
added a commit
that referenced
this pull request
Oct 31, 2025
* fix: 修复用户分组过滤功能 - 补全 providerGroup 字段查询 (#31) 修复问题: validateApiKeyAndGetUser 函数在查询用户信息时遗漏了 providerGroup 字段,导致 session.authState.user.providerGroup 始终为 undefined,供应商选择器中的用户分组过滤逻辑无法生效。 修改内容: - 在 SELECT 查询中添加 userProviderGroup: users.providerGroup - 在构建 User 对象时传递 providerGroup: row.userProviderGroup 影响范围: - 恢复用户分组过滤功能,使设置了 providerGroup 的用户请求能够正确过滤到对应 groupTag 的供应商 - 向后兼容,未设置 providerGroup 的用户行为不变 - 无需数据库迁移或环境变更" Co-authored-by: GuShenghua <gushenghua@sdesrd.com> * chore: sync VERSION file with release v0.2.13 [skip ci] * feat: 价格表页面增加分页功能,close #35 - 添加分页接口 PaginationParams 和 PaginatedResult - 新增 findAllLatestPricesPaginated 分页查询方法 - 新增 getModelPricesPaginated action 函数 - 新增 /api/prices API 端点支持分页查询 - 重构 PriceList 组件支持分页、页面大小选择、搜索 - 修改价格表页面支持分页参数和降级处理 - 支持URL参数同步分页状态 - 优化性能,避免一次性加载大量数据 * fix: 修复价格表分页功能的审查意见 主要改进: - 添加 /api/prices 端点权限检查,确保只有管理员可访问 - 实现 SQL 层面的搜索过滤,提升大数据量场景下的性能 - 添加搜索防抖机制(500ms),优化用户体验 - 移除客户端过滤逻辑,统一使用后端搜索 - 优化 useEffect 依赖,避免不必要的 API 请求 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: gsh <gushenghua@outlook.com> Co-authored-by: GuShenghua <gushenghua@sdesrd.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: GitHub Assistant <noreply@github.com> Co-authored-by: ding113 <h.ding.262@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Ding <44717411+ding113@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复问题:
validateApiKeyAndGetUser 函数在查询用户信息时遗漏了 providerGroup 字段,导致 session.authState.user.providerGroup 始终为 undefined,供应商选择器中的用户分组过滤逻辑无法生效。
修改内容:
影响范围: