123456789101112131415161718192021222324252627282930313233343536 |
- package services
- import (
- "context"
- "eta/eta_task/models"
- "eta/eta_task/models/data_manage"
- "eta/eta_task/services/alarm_msg"
- "eta/eta_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
- }
|