zwxi 11 months ago
parent
commit
d14c8c5390
2 changed files with 12 additions and 8 deletions
  1. 3 1
      controllers/smart_report/smart_report.go
  2. 9 7
      models/smart_report/smart_report.go

+ 3 - 1
controllers/smart_report/smart_report.go

@@ -839,7 +839,9 @@ func (this *SmartReportController) SaveContent() {
 		item.HeadImg = req.HeadImg
 		item.EndImg = req.EndImg
 		item.CanvasColor = req.CanvasColor
-		cols := []string{"Content", "ContentSub", "ContentStruct", "ContentModifyTime", "LastModifyAdminId", "LastModifyAdminName", "ModifyTime", "HeadImg", "EndImg", "CanvasColor"}
+		item.HeadResourceId = req.HeadResourceId
+		item.EndResourceId = req.EndResourceId
+		cols := []string{"Content", "ContentSub", "ContentStruct", "ContentModifyTime", "LastModifyAdminId", "LastModifyAdminName", "ModifyTime", "HeadImg", "EndImg", "CanvasColor","HeadResourceId", "EndResourceId"}
 		if e = item.Update(cols); e != nil {
 			br.Msg = "操作失败"
 			br.ErrMsg = "更新报告内容失败"

+ 9 - 7
models/smart_report/smart_report.go

@@ -328,13 +328,15 @@ type SmartReportPrePublishReq struct {
 
 // SmartReportSaveContentReq 保存草稿请求体
 type SmartReportSaveContentReq struct {
-	SmartReportId int    `description:"智能研报ID"`
-	Content       string `description:"内容"`
-	ContentStruct string `description:"内容结构"`
-	NoChange      int    `description:"内容是否未改变:1:内容未改变"`
-	HeadImg       string `description:"报告头图地址"`
-	EndImg        string `description:"报告尾图地址"`
-	CanvasColor   string `description:"画布颜色"`
+	SmartReportId  int    `description:"智能研报ID"`
+	Content        string `description:"内容"`
+	ContentStruct  string `description:"内容结构"`
+	NoChange       int    `description:"内容是否未改变:1:内容未改变"`
+	HeadImg        string `description:"报告头图地址"`
+	EndImg         string `description:"报告尾图地址"`
+	CanvasColor    string `description:"画布颜色"`
+	HeadResourceId int    `description:"版头资源ID"`
+	EndResourceId  int    `description:"版尾资源ID"`
 }
 
 // SmartReportSaveContentResp 保存草稿响应体