MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / GetProfileByUserID

Method GetProfileByUserID

internal/service/user.go:203–209  ·  view source on GitHub ↗

GetProfileByUserID 获取用户资料

(ctx context.Context, UserID int64)

Source from the content-addressed store, hash-verified

201
202// GetProfileByUserID 获取用户资料
203func (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 获取用户列表
212func (us *userService) ListUser(ctx context.Context, pagination domain.Pagination) ([]domain.UserWithProfile, error) {

Callers

nothing calls this directly

Calls 1

GetProfileMethod · 0.65

Tested by

no test coverage detected