fix: 删除认证源将关联用户信息移除

This commit is contained in:
TsMask
2025-08-14 10:45:27 +08:00
parent 7783985c09
commit 991f22ae37
2 changed files with 18 additions and 0 deletions

View File

@@ -54,6 +54,9 @@ func (s SysLoginSource) DeleteByIds(ids []int64) (int64, error) {
return 0, fmt.Errorf("no permission to access authentication source data")
}
if len(arr) == len(ids) {
for _, v := range arr {
s.sysLoginSourceRepository.DeleteByUserSource(v.UID)
}
return s.sysLoginSourceRepository.DeleteByIds(ids), nil
}
// return 0, fmt.Errorf("删除认证源信息失败!")