|
@@ -93,6 +93,7 @@ type Report struct {
|
|
|
VoiceGenerateType int `description:"音频生成方式,0:系统生成,1:人工上传"`
|
|
|
RaiReportId int `description:"RAI报告ID"`
|
|
|
FreeLayoutConfig string `description:"'自由布局配置"`
|
|
|
+ FreeReportRatio string `description:"自由布局页面比例:A4; 16:9; 4:3; 10:7"`
|
|
|
}
|
|
|
|
|
|
func (m *Report) AfterFind(db *gorm.DB) (err error) {
|
|
@@ -171,6 +172,7 @@ type ReportList struct {
|
|
|
ClassifyNameThird string `description:"三级分类名称"`
|
|
|
InheritReportId int `description:"待继承的报告ID"`
|
|
|
RaiReportId int `description:"RAI报告ID"`
|
|
|
+ FreeReportRatio string `description:"自由布局页面比例:A4; 16:9; 4:3; 10:7"`
|
|
|
}
|
|
|
|
|
|
func (m *ReportList) AfterFind(db *gorm.DB) (err error) {
|
|
@@ -450,6 +452,7 @@ type ReportDetail struct {
|
|
|
ReportCreateTime time.Time `description:"报告时间创建时间"`
|
|
|
RaiReportId int `description:"RAI报告ID"`
|
|
|
FreeLayoutConfig string `description:"'自由布局配置"`
|
|
|
+ FreeReportRatio string `description:"自由布局页面比例:A4; 16:9; 4:3; 10:7"`
|
|
|
}
|
|
|
|
|
|
func (m *ReportDetail) AfterFind(db *gorm.DB) (err error) {
|
|
@@ -622,6 +625,7 @@ type AddReq struct {
|
|
|
IsPublicPublish int8 `description:"是否公开发布,1:是,2:否"`
|
|
|
InheritReportId int `description:"待继承的报告ID"`
|
|
|
GrantAdminIdList []int `description:"授权用户id列表"`
|
|
|
+ FreeReportRatio string `description:"自由布局页面比例:A4; 16:9; 4:3; 10:7"`
|
|
|
}
|
|
|
|
|
|
type PrePublishReq struct {
|
|
@@ -670,8 +674,9 @@ type EditReq struct {
|
|
|
EndResourceId int `description:"版尾资源ID"`
|
|
|
//CollaborateType int8 `description:"协作方式,1:个人,2:多人协作。默认:1"`
|
|
|
//ReportLayout int8 `description:"报告布局,1:常规布局,2:智能布局,3:自由布局。默认:1"`
|
|
|
- IsPublicPublish int8 `description:"是否公开发布,1:是,2:否"`
|
|
|
- GrantAdminIdList []int `description:"授权用户id列表"`
|
|
|
+ IsPublicPublish int8 `description:"是否公开发布,1:是,2:否"`
|
|
|
+ GrantAdminIdList []int `description:"授权用户id列表"`
|
|
|
+ FreeReportRatio string `description:"自由布局页面比例:A4; 16:9; 4:3; 10:7"`
|
|
|
}
|
|
|
|
|
|
type EditResp struct {
|
|
@@ -1717,7 +1722,7 @@ func InsertOrUpdateReportFreeLayoutContentPage(reportInfo *Report, ormList []*re
|
|
|
}
|
|
|
_ = tx.Commit()
|
|
|
}()
|
|
|
- reportUpdateCols := []string{"Content", "ContentSub", "ContentStruct", "HeadImg", "EndImg", "CanvasColor", "HeadResourceId", "EndResourceId", "ModifyTime", "ContentModifyTime","FreeLayoutConfig"}
|
|
|
+ reportUpdateCols := []string{"Content", "ContentSub", "ContentStruct", "HeadImg", "EndImg", "CanvasColor", "HeadResourceId", "EndResourceId", "ModifyTime", "ContentModifyTime", "FreeLayoutConfig"}
|
|
|
err = tx.Model(&reportInfo).Select(reportUpdateCols).Updates(reportInfo).Error
|
|
|
return report.BatchInsertOrUpdatePages(tx, ormList, false, reportInfo.Id, 0)
|
|
|
}
|
|
@@ -1731,7 +1736,7 @@ func UpdateChapterFreeLayoutContentPage(reportInfo *Report, chapterInfo *ReportC
|
|
|
_ = tx.Commit()
|
|
|
}()
|
|
|
|
|
|
- if err = tx.Model(&reportInfo).Select([]string{"LastModifyAdminId", "LastModifyAdminName", "ModifyTime","FreeLayoutConfig"}).Updates(reportInfo).Error; err != nil {
|
|
|
+ if err = tx.Model(&reportInfo).Select([]string{"LastModifyAdminId", "LastModifyAdminName", "ModifyTime", "FreeLayoutConfig"}).Updates(reportInfo).Error; err != nil {
|
|
|
return
|
|
|
}
|
|
|
// 更新章节
|