|
@@ -56,7 +56,7 @@ func GetReportMappingStrategyAll() (items []*ReportMapping, err error) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-func GetReportMappingStrategyHomeAll() (items []*ReportMappingHome, err error) {
|
|
|
+func GetReportMappingStrategyHomeAll(chartPermissionId int) (items []*ReportMappingHome, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `SELECT
|
|
|
re.category_id,re.sub_category_name,re.match_type_name
|
|
@@ -65,12 +65,12 @@ FROM
|
|
|
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
|
|
|
}
|
|
|
|