修改Batch 结构体

This commit is contained in:
chejiulong 2023-03-08 13:51:15 +08:00
parent 141dd7088d
commit ba17b10a50

View File

@ -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