Roc 7 months ago
parent
commit
6f4cb223c6
2 changed files with 2 additions and 5 deletions
  1. 1 4
      controllers/report.go
  2. 1 1
      services/wechat_send_msg.go

+ 1 - 4
controllers/report.go

@@ -1912,10 +1912,7 @@ func (this *ReportController) SendMsg() {
 	// 可能存在历史数据两个只推了一个所以此处加个判断
 	// 推送模板消息
 	if reportInfo.MsgIsSend == 0 {
-		go func() {
-			fmt.Println("推送模板消息:", req.ReportId)
-			_ = services.SendMiniProgramReportWxMsg(req.ReportId)
-		}()
+		go services.SendMiniProgramReportWxMsg(req.ReportId)
 	}
 
 	// 更新推送消息状态

+ 1 - 1
services/wechat_send_msg.go

@@ -26,7 +26,7 @@ func SendMiniProgramReportWxMsg(reportId int) (err error) {
 			//go utils.SendEmail("SendMiniProgramReportWxMsg发送报告模版消息失败"+"【"+utils.APPNAME+"】"+"【"+utils.RunMode+"】"+time.Now().Format("2006-01-02 15:04:05"), "ReportId:"+reportIdStr+";"+msg+";Err:"+err.Error(), toUser)
 		}
 	}()
-	utils.FileLog.Info("%s", "services SendMsg")
+	fmt.Println("推送模板消息 services SendMsg:", reportId)
 
 	report, err := models.GetReportByReportId(reportId)
 	if err != nil {