Commit ae0fe89f authored by chenweijian's avatar chenweijian

接口优化

parent 35c77337
...@@ -534,7 +534,7 @@ type CvUserDetailRoom struct { //不会有返回值 ...@@ -534,7 +534,7 @@ type CvUserDetailRoom struct { //不会有返回值
IsLike *bool `json:"isLike"` IsLike *bool `json:"isLike"`
//别人是否喜欢我,自己本人没有数据 (20210205 已废弃nil,产品说:可以自己喜欢自己) //别人是否喜欢我,自己本人没有数据 (20210205 已废弃nil,产品说:可以自己喜欢自己)
IsLikeMe *bool `json:"isLikeMe"` IsLikeMe *bool `json:"isLikeMe"`
Cp *CvCp `json:"cp,omitempty"` // cp信息 Cp *CvCpTiny `json:"cp,omitempty"` // cp信息
} }
// cv国家管理人员 // cv国家管理人员
...@@ -552,6 +552,33 @@ type CvCp struct { ...@@ -552,6 +552,33 @@ type CvCp struct {
CpDays int `json:"cpDays"` // cp天数 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关系 // cp关系
type CvCpRelation struct { type CvCpRelation struct {
CpId uint64 `json:"cpId"` CpId uint64 `json:"cpId"`
......
...@@ -112,7 +112,7 @@ func UserDetailByExternalId(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -112,7 +112,7 @@ func UserDetailByExternalId(c *gin.Context) (*mycontext.MyContext, error) {
// @Summary 房间内获取用户信息 // @Summary 房间内获取用户信息
// @Param userExternalId query string true "userExternalId" // @Param userExternalId query string true "userExternalId"
// @Param groupId query string false "群组id,当传了该id,则返回该用户在该群组的身份" // @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] // @Router /v2/user/detail/room [get]
func GetUserDetailInRoom(c *gin.Context) (*mycontext.MyContext, error) { func GetUserDetailInRoom(c *gin.Context) (*mycontext.MyContext, error) {
myContext := mycontext.CreateMyContext(c.Keys) myContext := mycontext.CreateMyContext(c.Keys)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment