修改强制给表

This commit is contained in:
eson
2023-11-24 10:25:43 +08:00
parent f97d4d9c6d
commit 47aefb5e00
2 changed files with 9 additions and 1 deletions

View File

@@ -39,6 +39,14 @@ func (l *UserGetProfileLogic) UserGetProfile(req *types.QueryProfileRequest, use
return resp.SetStatusWithMessage(basic.CodeApiErr, err.Error())
}
user, err := l.svcCtx.AllModels.FsUser.FindUserById(context.TODO(), userinfo.UserId)
if err != nil {
logx.Error(err) // 日志记录错误
return resp.SetStatus(basic.CodeDbSqlErr, err) // 返回数据库创建错误
}
profileBase["email"] = *user.Email
return resp.SetStatus(basic.CodeOK, profileBase)
}