更新
This commit is contained in:
1 parent
fb04d66e61
commit
b6b528490c
13 files changed
+518
-168
No files matched your search
@@ -168,12 +168,14 @@ func (c *AppAuthController) UpdateCurrentUserProfile() {
|
||||
}
|
||||
|
||||
uid := services.ResolveTenantUID(uint64(claims.TenantId), uint64(claims.UserID))
|
||||
num, err := models.Orm.QueryTable(new(models.SystemTenantUser)).
|
||||
// 尚未加入企业(tid=0)的新注册用户没有老表行,属正常情况;
|
||||
// 姓名仍写入统一身份,工作台首页直接读它显示。
|
||||
_, err = models.Orm.QueryTable(new(models.SystemTenantUser)).
|
||||
Filter("uid", uid).
|
||||
Filter("tid", claims.TenantId).
|
||||
Update(map[string]interface{}{"name": name, "email": email})
|
||||
if err != nil || num == 0 {
|
||||
c.serveJSON(map[string]interface{}{"code": 400, "msg": "未找到当前企业下的用户资料"})
|
||||
if err != nil {
|
||||
c.serveJSON(map[string]interface{}{"code": 500, "msg": "资料更新失败,请重试"})
|
||||
return
|
||||
}
|
||||
_, _ = models.Orm.QueryTable(new(models.AuthIdentity)).
|
||||
|
||||
Reference in new issue
Block a user