Roc пре 7 месеци
родитељ
комит
965078809a
2 измењених фајлова са 60 додато и 49 уклоњено
  1. 7 1
      controller/eta/classify.go
  2. 53 48
      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.ReportDetailShowType > 0 {
+		item.ReportDetailShowType = req.ReportDetailShowType
+	}
+
 	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", "ReportDetailShowType")
 	if e = item.UpdateClassify(cols); e != nil {
 		resp.FailData("修改失败", "Err:"+e.Error(), c)
 		return

+ 53 - 48
models/eta/classify.go

@@ -7,39 +7,42 @@ import (
 )
 
 type Classify struct {
-	Id                int       `gorm:"column:id;primary_key;AUTO_INCREMENT;NOT NULL"`
-	ClassifyName      string    `gorm:"column:classify_name;default:;comment:'分类名称'"`
-	Sort              int       `gorm:"column:sort;default:0;comment:'排序'"`
-	ParentId          int       `gorm:"column:parent_id;default:0;comment:'父级分类id'"`
-	CreateTime        time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP"`
-	ModifyTime        time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP"`
-	Abstract          string    `gorm:"column:abstract;default:;comment:'栏目简介'"`
-	Descript          string    `gorm:"column:descript;default:;comment:'分享描述'"`
-	ReportAuthor      string    `gorm:"column:report_author;default:;comment:'栏目作者'"`
-	AuthorDescript    string    `gorm:"column:author_descript;default:;comment:'作者简介'"`
-	ReportImgUrl      string    `gorm:"column:report_img_url;default:;comment:'报告配图'"`
-	HeadImgUrl        string    `gorm:"column:head_img_url;default:;comment:'头部banner'"`
-	AvatarImgUrl      string    `gorm:"column:avatar_img_url;default:;comment:'头像'"`
-	ColumnImgUrl      string    `gorm:"column:column_img_url;default:;comment:'栏目配图'"`
-	IsHomeColumn      int       `gorm:"column:is_home_column;default:0;comment:'1:首页专栏'"`
-	HomeImgUrl        string    `gorm:"column:home_img_url;default:;comment:'首页配图'"`
-	ClassifyLabel     string    `gorm:"column:classify_label;default:"`
-	ShowType          int       `gorm:"column:show_type;default:0;NOT NULL;comment:'展示类型:1-列表 2-专栏 3-品种'"`
-	HasTeleconference int       `gorm:"column:has_teleconference;default:0;NOT NULL;comment:'是否有电话会 0-否 1-是'"`
-	VipTitle          string    `gorm:"column:vip_title;default:NULL;comment:'研究员头衔'"`
-	YbIconUrl         string    `gorm:"column:yb_icon_url;default:;comment:'研报3.0已购页面icon图片地址'"`
-	YbBgUrl           string    `gorm:"column:yb_bg_url;default:;comment:'研报3.0已购详情背景图地址'"`
-	IsShow            int       `gorm:"column:is_show;default:1;NOT NULL;comment:'是否展示报告:1,展示该分类下的报告,0隐藏分类下的报告'"`
-	YbFiccSort        int       `gorm:"column:yb_ficc_sort;default:0;comment:'研报小程序端ficc页面排序'"`
-	YbFiccIcon        string    `gorm:"column:yb_ficc_icon;default:NULL;comment:'研报小程序端ficc页码图标'"`
-	YbFiccPcIcon      string    `gorm:"column:yb_ficc_pc_icon;default:NULL;comment:'研报 pc端ficc页码图标'"`
-	YbListImg         string    `gorm:"column:yb_list_img;default:;NOT NULL;comment:'研报小程序-列表封面图'"`
-	YbShareBgImg      string    `gorm:"column:yb_share_bg_img;default:;NOT NULL;comment:'研报小程序-报告分享背景图'"`
-	YbRightBanner     string    `gorm:"column:yb_right_banner;default:NULL;comment:'Pc端详情页,右侧,报告合集背景图'"`
-	RelateTel         int       `gorm:"column:relate_tel;default:0;NOT NULL;comment:'是否在电话会中可选: 0-否; 1-是'"`
-	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:'是否可用'"`
+	Id                   int       `gorm:"column:id;primary_key;AUTO_INCREMENT;NOT NULL"`
+	ClassifyName         string    `gorm:"column:classify_name;default:;comment:'分类名称'"`
+	Sort                 int       `gorm:"column:sort;default:0;comment:'排序'"`
+	ParentId             int       `gorm:"column:parent_id;default:0;comment:'父级分类id'"`
+	CreateTime           time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP"`
+	ModifyTime           time.Time `gorm:"column:modify_time;default:CURRENT_TIMESTAMP"`
+	Abstract             string    `gorm:"column:abstract;default:;comment:'栏目简介'"`
+	Descript             string    `gorm:"column:descript;default:;comment:'分享描述'"`
+	ReportAuthor         string    `gorm:"column:report_author;default:;comment:'栏目作者'"`
+	AuthorDescript       string    `gorm:"column:author_descript;default:;comment:'作者简介'"`
+	ReportImgUrl         string    `gorm:"column:report_img_url;default:;comment:'报告配图'"`
+	HeadImgUrl           string    `gorm:"column:head_img_url;default:;comment:'头部banner'"`
+	AvatarImgUrl         string    `gorm:"column:avatar_img_url;default:;comment:'头像'"`
+	ColumnImgUrl         string    `gorm:"column:column_img_url;default:;comment:'栏目配图'"`
+	IsHomeColumn         int       `gorm:"column:is_home_column;default:0;comment:'1:首页专栏'"`
+	HomeImgUrl           string    `gorm:"column:home_img_url;default:;comment:'首页配图'"`
+	ClassifyLabel        string    `gorm:"column:classify_label;default:"`
+	ShowType             int       `gorm:"column:show_type;default:0;NOT NULL;comment:'展示类型:1-列表 2-专栏 3-品种'"`
+	HasTeleconference    int       `gorm:"column:has_teleconference;default:0;NOT NULL;comment:'是否有电话会 0-否 1-是'"`
+	VipTitle             string    `gorm:"column:vip_title;default:NULL;comment:'研究员头衔'"`
+	YbIconUrl            string    `gorm:"column:yb_icon_url;default:;comment:'研报3.0已购页面icon图片地址'"`
+	YbBgUrl              string    `gorm:"column:yb_bg_url;default:;comment:'研报3.0已购详情背景图地址'"`
+	IsShow               int       `gorm:"column:is_show;default:1;NOT NULL;comment:'是否展示报告:1,展示该分类下的报告,0隐藏分类下的报告'"`
+	YbFiccSort           int       `gorm:"column:yb_ficc_sort;default:0;comment:'研报小程序端ficc页面排序'"`
+	YbFiccIcon           string    `gorm:"column:yb_ficc_icon;default:NULL;comment:'研报小程序端ficc页码图标'"`
+	YbFiccPcIcon         string    `gorm:"column:yb_ficc_pc_icon;default:NULL;comment:'研报 pc端ficc页码图标'"`
+	YbListImg            string    `gorm:"column:yb_list_img;default:;NOT NULL;comment:'研报小程序-列表封面图'"`
+	YbShareBgImg         string    `gorm:"column:yb_share_bg_img;default:;NOT NULL;comment:'研报小程序-报告分享背景图'"`
+	YbRightBanner        string    `gorm:"column:yb_right_banner;default:NULL;comment:'Pc端详情页,右侧,报告合集背景图'"`
+	RelateTel            int       `gorm:"column:relate_tel;default:0;NOT NULL;comment:'是否在电话会中可选: 0-否; 1-是'"`
+	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"`
+	ReportDetailShowType int       `description:"报告详情的展示类型:1-拼接;2:目录"`
 }
 
 func (c *Classify) TableName() string {
@@ -207,21 +210,22 @@ type EditClassifyReq struct {
 	VipTitle          string `description:"研究员头衔"`*/
 	//Sort              int                    `description:"后台排序"`
 
-	ShowType       int                    `description:"展示类型:1-列表 2-专栏"`
-	MenuList       []*ClassifyMenuSaveReq `description:"子目录列表"`
-	ClassifyLabel  string                 `description:"分类标签"`
-	IsShow         int                    `description:"是否在小程序显示:1-显示 0-隐藏"`
-	YbFiccSort     int                    `description:"小程序FICC页排序"`
-	YbFiccIcon     string                 `description:"小程序FICC页icon"`
-	YbFiccPcIcon   string                 `description:"小程序PC端FICC页背景图"`
-	YbIconUrl      string                 `description:"小程序已购页icon"`
-	YbBgUrl        string                 `description:"小程序已购详情背景图"`
-	YbListImg      string                 `description:"小程序研报列表封面图"`
-	YbShareBgImg   string                 `description:"小程序研报详情分享背景图"`
-	YbRightBanner  string                 `description:"Pc端详情页,右侧,报告合集背景图"`
-	ClassifyMenuId int                    `description:"二级分类-子目录ID"`
-	RelateTel      int                    `description:"是否在电话会中可选: 0-否; 1-是"`
-	RelateVideo    int                    `description:"是否在路演视频中可选: 0-否; 1-是"`
+	ShowType             int                    `description:"展示类型:1-列表 2-专栏"`
+	MenuList             []*ClassifyMenuSaveReq `description:"子目录列表"`
+	ClassifyLabel        string                 `description:"分类标签"`
+	IsShow               int                    `description:"是否在小程序显示:1-显示 0-隐藏"`
+	YbFiccSort           int                    `description:"小程序FICC页排序"`
+	YbFiccIcon           string                 `description:"小程序FICC页icon"`
+	YbFiccPcIcon         string                 `description:"小程序PC端FICC页背景图"`
+	YbIconUrl            string                 `description:"小程序已购页icon"`
+	YbBgUrl              string                 `description:"小程序已购详情背景图"`
+	YbListImg            string                 `description:"小程序研报列表封面图"`
+	YbShareBgImg         string                 `description:"小程序研报详情分享背景图"`
+	YbRightBanner        string                 `description:"Pc端详情页,右侧,报告合集背景图"`
+	ClassifyMenuId       int                    `description:"二级分类-子目录ID"`
+	RelateTel            int                    `description:"是否在电话会中可选: 0-否; 1-是"`
+	RelateVideo          int                    `description:"是否在路演视频中可选: 0-否; 1-是"`
+	ReportDetailShowType 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"`
+	ReportDetailShowType  int               `description:"报告详情的展示类型:1-拼接;2:目录"`
 }
 
 // GetClassifyListByKeyword