GetProfile 通过用户ID获取用户资料
(ctx context.Context, UserID int64)
| 166 | |
| 167 | // GetProfile 通过用户ID获取用户资料 |
| 168 | func (ur *userRepository) GetProfile(ctx context.Context, UserID int64) (domain.Profile, error) { |
| 169 | profile, err := ur.dao.GetProfileByUserID(ctx, UserID) |
| 170 | if err != nil { |
| 171 | ur.l.Error("获取用户资料失败", zap.Error(err)) |
| 172 | return domain.Profile{}, err |
| 173 | } |
| 174 | |
| 175 | return profile, nil |
| 176 | } |
| 177 | |
| 178 | // ListUser 获取用户列表 |
| 179 | func (ur *userRepository) ListUser(ctx context.Context, pagination domain.Pagination) ([]domain.UserWithProfile, error) { |
nothing calls this directly
no test coverage detected