新增加载用户属性
This commit is contained in:
@@ -17,6 +17,7 @@ type UserDto struct {
|
||||
RegisterMethod int `json:"register_method"` // 注册方式(1:微信小程序)
|
||||
Age uint `json:"age"` // 年龄
|
||||
Sex int `json:"sex"` // 性别(0:未知 1:男 2:女)
|
||||
Email string `json:"email"` // 邮箱
|
||||
Avatar string `json:"avatar"` // 头像
|
||||
IsOnline int `json:"is_online"` // 是否在线(0:不在线 1:在线)
|
||||
LoginAt model.LocalTime `json:"login_at"` // 小程序登陆时间
|
||||
@@ -39,6 +40,7 @@ func GetUserDto(m *model.User) *UserDto {
|
||||
RegisterMethod: m.RegisterMethod,
|
||||
Age: m.Age,
|
||||
Sex: m.Sex,
|
||||
Email: m.Email,
|
||||
Avatar: utils.AddOssDomain(m.Avatar),
|
||||
IsOnline: m.IsOnline,
|
||||
LoginAt: m.LoginAt,
|
||||
@@ -62,6 +64,7 @@ func GetMaskUserDto(m *model.User) *UserDto {
|
||||
RegisterMethod: m.RegisterMethod,
|
||||
Age: m.Age,
|
||||
Sex: m.Sex,
|
||||
Email: m.Email,
|
||||
Avatar: utils.AddOssDomain(m.Avatar),
|
||||
IsOnline: m.IsOnline,
|
||||
LoginAt: m.LoginAt,
|
||||
@@ -90,6 +93,7 @@ func GetUserListDto(m []*model.User) []UserDto {
|
||||
RegisterMethod: v.RegisterMethod,
|
||||
Age: v.Age,
|
||||
Sex: v.Sex,
|
||||
Email: v.Email,
|
||||
Avatar: utils.AddOssDomain(v.Avatar),
|
||||
IsOnline: v.IsOnline,
|
||||
LoginAt: v.LoginAt,
|
||||
|
||||
@@ -105,6 +105,7 @@ type UserDoctorIntroductionDto struct {
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Age uint `json:"age"` // 年龄
|
||||
Sex int `json:"sex"` // 性别(0:未知 1:男 2:女)
|
||||
Email string `json:"email"` // 邮箱
|
||||
RegisterMethod int `json:"register_method"` // 注册方式(1:微信小程序 2:后台添加 )
|
||||
ApplyTime model.LocalTime `json:"apply_time"` // 申请时间
|
||||
BeGoodAt string `json:"be_good_at"` // 擅长
|
||||
@@ -558,6 +559,7 @@ func (r *UserDoctorIntroductionDto) LoadUserAttr(m *model.User) *UserDoctorIntro
|
||||
r.RegisterMethod = m.RegisterMethod
|
||||
r.Age = m.Age
|
||||
r.Sex = m.Sex
|
||||
r.Email = m.Email
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user