Bläddra i källkod

feat: 新增人员修改字段

zhangxinlei1996 1 år sedan
förälder
incheckning
53bb8a892c
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      ent/entity/user.go

+ 3 - 3
ent/entity/user.go

@@ -366,10 +366,10 @@ func (u *User) UpdateUserName(tx *sql.Tx, entId, userId int, user_name, phone st
 }
 
 // 修改用户信息包括用户名和手机号  20210429海康威视需求新增的
-func (u *User) UpdateInfo(mail string, phone string, name string, userId, deptId, entId int, entPhone string, entName, user_name string, isAdmin bool) bool {
+func (u *User) UpdateInfo(mail string, phone string, name string, userId, deptId, entId int, entPhone string, entName, user_name string, nicheDis int, isAdmin bool) bool {
 	if isAdmin {
 		ok := Mysql.ExecTx("修改员工", func(tx *sql.Tx) bool {
-			ok_1 := Mysql.UpdateOrDeleteBySqlByTx(tx, `update entniche_user set mail=?,phone=?,name=?,timestamp=? ,user_name=? where id=? and ent_id=?`, mail, phone, name, NowFormat(Date_Full_Layout), user_name, userId, entId)
+			ok_1 := Mysql.UpdateOrDeleteBySqlByTx(tx, `update entniche_user set mail=?,phone=?,name=?,timestamp=? ,user_name=? ,niche_dis =?  where id=? and ent_id=?`, mail, phone, name, NowFormat(Date_Full_Layout), user_name, nicheDis, userId, entId)
 			MQFW.Update("ent_user", map[string]interface{}{"i_entid": entId, "i_userid": userId}, map[string]interface{}{
 				"$set": map[string]interface{}{
 					"o_pushset.s_email": mail,
@@ -392,7 +392,7 @@ func (u *User) UpdateInfo(mail string, phone string, name string, userId, deptId
 		}
 	} else {
 		return Mysql.ExecTx("修改员工", func(tx *sql.Tx) bool {
-			ok_1 := Mysql.UpdateOrDeleteBySqlByTx(tx, `update entniche_user set mail=?,phone=?,name=?,timestamp=? ,user_name=? where id=? and ent_id=?`, mail, phone, name, NowFormat(Date_Full_Layout), user_name, userId, entId)
+			ok_1 := Mysql.UpdateOrDeleteBySqlByTx(tx, `update entniche_user set mail=?,phone=?,name=?,timestamp=? ,user_name=? , niche_dis =? where id=? and ent_id=?`, mail, phone, name, NowFormat(Date_Full_Layout), user_name, nicheDis, userId, entId)
 			MQFW.Update("ent_user", map[string]interface{}{"i_entid": entId, "i_userid": userId}, map[string]interface{}{
 				"$set": map[string]interface{}{
 					"o_pushset.s_email": mail,