|
@@ -1815,11 +1815,22 @@ func GetChartInfoAllByClassifyId(source, classifyId int) (items []*ChartClassify
|
|
|
o := orm.NewOrm()
|
|
|
sql := ` SELECT chart_info_id,chart_classify_id,chart_name AS chart_classify_name,chart_name_en AS chart_classify_name_en,
|
|
|
unique_code,sys_user_id,sys_user_real_name,date_type,start_date,end_date,chart_type,calendar,season_start_date,season_end_date,is_join_permission
|
|
|
- FROM chart_info WHERE chart_classify_id = ? AND source = ? ORDER BY sort asc,create_time DESC `
|
|
|
+ FROM chart_info WHERE chart_classify_id = ? AND source = ? ORDER BY sort asc,create_time DESC `
|
|
|
_, err = o.Raw(sql, classifyId, source).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+// GetChartInfoAll 用于分类展示
|
|
|
+// @param source int 1:ETA图库;2:商品价格曲线
|
|
|
+func GetChartInfoAllByClassifyIdAndAdmin(source, classifyId int, adminIds []int) (items []*ChartClassifyItems, err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := ` SELECT chart_info_id,chart_classify_id,chart_name AS chart_classify_name,chart_name_en AS chart_classify_name_en,
|
|
|
+ unique_code,sys_user_id,sys_user_real_name,date_type,start_date,end_date,chart_type,calendar,season_start_date,season_end_date,is_join_permission
|
|
|
+ FROM chart_info WHERE chart_classify_id = ? AND source = ? AND sys_user_id in (` + utils.GetOrmInReplace(len(adminIds)) + `) ORDER BY sort asc,create_time DESC `
|
|
|
+ _, err = o.Raw(sql, classifyId, source, adminIds).QueryRows(&items)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
func GetChartInfoByClassifyId(source, classifyId, startSize, pageSize int) (items []*ChartClassifyItems, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := ` SELECT chart_info_id,chart_classify_id,chart_name AS chart_classify_name,chart_name_en AS chart_classify_name_en,
|