|
@@ -57,7 +57,7 @@ WHERE
|
|
|
chart_permission_id = any( SELECT chart_permission_id FROM cygx_report_mapping WHERE category_id = ` + strconv.Itoa(categoryId) + ` )
|
|
|
AND match_type_name = any( SELECT match_type_name FROM cygx_report_mapping WHERE category_id = ` + strconv.Itoa(categoryId) + ` ) )
|
|
|
AND a.is_class = 1
|
|
|
- AND man_g.industrial_management_id = ?`
|
|
|
+ AND man_g.industrial_management_id = ? GROUP BY a.article_id `
|
|
|
err = o.Raw(sql, industrialManagementId).QueryRow(&count)
|
|
|
return
|
|
|
}
|
|
@@ -80,7 +80,7 @@ WHERE
|
|
|
AND match_type_name = any( SELECT match_type_name FROM cygx_report_mapping WHERE category_id = ` + strconv.Itoa(categoryId) + ` ) )
|
|
|
AND a.is_class = 1
|
|
|
AND man_g.industrial_management_id = ?`
|
|
|
- sql += ` ORDER BY publish_date DESC LIMIT ?,? `
|
|
|
+ sql += ` GROUP BY a.article_id ORDER BY publish_date DESC LIMIT ?,? `
|
|
|
_, err = o.Raw(sql, pars, industrialManagementId, startSize, pageSize).QueryRows(&items)
|
|
|
return
|
|
|
}
|