浏览代码

更新时间

xyxie 1 周之前
父节点
当前提交
0affe0990a
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      models/report_rai.go
  2. 4 4
      services/report_rai.go

+ 1 - 1
models/report_rai.go

@@ -25,7 +25,7 @@ type ArticleResultApidate struct {
 	TitleEn       string                   `json:"title_en"`
 	Frequency     string                   `json:"frequency"`
 	CreateDate    string                   `json:"create_date"`
-	UpdateDate    string                   `json:"update_date"`
+	UpdateDate    time.Time                   `json:"update_date"`
 	PublishDate   time.Time                `json:"publish_date"`
 	PublishStatus int                      `json:"publish_status" description:"发布状态: 0未发布,2已发布,4已发布"`
 	IndustrId     int                      `json:"industry_id"`

+ 4 - 4
services/report_rai.go

@@ -155,8 +155,8 @@ func HandleInsertRaiReport(raiReportId int) (err error) {
 		reportInfo.State = state
 		reportInfo.Content = html.EscapeString(articleResult.Content.Body)
 		reportInfo.ContentSub = html.EscapeString(contentSub)
-		updateTime, _ := time.ParseInLocation(utils.FormatDateTime, articleResult.UpdateDate, time.Local)
-		reportInfo.ModifyTime = updateTime
+		//updateTime, _ := time.ParseInLocation(utils.FormatDateTime, articleResult.UpdateDate, time.Local)
+		reportInfo.ModifyTime = articleResult.UpdateDate
 
 		// 报告更新
 		updateCols := []string{"ClassifyIdFirst","ClassifyNameFirst","ClassifyIdSecond","ClassifyNameSecond","Title","Abstract","Author","Frequency","State","Content","ContentSub","ModifyTime","PublishTime"}
@@ -217,8 +217,8 @@ func HandleInsertRaiReport(raiReportId int) (err error) {
 			item.Stage = 0
 			item.ContentSub = html.EscapeString(contentSub)
 			item.CreateTime = time.Now().Format(utils.FormatDateTime)
-			updateTime, _ := time.ParseInLocation(utils.FormatDateTime, articleResult.UpdateDate, time.Local)
-			item.ModifyTime = updateTime
+			//updateTime, _ := time.ParseInLocation(utils.FormatDateTime, articleResult.UpdateDate, time.Local)
+			item.ModifyTime = articleResult.UpdateDate
 			item.ReportVersion = 2
 			item.AdminId = 0
 			item.AdminRealName = ""