Browse Source

Merge branch 'feature/yb11.1_rai_report' into debug

# Conflicts:
#	services/report_rai.go
xyxie 1 week ago
parent
commit
e8e2fe016f
1 changed files with 10 additions and 0 deletions
  1. 10 0
      services/report_rai.go

+ 10 - 0
services/report_rai.go

@@ -119,6 +119,7 @@ func HandleInsertRaiReport(raiReportId int) (err error) {
 			}
 		}
 		state := reportInfo.State
+
 		// 报告已存在,更新报告
 		if (articleResult.PublishStatus == 2 || articleResult.PublishStatus == 4) && articleResult.IsActive {
 			// 报告状态为未发布,则更新报告
@@ -132,6 +133,7 @@ func HandleInsertRaiReport(raiReportId int) (err error) {
 				return
 			}
 			go UpdateReportEs(reportInfo.Id, 1)
+			return
 		}else {
 			// 报告状态为未发布,则更新报告
 			state = models.ReportStateUnpublished
@@ -153,7 +155,11 @@ func HandleInsertRaiReport(raiReportId int) (err error) {
 		reportInfo.State = state
 		reportInfo.Content = html.EscapeString(articleResult.Content.Body)
 		reportInfo.ContentSub = html.EscapeString(contentSub)
+<<<<<<< HEAD
 		//updateTime, _ := time.ParseInLocation(utils.FormatDate, articleResult.UpdateDate, time.Local)
+=======
+		//updateTime, _ := time.ParseInLocation(utils.FormatDateTime, articleResult.UpdateDate, time.Local)
+>>>>>>> feature/yb11.1_rai_report
 		reportInfo.ModifyTime = articleResult.UpdateDate
 
 		// 报告更新
@@ -215,7 +221,11 @@ func HandleInsertRaiReport(raiReportId int) (err error) {
 			item.Stage = 0
 			item.ContentSub = html.EscapeString(contentSub)
 			item.CreateTime = time.Now().Format(utils.FormatDateTime)
+<<<<<<< HEAD
 			//updateTime, _ := time.ParseInLocation(utils.FormatDate, articleResult.UpdateDate, time.Local)
+=======
+			//updateTime, _ := time.ParseInLocation(utils.FormatDateTime, articleResult.UpdateDate, time.Local)
+>>>>>>> feature/yb11.1_rai_report
 			item.ModifyTime = articleResult.UpdateDate
 			item.ReportVersion = 2
 			item.AdminId = 0