Răsfoiți Sursa

fix:定时保存时,一些基础信息的过滤

Roc 1 săptămână în urmă
părinte
comite
b51efb1949
1 a modificat fișierele cu 4 adăugiri și 2 ștergeri
  1. 4 2
      controllers/report_chapter.go

+ 4 - 2
controllers/report_chapter.go

@@ -377,6 +377,7 @@ func (this *ReportController) EditDayWeekChapter() {
 	reportInfo.LastModifyAdminName = sysUser.RealName
 	reportInfo.ModifyTime = time.Now()
 
+	updateCols := make([]string, 0)
 	reqTickerList := req.TickerList
 	// 更新章节及指标
 	contentSub := ""
@@ -405,6 +406,7 @@ func (this *ReportController) EditDayWeekChapter() {
 
 	if req.Title != "" {
 		reportChapterInfo.Title = req.Title
+		updateCols = append(updateCols, "Title")
 	}
 	//reportChapterInfo.AddType = req.AddType
 	reportChapterInfo.Author = req.Author
@@ -414,6 +416,7 @@ func (this *ReportController) EditDayWeekChapter() {
 	reportChapterInfo.ModifyTime = time.Now()
 	if req.CreateTime != `` {
 		reportChapterInfo.CreateTime = req.CreateTime
+		updateCols = append(updateCols, "CreateTime")
 	}
 
 	reportChapterInfo.LastModifyAdminId = sysUser.AdminId
@@ -421,8 +424,7 @@ func (this *ReportController) EditDayWeekChapter() {
 	reportChapterInfo.ContentModifyTime = time.Now()
 	reportChapterInfo.ContentStruct = html.EscapeString(req.ContentStruct)
 
-	updateCols := make([]string, 0)
-	updateCols = append(updateCols, "Title", "AddType", "Author", "Content", "ContentSub", "IsEdit", "CreateTime", "ModifyTime")
+	updateCols = append(updateCols, "Author", "Content", "ContentSub", "IsEdit", "ModifyTime")
 
 	updateCols = append(updateCols, "LastModifyAdminId", "LastModifyAdminName", "ContentModifyTime", "ContentStruct")