修改提醒邮件内容

This commit is contained in:
chejiulong 2023-02-18 19:44:44 +08:00
parent d0cf1bbe0b
commit 4cc1dd0361

View File

@ -293,7 +293,7 @@ func downloadDecompression() {
applogger.Info("下载完成(批次文件):%d", file.Name())
batchInsert(file.Name())
fmt.Println("入库完成(批次文件)" + file.Name())
applogger.Info("入库完成(批次文件):%d", file.Name())
applogger.Info("入库完成(批次文件):%d\n", file.Name())
}
err = redisClient.Set(fileKey, 1, 0).Err() //写入下载、解压、入库完成标记
if err != nil {
@ -406,13 +406,10 @@ func batchDataInsert(fileName string) {
scanner.Split(bufio.ScanLines)
scanner.Scan() // skip first line
bi := 0
bi2 := 0
//var filtered []string
duplicateCount := make(map[string]int)
var count int64
var count int
for scanner.Scan() {
bi2++
line := scanner.Text()
row, err := csv.NewReader(strings.NewReader(line)).Read()
if err != nil {
@ -510,7 +507,7 @@ func batchDataInsert(fileName string) {
dataBatchDuplicate = make([]BatchDataDuplicateLog, 0, batchSize)
}
subject := "丝芙兰数据包处理完成"
body := "数据包:" + fileName + ";\n总数据(过滤后)" + strconv.FormatInt(count, 10) + ";\n处理完成请前往管理平台查看处理。"
body := "数据包:" + fileName + ";\n总数" + strconv.Itoa(count-bi) + ";\n过滤重复数" + strconv.Itoa(bi) + ";\n过滤后总数" + strconv.Itoa(count) + "\n处理完成请前往管理平台查看处理。"
err = SendEmail(subject, body) //发送邮件
if err != nil {
applogger.Info("邮件发送失:%d", err)