|
@@ -636,7 +636,7 @@ func SendEmailUserWhiteListChange(cont context.Context) (err error) {
|
|
|
msg = "获取失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- fmt.Println("发送附件完成", len(list1))
|
|
|
+
|
|
|
var rep models.UserWhiteListRep
|
|
|
for _, v := range list2 {
|
|
|
list1 = append(list1, v)
|
|
@@ -738,7 +738,9 @@ func SendEmailUserWhiteListChange(cont context.Context) (err error) {
|
|
|
title := time.Now().Format("2006-01-02") + "新增白名单用户"
|
|
|
content := time.Now().Format("2006-01-02") + "新增白名单用户"
|
|
|
fileName := downLoadnFilePath
|
|
|
- go utils.SendEmailHaveFile(title, content, fileName, utils.EmaiWhiteUserList)
|
|
|
+ if len(rep.List) > 0 {
|
|
|
+ go utils.SendEmailHaveFile(title, content, fileName, utils.EmaiWhiteUserList)
|
|
|
+ }
|
|
|
//go utils.SendEmailHaveFile(title, content, fileName, "cxzhang@hzinsights.com")
|
|
|
//go utils.SendEmailHaveFile(title, content, fileName, "tshen@hzinsights.com")
|
|
|
time.Sleep(time.Duration(2) * time.Second) //延迟两秒,避免过多活动的时候邮件发送没有内容
|
|
@@ -854,7 +856,10 @@ func SendEmailUserWhiteListChange(cont context.Context) (err error) {
|
|
|
title = time.Now().Format("2006-01-02") + "删除白名单用户"
|
|
|
content = time.Now().Format("2006-01-02") + "删除白名单用户"
|
|
|
fileName = downLoadnFilePaths
|
|
|
- go utils.SendEmailHaveFile(title, content, fileName, utils.EmaiWhiteUserList)
|
|
|
+ if len(listFrozen) > 0 {
|
|
|
+ go utils.SendEmailHaveFile(title, content, fileName, utils.EmaiWhiteUserList)
|
|
|
+ }
|
|
|
+
|
|
|
//go utils.SendEmailHaveFile(title, content, fileName, "cxzhang@hzinsights.com")
|
|
|
time.Sleep(time.Duration(2) * time.Second) //延迟两秒,避免过多活动的时候邮件发送没有内容
|
|
|
defer func() {
|
|
@@ -906,9 +911,6 @@ func SendEmailUserWhiteListChange(cont context.Context) (err error) {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- fmt.Println("发送附件完成", len(list1))
|
|
|
- fmt.Println("发送附件完成", len(list2))
|
|
|
- fmt.Println("发送附件完成", len(rep.List))
|
|
|
fmt.Println("发送附件完成", len(listFrozen))
|
|
|
return
|
|
|
}
|