Browse Source

fix;如果报告已经推送了,那么报告发布时间不变更

Roc 8 months ago
parent
commit
284fd65183
2 changed files with 3 additions and 2 deletions
  1. 1 1
      controllers/report_chapter.go
  2. 2 1
      services/report_v2.go

+ 1 - 1
controllers/report_chapter.go

@@ -1345,7 +1345,7 @@ func (this *ReportController) PublishDayWeekReportChapter() {
 	}
 
 	var publishTime time.Time
-	if reportInfo.MsgIsSend == 1 && reportInfo.PublishTime.IsZero() { //如果报告曾经发布过,并且已经发送过模版消息,则章节的发布时间为报告的发布时间
+	if reportInfo.MsgIsSend == 1 && !reportInfo.PublishTime.IsZero() { //如果报告曾经发布过,并且已经发送过模版消息,则章节的发布时间为报告的发布时间
 		publishTime = reportInfo.PublishTime
 	} else {
 		publishTime = time.Now()

+ 2 - 1
services/report_v2.go

@@ -1051,7 +1051,8 @@ func PublishReport(reportId int, reportUrl string, sysUser *system.Admin) (tips
 	}
 
 	var publishTime time.Time
-	if reportInfo.MsgIsSend == 1 && reportInfo.PublishTime.IsZero() { //如果报告曾经发布过,并且已经发送过模版消息,则章节的发布时间为报告的发布时间
+
+	if reportInfo.MsgIsSend == 1 && !reportInfo.PublishTime.IsZero() { //如果报告曾经发布过,并且已经发送过模版消息,则章节的发布时间为报告的发布时间
 		publishTime = reportInfo.PublishTime
 	} else {
 		publishTime = time.Now()