✨ 重新初始化项目
This commit is contained in:
@@ -32,6 +32,7 @@ func (u userApi) GetUser(ctx *gin.Context) {
|
||||
// 转换为VO
|
||||
var v vo.UserVO
|
||||
v.ParseOrdinary(ue)
|
||||
|
||||
core.R(ctx).OkWithData(v)
|
||||
}
|
||||
|
||||
@@ -56,11 +57,11 @@ func (u userApi) BindingWeChat(ctx *gin.Context) {
|
||||
core.R(ctx).FailWithMessage("系统错误,请稍后再试")
|
||||
return
|
||||
}
|
||||
log.Debugf("用户[%v]的UnionId为[%v],OpenId为[%v]", loginUser.Id, unionId, openId)
|
||||
if repository.User().CheckUnionIdIsExist(unionId, openId) {
|
||||
core.R(ctx).FailWithMessage("该微信已绑定其他账号")
|
||||
return
|
||||
}
|
||||
//log.Debugf("用户[%v]的UnionId为[%v],OpenId为[%v]", loginUser.Id, unionId, openId)
|
||||
//if repository.User().CheckUnionIdIsExist(unionId, openId) {
|
||||
// core.R(ctx).FailWithMessage("该微信已绑定其他账号")
|
||||
// return
|
||||
//}
|
||||
// 解析成功,修改用户信息
|
||||
loginUser.WechatUnionId = &unionId
|
||||
loginUser.WechatOpenId = &openId
|
||||
@@ -100,5 +101,6 @@ func (u userApi) UpdateUser(ctx *gin.Context) {
|
||||
core.R(ctx).FailWithMessage("修改用户信息失败: " + err.Error())
|
||||
return
|
||||
}
|
||||
// 操作成功,更新头像和昵称
|
||||
core.R(ctx).Ok()
|
||||
}
|
||||
|
Reference in New Issue
Block a user