新增检测用户信息是否补全

This commit is contained in:
wucongxing8150 2024-08-23 13:26:14 +08:00
parent d40aafe627
commit 04b6469827
2 changed files with 15 additions and 2 deletions

View File

@ -26,7 +26,7 @@ type UserDto struct {
LoginIp string `json:"login_ip"` // 登陆ip
CreatedAt model.LocalTime `json:"created_at"` // 创建时间
UpdatedAt model.LocalTime `json:"updated_at"` // 更新时间
IsCompleteInfo bool `json:"Is_complete_info"` // 信息是否完整0:否 1:是)
IsCompleteInfo bool `json:"is_complete_info"` // 信息是否完整0:否 1:是)
}
// UserCheckDto 检测用户

View File

@ -940,5 +940,18 @@ func (r *UserService) CheckUserInfo(userInfo *model.UserInfo) bool {
if userInfo.Height == "" {
return false
}
if userInfo.Weight == "" {
return false
}
if userInfo.IsFamilyHistory == nil {
return false
}
if userInfo.ProvinceId == nil {
return false
}
return true
}