|
@@ -200,24 +200,27 @@ type ChartClassifyItems struct {
|
|
|
ChartClassifyName string
|
|
|
ChartClassifyNameEn string
|
|
|
ParentId int
|
|
|
- Level int `description:"层级"`
|
|
|
- Sort int `description:"排序字段,越小越靠前,默认值:10"`
|
|
|
- UniqueCode string `description:"唯一编码"`
|
|
|
- Source int `description:"来源id"`
|
|
|
- SourceName string `description:"来源名称"`
|
|
|
- SysUserId int `description:"创建人id"`
|
|
|
- SysUserRealName string `description:"创建人姓名"`
|
|
|
- DateType int `description:"日期类型:1:00年至今,2:10年至今,3:15年至今,4:年初至今,5:自定义时间"`
|
|
|
- StartDate string `description:"自定义开始日期"`
|
|
|
- EndDate string `description:"自定义结束日期"`
|
|
|
- ChartType int `description:"生成样式:1:曲线图,2:季节性图"`
|
|
|
- Calendar string `description:"公历/农历"`
|
|
|
- SeasonStartDate string `description:"季节性图开始日期"`
|
|
|
- SeasonEndDate string `description:"季节性图开始日期"`
|
|
|
- Children []*ChartClassifyItems
|
|
|
- Button ChartClassifyItemsButton `description:"按钮权限"`
|
|
|
+ Level int `description:"层级"`
|
|
|
+ Sort int `description:"排序字段,越小越靠前,默认值:10"`
|
|
|
+ UniqueCode string `description:"唯一编码"`
|
|
|
+ Source int `description:"来源id"`
|
|
|
+ SourceName string `description:"来源名称"`
|
|
|
+ SysUserId int `description:"创建人id"`
|
|
|
+ SysUserRealName string `description:"创建人姓名"`
|
|
|
+ DateType int `description:"日期类型:1:00年至今,2:10年至今,3:15年至今,4:年初至今,5:自定义时间"`
|
|
|
+ StartDate string `description:"自定义开始日期"`
|
|
|
+ EndDate string `description:"自定义结束日期"`
|
|
|
+ ChartType int `description:"生成样式:1:曲线图,2:季节性图"`
|
|
|
+ Calendar string `description:"公历/农历"`
|
|
|
+ SeasonStartDate string `description:"季节性图开始日期"`
|
|
|
+ SeasonEndDate string `description:"季节性图开始日期"`
|
|
|
+ Children []*ChartClassifyItems `gorm:"-"`
|
|
|
+ Button ChartClassifyItemsButton `gorm:"-" description:"按钮权限"`
|
|
|
IsJoinPermission int `description:"是否加入权限管控,0:不加入;1:加入;默认:0"`
|
|
|
HaveOperaAuth bool `description:"是否有数据权限,默认:false"`
|
|
|
+ Disable bool `description:"勾选是否禁用"`
|
|
|
+ IsSelected int `description:"是否精选资源,0:否;1:是"`
|
|
|
+ ResourceStatus int `description:"在ETA投研资源库中的状态,0:初始状态,1上架,2下架"`
|
|
|
}
|
|
|
|
|
|
// ChartClassifyItemsButton 操作按钮
|
|
@@ -451,7 +454,7 @@ func GetChartClassifyAllBySource(source int) (items []*ChartClassifyItems, err e
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-// GetChartClassifyAllBySource 根据来源获取所有分类
|
|
|
+// GetChartClassifyAllBySourceIsSelected 根据来源获取所有精选分类
|
|
|
func GetChartClassifyAllBySourceIsSelected(source int, isSelected int) (items []*ChartClassifyItems, err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
sql := ` SELECT * FROM chart_classify WHERE source = ? AND is_selected = ? ORDER BY parent_id ASC, sort ASC, chart_classify_id ASC`
|