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