diff --git a/cv/user_cv/user.go b/cv/user_cv/user.go index 5aeee0cbcd3aa3fbbc605ac47f9a46ad637f6205..b64e447739823e54537a72e82faab2fd3de64dea 100644 --- a/cv/user_cv/user.go +++ b/cv/user_cv/user.go @@ -533,8 +533,8 @@ type CvUserDetailRoom struct { //不会有返回值 //是否喜欢(本人没有数据,//20210205 已废弃nil,产品说:可以自己喜欢自己) IsLike *bool `json:"isLike"` //别人是否喜欢我,自己本人没有数据 (20210205 已废弃nil,产品说:可以自己喜欢自己) - IsLikeMe *bool `json:"isLikeMe"` - Cp *CvCp `json:"cp,omitempty"` // cp信息 + IsLikeMe *bool `json:"isLikeMe"` + Cp *CvCpTiny `json:"cp,omitempty"` // cp信息 } // cv国家管理人员 @@ -552,6 +552,33 @@ type CvCp struct { CpDays int `json:"cpDays"` // cp天数 } +// cp信息 +type CvCpTiny struct { + CpUserInfo *CvCpUser `json:"cpUserInfo"` // cp用户信息 + CpLevel CvCpLevel `json:"cpLevel"` // cp等级 + MyPrivilegeList []CvPrivilege `json:"myPrivilegeList"` // 等级特权 + CreatedUnix int64 `json:"createdUnix"` // cp创建时间 + CpDays int `json:"cpDays"` // cp天数 +} + +type CvCpUser struct { + //不会有返回值 + Id *mysql.ID `json:"id,omitempty"` + //头像,不存在为nil + Avatar *string `json:"avatar"` + //用户对外ID + ExternalId *string `json:"externalId"` + //昵称,不存在为nil + Nick *string `json:"nick"` + //性别 1:男 2:女,不存在为nil + Sex *uint8 `json:"sex"` + //邀请码 + Code *string `json:"code"` + Headwear *headwear_cv.CvHeadwear `json:"headwear"` // 当前使用的头饰 + Svip rpc.CvSvip `json:"svip"` // svip结构,等级+权限 + Noble noble_cv.CvNoble `json:"noble"` // 当前的 +} + // cp关系 type CvCpRelation struct { CpId uint64 `json:"cpId"` diff --git a/route/user_r/user.go b/route/user_r/user.go index 2684af6cb3d46f5911110e041dfcb47c8de16d7b..0b55220399f6cef10c714438690bbc9a019cb486 100644 --- a/route/user_r/user.go +++ b/route/user_r/user.go @@ -112,7 +112,7 @@ func UserDetailByExternalId(c *gin.Context) (*mycontext.MyContext, error) { // @Summary 房间内获取用户信息 // @Param userExternalId query string true "userExternalId" // @Param groupId query string false "群组id,当传了该id,则返回该用户在该群组的身份" -// @Success 200 {object} user_cv.CvUserDetail +// @Success 200 {object} user_cv.CvUserDetailRoom // @Router /v2/user/detail/room [get] func GetUserDetailInRoom(c *gin.Context) (*mycontext.MyContext, error) { myContext := mycontext.CreateMyContext(c.Keys)