12345678910111213141516171819202122232425262728 |
- package services
- import (
- "context"
- "eta_gn/eta_task/models/data_manage"
- "eta_gn/eta_task/services/alarm_msg"
- "eta_gn/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)
- }
- }()
- return
- }
|