refactor(core): 任务与模型协议治理 - 拆分服务职责并禁止已发起任务取消
This commit is contained in:
1 parent
7418ddfa9c
commit
633560a5d8
91 files changed
+6380
-4247
No files matched your search
@@ -3,6 +3,7 @@ package service
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -335,7 +336,9 @@ func (s *Service) UpdateUser(actor *model.User, userID string, req UpdateUserReq
|
||||
return nil, err
|
||||
}
|
||||
user.PasswordHash = hash
|
||||
_ = s.repo.DeleteUserAuthSessions(user.ID)
|
||||
if err := s.repo.DeleteUserAuthSessions(user.ID); err != nil {
|
||||
return nil, fmt.Errorf("清理旧登录会话失败,密码未更新:%w", err)
|
||||
}
|
||||
}
|
||||
user.Role = nextRole
|
||||
user.Status = nextStatus
|
||||
|
||||
Reference in new issue
Block a user