fix: remove dead code in BulkUpdateAccounts group binding loop
This commit is contained in:
@@ -1539,9 +1539,8 @@ func (s *adminServiceImpl) BulkUpdateAccounts(ctx context.Context, input *BulkUp
|
||||
|
||||
needMixedChannelCheck := input.GroupIDs != nil && !input.SkipMixedChannelCheck
|
||||
|
||||
// 预加载账号平台信息(混合渠道检查或 Sora 同步需要)。
|
||||
// 预加载账号平台信息(混合渠道检查需要)。
|
||||
platformByID := map[int64]string{}
|
||||
groupAccountsByID := map[int64][]Account{}
|
||||
if needMixedChannelCheck {
|
||||
accounts, err := s.accountRepo.GetByIDs(ctx, input.AccountIDs)
|
||||
if err != nil {
|
||||
@@ -1608,7 +1607,6 @@ func (s *adminServiceImpl) BulkUpdateAccounts(ctx context.Context, input *BulkUp
|
||||
// Handle group bindings per account (requires individual operations).
|
||||
for _, accountID := range input.AccountIDs {
|
||||
entry := BulkUpdateAccountResult{AccountID: accountID}
|
||||
platform := ""
|
||||
|
||||
if input.GroupIDs != nil {
|
||||
if err := s.accountRepo.BindGroups(ctx, accountID, *input.GroupIDs); err != nil {
|
||||
@@ -1619,9 +1617,6 @@ func (s *adminServiceImpl) BulkUpdateAccounts(ctx context.Context, input *BulkUp
|
||||
result.Results = append(result.Results, entry)
|
||||
continue
|
||||
}
|
||||
if !input.SkipMixedChannelCheck && platform != "" {
|
||||
updateMixedChannelPreloadedAccounts(groupAccountsByID, *input.GroupIDs, accountID, platform)
|
||||
}
|
||||
}
|
||||
|
||||
entry.Success = true
|
||||
|
||||
Reference in New Issue
Block a user