浏览代码

账户名修改

WH01243 1 年之前
父节点
当前提交
296bc414b6
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      ent/entity/user.go

+ 1 - 2
ent/entity/user.go

@@ -362,7 +362,6 @@ func (u *User) UpdateInfo(mail string, phone string, name string, userId, deptId
 					"phone": phone,
 				},
 			}, false, false)
-			u.UpdateUserName(entId, userId, user_name)
 			return f
 		} else {
 			return false
@@ -376,7 +375,7 @@ func (u *User) UpdateInfo(mail string, phone string, name string, userId, deptId
 				},
 			}, true, false)
 			ok_2 := VarUser.Move(tx, entId, deptId, fmt.Sprint(userId))
-			u.UpdateUserName(entId, userId, user_name)
+			u.UpdateUserName(tx, entId, userId, user_name)
 			return ok_1 == 1 && ok_2
 		})
 	}