@@ -157,7 +157,7 @@ type SellerRep struct {
func GetArticleDetailById(articleId int) (item *ArticleDetail, err error) {
o := orm.NewOrm()
- sql := `SELECT * FROM cygx_article WHERE article_id = ? `
+ sql := `SELECT * FROM cygx_article WHERE article_id = ? AND publish_status = 1 `
err = o.Raw(sql, articleId).QueryRow(&item)
return
}
@@ -351,7 +351,7 @@ func GetArticleCollectionList(condition string, userId int) (items []*ArticleCol
INNER JOIN cygx_industrial_management AS m ON m.industrial_management_id = mg.industrial_management_id
INNER JOIN cygx_article_department AS d ON d.department_id = a.department_id
WHERE
- 1 = 1 `
+ 1 = 1 AND a.publish_status = 1 `
if condition != "" {
sql += condition