Browse Source

fix:ppt编辑摘要和协作人

zqbao 2 months ago
parent
commit
a882e9040c
2 changed files with 9 additions and 5 deletions
  1. 3 1
      controllers/ppt_v2.go
  2. 6 4
      models/ppt_v2.go

+ 3 - 1
controllers/ppt_v2.go

@@ -263,6 +263,8 @@ func (this *PptV2Controller) EditPpt() {
 	}
 
 	// 修改
+	pptInfo.Abstract = req.Abstract
+	pptInfo.CollaborateUsers = req.CollaborateUsers
 	pptInfo.TemplateType = req.FirstPage.TemplateType
 	pptInfo.BackgroundImg = req.FirstPage.ImgUrl
 	pptInfo.CurrentBackgroundImg = req.FirstPage.CurrentBackgroundImg
@@ -277,7 +279,7 @@ func (this *PptV2Controller) EditPpt() {
 	pptInfo.CoverContent = req.CoverContent
 	pptInfo.ModifyTime = time.Now()
 	pptInfo.TitleSetting = req.TitleSetting
-	err = pptInfo.Update([]string{"TemplateType", "BackgroundImg", "CurrentBackgroundImg", "BackCoverImg", "CurrentBackgroundImgId", "BackCoverImgId", "BackgroundImgId", "Title", "ReportType", "PptDate", "Content", "ModifyTime", "CoverContent", "TitleSetting"})
+	err = pptInfo.Update([]string{"Abstract", "CollaborateUsers", "TemplateType", "BackgroundImg", "CurrentBackgroundImg", "BackCoverImg", "CurrentBackgroundImgId", "BackCoverImgId", "BackgroundImgId", "Title", "ReportType", "PptDate", "Content", "ModifyTime", "CoverContent", "TitleSetting"})
 	if err != nil {
 		br.Msg = "编辑失败"
 		br.ErrMsg = "编辑失败,Err:" + err.Error()

+ 6 - 4
models/ppt_v2.go

@@ -145,10 +145,12 @@ type AddPptV2Req struct {
 		BackIndex              int    `description:"背景图片下标"`
 		TemplateType           int    `description:"模版id"`
 	} `description:"首页"`
-	Content      string `description:"ppt的json数据"`
-	GroupId      int64  `description:"目录id"`
-	CoverContent string `description:"封面图内容-JSON数据"`
-	TitleSetting string `description:"PPT标题设置"`
+	Abstract         string `description:"摘要"`
+	CollaborateUsers string `description:"协作人IDs, 英文逗号分隔"`
+	Content          string `description:"ppt的json数据"`
+	GroupId          int64  `description:"目录id"`
+	CoverContent     string `description:"封面图内容-JSON数据"`
+	TitleSetting     string `description:"PPT标题设置"`
 }
 
 type AddPptResp struct {