Browse Source

Merge branch 'dev_v1.0.3_wh' of moapp/jypkg into feature/v1.0.3

王浩 1 year ago
parent
commit
8479331906
1 changed files with 2 additions and 5 deletions
  1. 2 5
      ent/entity/user.go

+ 2 - 5
ent/entity/user.go

@@ -314,11 +314,8 @@ func (u *User) UpdateUserName(entId, userId int, user_name string) {
 	//mog库user表,用户名字段 user_name
 	if user_name != "" && len(user_name) > 0 {
 		user := u.GetById(entId, userId)
-		Mysql.Update(Entniche_user, map[string]interface{}{
-			"phone": user.Phone,
-		}, map[string]interface{}{
-			"user_name": user_name,
-		})
+		Mysql.UpdateOrDeleteBySql(`update entniche_user set user_name=? where phone=? and  ent_id!=?`, user.User_name, user.Phone, entId)
+
 		data, _ := MQFW.Find("user", map[string]interface{}{
 			"i_appid": 2,
 			"$or": []map[string]interface{}{