|
@@ -159,7 +159,7 @@ WHERE
|
|
|
//获取最新文章
|
|
|
func GetNewIndustrialUserRecordArticle(industrialManagementId, categoryId int) (item *ArticleDetail, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
- sql := ` SELECT * FROM cygx_article WHERE article_id IN (SELECT article_id FROM cygx_industrial_article_group_management WHERE industrial_management_id = ? ) AND category_id = ? ORDER BY publish_date DESC LIMIT 0, 1`
|
|
|
+ sql := ` SELECT * FROM cygx_article WHERE article_id IN (SELECT article_id FROM cygx_industrial_article_group_management WHERE industrial_management_id = ? ) AND match_type_name = any( SELECT match_type_name FROM cygx_report_mapping WHERE category_id = ? ) ORDER BY publish_date DESC LIMIT 0, 1`
|
|
|
err = o.Raw(sql, industrialManagementId, categoryId).QueryRow(&item)
|
|
|
return
|
|
|
}
|