|
@@ -58,7 +58,7 @@ func GetReportMappingStrategyAll() (items []*ReportMapping, err error) {
|
|
|
}
|
|
|
|
|
|
// 获取策略下面的所有分类
|
|
|
-func GetReportMappingStrategyHomeAll(userId int) (items []*TradeReportMapping, err error) {
|
|
|
+func GetReportMappingStrategyHomeAll(userId, ChartPermissionId int) (items []*TradeReportMapping, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `SELECT
|
|
|
MAX( art.publish_date ) AS update_time,
|
|
@@ -69,12 +69,12 @@ func GetReportMappingStrategyHomeAll(userId int) (items []*TradeReportMapping, e
|
|
|
INNER JOIN cygx_article AS art ON art.category_id = re.category_id
|
|
|
WHERE
|
|
|
re.report_type = 1
|
|
|
- AND re.chart_permission_id = 23
|
|
|
+ AND re.chart_permission_id = ?
|
|
|
GROUP BY
|
|
|
re.match_type_name
|
|
|
ORDER BY
|
|
|
sort DESC , art.publish_date DESC`
|
|
|
- _, err = o.Raw(sql).QueryRows(&items)
|
|
|
+ _, err = o.Raw(sql, ChartPermissionId).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
|