Forráskód Böngészése

fix:新增报告详情的展示配置

Roc 11 hónapja
szülő
commit
c12b7da269
2 módosított fájl, 12 hozzáadás és 1 törlés
  1. 7 1
      controller/eta/classify.go
  2. 5 0
      models/eta/classify.go

+ 7 - 1
controller/eta/classify.go

@@ -435,6 +435,12 @@ func (this *ClassifyController) Edit(c *gin.Context) {
 	item.RelateTel = req.RelateTel
 	item.RelateVideo = req.RelateVideo
 	item.ModifyTime = time.Now().Local()
+
+	// 报告详情的展示类型:1-拼接;2:目录
+	if req.ReportShowType > 0 {
+		item.ReportShowType = req.ReportShowType
+	}
+
 	cols := make([]string, 0)
 	/*cols = append(cols, "Abstract", "Descript", "ReportAuthor", "AuthorDescript", "ColumnImgUrl",
 	"HeadImgUrl", "AvatarImgUrl", "ReportImgUrl", "HomeImgUrl", "ClassifyLabel", "ShowType", "HasTeleconference", "VipTitle",
@@ -442,7 +448,7 @@ func (this *ClassifyController) Edit(c *gin.Context) {
 	"RelateTel", "RelateVideo", "ModifyTime")*/
 	cols = append(cols, "ClassifyLabel", "ShowType",
 		"IsShow", "YbFiccSort", "YbFiccIcon", "YbFiccPcIcon", "YbIconUrl", "YbBgUrl", "YbListImg", "YbShareBgImg", "YbRightBanner",
-		"RelateTel", "RelateVideo", "ModifyTime")
+		"RelateTel", "RelateVideo", "ModifyTime", "ReportShowType")
 	if e = item.UpdateClassify(cols); e != nil {
 		resp.FailData("修改失败", "Err:"+e.Error(), c)
 		return

+ 5 - 0
models/eta/classify.go

@@ -40,6 +40,9 @@ type Classify struct {
 	RelateVideo       int       `gorm:"column:relate_video;default:0;NOT NULL;comment:'是否在路演视频中可选: 0-否; 1-是'"`
 	IsMassSend        int       `gorm:"column:is_mass_send;default:0;comment:'1:群发,0:非群发'"`
 	Enabled           int       `gorm:"column:enabled;default:1;comment:'是否可用'"`
+	Level             int       `description:"层级"`
+	HasChild          int       `description:"是否有子级别,0:下面没有子分类,1:下面有子分类;默认:0"`
+	ReportShowType    int       `description:"报告详情的展示类型:1-拼接;2:目录"`
 }
 
 func (c *Classify) TableName() string {
@@ -222,6 +225,7 @@ type EditClassifyReq struct {
 	ClassifyMenuId int                    `description:"二级分类-子目录ID"`
 	RelateTel      int                    `description:"是否在电话会中可选: 0-否; 1-是"`
 	RelateVideo    int                    `description:"是否在路演视频中可选: 0-否; 1-是"`
+	ReportShowType int                    `description:"报告详情的展示类型:1-拼接;2:目录"`
 }
 
 // ClassifyMenuSaveReq 保存分类子目录请求体
@@ -273,6 +277,7 @@ type ClassifyListV2 struct {
 	ChartPermissionIdList []int             `description:"绑定的权限ID" gorm:"-"`
 	Level                 int               `description:"层级"`
 	HasChild              int               `description:"是否有子级别,0:下面没有子分类,1:下面有子分类;默认:0"`
+	ReportShowType        int               `description:"报告详情的展示类型:1-拼接;2:目录"`
 }
 
 // GetClassifyListByKeyword