From ba17b10a5025d81ae25d47a7d6d082c583e48b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BD=A6=E4=B9=85=E9=BE=99?= Date: Wed, 8 Mar 2023 13:51:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9Batch=20=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index de5a45d..876f7df 100644 --- a/main.go +++ b/main.go @@ -450,7 +450,7 @@ func batchInsert(fileName string, isLastCall bool, excludedFilename string) int break } - communicationChannelID, _ := strconv.ParseUint(record[0], 10, 32) + //communicationChannelID, _ := strconv.ParseUint(record[0], 10, 32) TargetsMember, _ := strconv.ParseUint(record[2], 10, 32) templateID, _ := strconv.ParseUint(record[3], 10, 32) status := uint(1) @@ -463,7 +463,7 @@ func batchInsert(fileName string, isLastCall bool, excludedFilename string) int batchName = fmt.Sprintf("lastCall-%s-%s-%s", record[1], excludedFilename, strconv.Itoa(int(communicationChannelID))) dataFileName = fmt.Sprintf("lastCall-%s-%s", excludedFilename, fileName) } else { - batchName = fmt.Sprintf("%s-%s", record[1], strconv.Itoa(int(communicationChannelID))) + batchName = fmt.Sprintf("%s-%s", record[1], record[0]) dataFileName = fileName } @@ -487,7 +487,7 @@ func batchInsert(fileName string, isLastCall bool, excludedFilename string) int fmt.Println(sid) batch := Batch{ - CommunicationChannelID: uint(communicationChannelID), + CommunicationChannelID: record[0], CommunicationName: batchName, TargetsMember: uint(TargetsMember), TemplateID: uint(templateID), @@ -1113,7 +1113,7 @@ var ( //初始化变量 type Batch struct { ID uint `gorm:"primary_key"` - CommunicationChannelID uint + CommunicationChannelID string CommunicationName string `gorm:"type:varchar(255)"` TargetsMember uint `gorm:"type:int"` TemplateID uint