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