Переглянути джерело

Merge branch 'feature/v1.2.13' of http://192.168.3.207:8080/BaseService/userCenter into feature/v1.2.13

wangshan 2 роки тому
батько
коміт
7e965f606a
1 змінених файлів з 6 додано та 0 видалено
  1. 6 0
      entity/ent.go

+ 6 - 0
entity/ent.go

@@ -274,6 +274,12 @@ func (this *EntInfo) Update() bool {
 		ok_1 := this.Mysql.UpdateByTx(tx, Entniche_info, map[string]interface{}{
 			"id": this.Id,
 		}, m)
+		if this.Name != "" {
+			this.Mysql.UpdateByTx(tx, Entniche_department, map[string]interface{}{
+				"ent_id": this.Id,
+				"pid":    0,
+			}, map[string]interface{}{"name": this.Name})
+		}
 		AuthRecordId := this.Mysql.InsertByTx(tx, Auth_record, map[string]interface{}{
 			"entId":            this.Id,
 			"creditCode":       this.Code,