瀏覽代碼

Merge branch 'feature/eta_2.6.9' into debug

hsun 3 天之前
父節點
當前提交
12f9d94c38
共有 3 個文件被更改,包括 11 次插入4 次删除
  1. 1 0
      controllers/report_v2.go
  2. 8 3
      models/report.go
  3. 2 1
      services/report_v2.go

+ 1 - 0
controllers/report_v2.go

@@ -527,6 +527,7 @@ func (this *ReportController) Add() {
 
 	item.ClassifyIdThird = req.ClassifyIdThird
 	item.ClassifyNameThird = classifyMap[req.ClassifyIdThird]
+	item.FreeReportRatio = req.FreeReportRatio
 
 	// 产品要求,如果是多人协作,那么就是章节类型的报告
 	if req.CollaborateType == 2 {

+ 8 - 3
models/report.go

@@ -93,6 +93,7 @@ type Report struct {
 	VoiceGenerateType   int       `description:"音频生成方式,0:系统生成,1:人工上传"`
 	RaiReportId         int       `description:"RAI报告ID"`
 	MiniShow            int       `description:"是否在C端展示:0-否;1-是"`
+	FreeReportRatio     string    `description:"自由布局页面比例:A4; 16:9; 4:3; 10:7"`
 }
 
 type ReportList struct {
@@ -161,6 +162,7 @@ type ReportList struct {
 	ClassifyEnabled     bool      `description:"分类是否禁用"`
 	RaiReportId         int       `description:"RAI报告ID"`
 	MiniShow            int       `description:"是否在C端展示:0-否;1-是"`
+	FreeReportRatio     string    `description:"自由布局页面比例:A4; 16:9; 4:3; 10:7"`
 }
 
 type ReportListResp struct {
@@ -387,6 +389,7 @@ type ReportDetail struct {
 	RaiReportId         int       `description:"RAI报告ID"`
 	FreeLayoutConfig    string    `description:"自由布局配置"`
 	MiniShow            int       `description:"是否在C端展示:0-否;1-是"`
+	FreeReportRatio     string    `description:"自由布局页面比例:A4; 16:9; 4:3; 10:7"`
 }
 
 func GetReportById(reportId int) (item *ReportDetail, err error) {
@@ -532,6 +535,7 @@ type AddReq struct {
 	InheritReportId    int    `description:"待继承的报告ID"`
 	GrantAdminIdList   []int  `description:"授权用户id列表"`
 	MiniShow           int    `description:"是否在C端展示:0-否;1-是"`
+	FreeReportRatio    string `description:"自由布局页面比例:A4; 16:9; 4:3; 10:7"`
 }
 
 type PrePublishReq struct {
@@ -576,9 +580,10 @@ type EditReq struct {
 	EndResourceId      int    `description:"版尾资源ID"`
 	//CollaborateType    int8   `description:"协作方式,1:个人,2:多人协作。默认:1"`
 	//ReportLayout       int8   `description:"报告布局,1:常规布局,2:智能布局。默认:1"`
-	IsPublicPublish  int8  `description:"是否公开发布,1:是,2:否"`
-	GrantAdminIdList []int `description:"授权用户id列表"`
-	MiniShow         int   `description:"是否在C端展示:0-否;1-是"`
+	IsPublicPublish  int8   `description:"是否公开发布,1:是,2:否"`
+	GrantAdminIdList []int  `description:"授权用户id列表"`
+	MiniShow         int    `description:"是否在C端展示:0-否;1-是"`
+	FreeReportRatio  string `description:"自由布局页面比例:A4; 16:9; 4:3; 10:7"`
 }
 
 type EditResp struct {

+ 2 - 1
services/report_v2.go

@@ -217,7 +217,7 @@ func EditReport(reportInfo *models.Report, req models.EditReq, sysUser *system.A
 	reportInfo.State = state
 
 	//updateCols := []string{"ClassifyIdFirst", "ClassifyNameFirst", "ClassifyIdSecond", "ClassifyNameSecond", "ClassifyIdThird", "ClassifyNameThird", "Title", "Abstract", "Author", "Frequency", "Stage", "CreateTime", "IsPublicPublish", "LastModifyAdminId", "LastModifyAdminName", "ModifyTime"}
-	updateCols := []string{"Title", "Abstract", "Author", "Frequency", "CreateTime", "IsPublicPublish", "LastModifyAdminId", "LastModifyAdminName", "ModifyTime", "State", "MiniShow"}
+	updateCols := []string{"Title", "Abstract", "Author", "Frequency", "CreateTime", "IsPublicPublish", "LastModifyAdminId", "LastModifyAdminName", "ModifyTime", "State", "MiniShow", "FreeReportRatio"}
 
 	if req.HeadResourceId > 0 {
 		reportInfo.HeadResourceId = req.HeadResourceId
@@ -228,6 +228,7 @@ func EditReport(reportInfo *models.Report, req models.EditReq, sysUser *system.A
 		updateCols = append(updateCols, "EndResourceId")
 	}
 	reportInfo.MiniShow = req.MiniShow
+	reportInfo.FreeReportRatio = req.FreeReportRatio
 
 	// 需要添加的报告授权数据
 	addReportAdminList := make([]*report.ReportGrant, 0)