优化结构

This commit is contained in:
Yvan
2026-08-25 00:20:29 +08:00
parent 969afee284
commit ee179d6b34
49 changed files with 289 additions and 591 deletions
-10
View File
@@ -69,16 +69,6 @@ func (uc *UserUsecase) Login(ctx context.Context, username, password string) (*U
return u, nil
}
func (uc *UserUsecase) User(ctx context.Context, id uint) (*User, error) {
user, err := uc.repo.FindUserByID(ctx, id)
if err != nil {
return nil, err
}
_ = uc.repo.FillDepartmentNamePaths(ctx, user)
uc.fallbackDefaultRouter(ctx, user)
return user, nil
}
// UserByUUID resolves the identity from the UUID embedded in the JWT rather
// than from the mutable numeric ID used by administrative records.
func (uc *UserUsecase) UserByUUID(ctx context.Context, uuid string) (*User, error) {