浏览代码

数据库名切换

WH01243 1 年之前
父节点
当前提交
420056457c
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      service/custom.go

+ 3 - 2
service/custom.go

@@ -340,15 +340,15 @@ func SaveConnection(tx *sql.Tx, positionId int64, businessId, ownerId string, en
 		if cm.CrmMysql.Count(table, map[string]interface{}{
 			"position_id": positionId,
 			"relate_id":   sourceType,
-			"type":        sourceType,
+			"itype":       sourceType,
 		}) > 0 {
 			cm.CrmMysql.UpdateByTx(tx, table, map[string]interface{}{
 				"position_id": positionId,
 				"relate_id":   businessId,
+				"itype":       sourceType,
 			}, map[string]interface{}{
 				"is_handle":   1,
 				"relate_id":   businessId,
-				"type":        sourceType,
 				"update_time": time.Now().Format(date.Date_Full_Layout),
 				"is create":   1,
 			})
@@ -362,6 +362,7 @@ func SaveConnection(tx *sql.Tx, positionId int64, businessId, ownerId string, en
 				"relate_id":   businessId,
 				"is_handle":   1,
 				"is create":   1,
+				"itype":       sourceType,
 				"create_time": time.Now().Format(date.Date_Full_Layout),
 			})
 			return id > 0