hsun 1 year ago
parent
commit
47ad5cdd85
1 changed files with 3 additions and 1 deletions
  1. 3 1
      controllers/smart_report/smart_report.go

+ 3 - 1
controllers/smart_report/smart_report.go

@@ -470,8 +470,10 @@ func (this *SmartReportController) Publish() {
 	item.State = state
 	item.ModifyTime = time.Now().Local()
 	if state == smart_report.SmartReportStatePublished {
-		cols = append(cols, "PublishTime")
+		// 主动发布会清除掉预发布设置, 发布时间则取当前时间
+		cols = append(cols, "PublishTime", "PrePublishTime")
 		item.PublishTime = time.Now().Local()
+		item.PrePublishTime = time.Time{}
 
 		// 写入队列
 		var queue smart_report.Report2ImgQueueReq