Browse Source

账户名修改

WH01243 1 year ago
parent
commit
296bc414b6
1 changed files with 1 additions and 2 deletions
  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,
 					"phone": phone,
 				},
 				},
 			}, false, false)
 			}, false, false)
-			u.UpdateUserName(entId, userId, user_name)
 			return f
 			return f
 		} else {
 		} else {
 			return false
 			return false
@@ -376,7 +375,7 @@ func (u *User) UpdateInfo(mail string, phone string, name string, userId, deptId
 				},
 				},
 			}, true, false)
 			}, true, false)
 			ok_2 := VarUser.Move(tx, entId, deptId, fmt.Sprint(userId))
 			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
 			return ok_1 == 1 && ok_2
 		})
 		})
 	}
 	}