package services import ( "context" "hongze/hongze_task/models" "hongze/hongze_task/models/data_manage" "hongze/hongze_task/services/alarm_msg" "hongze/hongze_task/utils" "time" ) func DeleteLog(cont context.Context) (err error) { date := time.Now().AddDate(0,-1,0).Format(utils.FormatDate) go func() { err = data_manage.DeletePPTLogByDate(date) if err != nil { alarm_msg.SendAlarmMsg("DeletePPTLogByDate ErrMsg:"+err.Error(), 3) } }() go func() { err = data_manage.DeleteReportLogByDate(date) if err != nil { alarm_msg.SendAlarmMsg("DeleteReportLogByDate ErrMsg:"+err.Error(), 3) } }() go func() { err = models.DeleteTemplateRecordByDate(date) if err != nil { alarm_msg.SendAlarmMsg("DeleteTemplateRecordByDate ErrMsg:"+err.Error(), 3) } }() return }