Repository navigation
fix(ldap): 员工工号改用 AD employeeNumber,级别映射 Position - #1485
Merged
Merged
Conversation
原逻辑用 ObjectSid 的 RID 冒充工号,与真实工号无关。 变更: - 工号取 AD employeeNumber,移除 SID RID 兜底;无值时写空以清除存量 RID 脏数据 - 超长 employeeNumber 直接丢弃并告警(截断后仍是错值) - employeeType 映射为 Position 聚合并绑定 Staff.PositionId,按名匹配/创建,缓存去重,超长截断 - SyncLdapUserAsync 两个循环各加 per-user try-catch,单账号异常不再中断整批同步 - Position 创建失败时 Detach 实体,避免 ChangeTracker 污染后续账号导致级联失败 - Staff.JobNumber 放宽为可空(对齐 Name/IdCard 的 AllowNull 模式) - 列宽常量收敛至 BusinessConsts,EF 配置与同步逻辑共用
Qinyouzeng
approved these changes
Sep 21, 2026
|
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.



原逻辑用 ObjectSid 的 RID 冒充工号,与真实工号无关。
变更: