|
@@ -0,0 +1,28 @@
|
|
|
+package services
|
|
|
+
|
|
|
+import (
|
|
|
+ "context"
|
|
|
+ "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.FormatDateTime)
|
|
|
+ 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
|
|
|
+}
|