FindByUsername 通过用户名查询用户
(ctx context.Context, username string)
| 112 | |
| 113 | // FindByUsername 通过用户名查询用户 |
| 114 | func (ur *userRepository) FindByUsername(ctx context.Context, username string) (domain.User, error) { |
| 115 | u, err := ur.dao.FindByUsername(ctx, username) |
| 116 | if err != nil { |
| 117 | return domain.User{}, err |
| 118 | } |
| 119 | |
| 120 | return toDomainUser(u), nil |
| 121 | } |
| 122 | |
| 123 | // DeleteUser 删除用户 |
| 124 | func (ur *userRepository) DeleteUser(ctx context.Context, username string, uid int64) error { |
nothing calls this directly
no test coverage detected