GetProfileByUserID 获取用户资料
(ctx context.Context, UserID int64)
| 201 | |
| 202 | // GetProfileByUserID 获取用户资料 |
| 203 | func (us *userService) GetProfileByUserID(ctx context.Context, UserID int64) (domain.Profile, error) { |
| 204 | if UserID <= 0 { |
| 205 | return domain.Profile{}, errors.New("无效的用户ID") |
| 206 | } |
| 207 | |
| 208 | return us.repo.GetProfile(ctx, UserID) |
| 209 | } |
| 210 | |
| 211 | // ListUser 获取用户列表 |
| 212 | func (us *userService) ListUser(ctx context.Context, pagination domain.Pagination) ([]domain.UserWithProfile, error) { |
nothing calls this directly
no test coverage detected