Browse Source

fix: 撤销发布重置发布时间

hsun 1 year ago
parent
commit
1206e642e3
1 changed files with 3 additions and 2 deletions
  1. 3 2
      controllers/smart_report/smart_report.go

+ 3 - 2
controllers/smart_report/smart_report.go

@@ -480,11 +480,12 @@ func (this *SmartReportController) Publish() {
 		_ = utils.Rc.LPush(utils.CACHE_CREATE_REPORT_IMGPDF_QUEUE, queue)
 	}
 
-	// 取消发布时同时清除掉Img和PDF的文件地址, 以及预发布设置
+	// 取消发布时同时清除掉Img和PDF的文件地址, 发布时间以及预发布时间
 	if state == smart_report.SmartReportStateWaitPublish {
-		cols = append(cols, "DetailImgUrl", "DetailPdfUrl", "PrePublishTime")
+		cols = append(cols, "DetailImgUrl", "DetailPdfUrl", "PublishTime", "PrePublishTime")
 		item.DetailImgUrl = ""
 		item.DetailPdfUrl = ""
+		item.PublishTime = time.Time{}
 		item.PrePublishTime = time.Time{}
 	}
 	if e = item.Update(cols); e != nil {