|
@@ -6,7 +6,6 @@ import (
|
|
|
"hongze/hongze_task/models"
|
|
|
"hongze/hongze_task/utils"
|
|
|
"os"
|
|
|
- "strconv"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
@@ -51,7 +50,7 @@ func ReportViewTimes() (err error) {
|
|
|
cellB := row.AddCell()
|
|
|
cellB.Value = item.CompanyName
|
|
|
cellC := row.AddCell()
|
|
|
- cellC.Value = strconv.Itoa(item.ViewCount)
|
|
|
+ cellC.SetInt(item.ViewCount)
|
|
|
cellD := row.AddCell()
|
|
|
cellD.Value = item.CreateTime
|
|
|
}
|
|
@@ -63,7 +62,7 @@ func ReportViewTimes() (err error) {
|
|
|
cellB := row.AddCell()
|
|
|
cellB.Value = item.CompanyName
|
|
|
cellC := row.AddCell()
|
|
|
- cellC.Value = strconv.Itoa(item.ViewCount)
|
|
|
+ cellC.SetInt(item.ViewCount)
|
|
|
cellD := row.AddCell()
|
|
|
cellD.Value = item.CreateTime
|
|
|
}
|
|
@@ -77,8 +76,8 @@ func ReportViewTimes() (err error) {
|
|
|
title := "用户访问次数"
|
|
|
content := "你好,上周用户访问次数见附件。"
|
|
|
fmt.Println("start send email")
|
|
|
- //sendResult := utils.SendEmailByHongze(title, content, utils.EmailSendToHzUsers, savePath)
|
|
|
- sendResult:=utils.SendEmailByHongze(title,content,utils.EmailSendToMe,savePath)
|
|
|
+ sendResult := utils.SendEmailByHongze(title, content, utils.EmailSendToHzUsers, savePath)
|
|
|
+ //sendResult:=utils.SendEmailByHongze(title,content,utils.EmailSendToMe,savePath)
|
|
|
if sendResult {
|
|
|
os.Remove(savePath)
|
|
|
}
|