Commit f9fcc225 authored by hujiebin's avatar hujiebin

feat:内部接口多加两个字段

parent e40db93b
...@@ -7,6 +7,8 @@ type CvCp struct { ...@@ -7,6 +7,8 @@ type CvCp struct {
CpUserInfo *user_cv.CvUserBase `json:"cpUserInfo"` // cp用户信息 CpUserInfo *user_cv.CvUserBase `json:"cpUserInfo"` // cp用户信息
CpLevel CvCpLevel `json:"cpLevel"` // cp等级 CpLevel CvCpLevel `json:"cpLevel"` // cp等级
MyPrivilegeList []CvPrivilege `json:"myPrivilegeList"` // 等级特权 MyPrivilegeList []CvPrivilege `json:"myPrivilegeList"` // 等级特权
CreatedUnix int64 `json:"createdUnix"` // cp创建时间
CpDays int `json:"cpDays"` // cp天数
} }
// cp关系 // cp关系
......
...@@ -157,6 +157,8 @@ func GetUserCp(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -157,6 +157,8 @@ func GetUserCp(c *gin.Context) (*mycontext.MyContext, error) {
Level: cpLevel, Level: cpLevel,
}, },
MyPrivilegeList: myPrivilegeList, MyPrivilegeList: myPrivilegeList,
CpDays: int(time.Now().Sub(cpRelation.CreatedTime).Hours()/24) + 1,
CreatedUnix: cpRelation.CreatedTime.Unix(),
} }
resp.ResponseOk(c, response) resp.ResponseOk(c, response)
return myContext, nil return myContext, nil
......
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