|
@@ -266,6 +266,7 @@ func GetReportAndproductInteriorIndustrialList(pars []interface{}, categoryId, i
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
sql := `SELECT
|
|
sql := `SELECT
|
|
art.article_id,
|
|
art.article_id,
|
|
|
|
+ art.category_id,
|
|
art.title,
|
|
art.title,
|
|
art.publish_date,
|
|
art.publish_date,
|
|
( SELECT COUNT( 1 ) FROM cygx_article_history_record AS rec WHERE rec.user_id = ` + strconv.Itoa(userId) + ` AND rec.article_id = art.article_id ) AS readnum ,
|
|
( SELECT COUNT( 1 ) FROM cygx_article_history_record AS rec WHERE rec.user_id = ` + strconv.Itoa(userId) + ` AND rec.article_id = art.article_id ) AS readnum ,
|
|
@@ -282,6 +283,7 @@ func GetReportAndproductInteriorIndustrialList(pars []interface{}, categoryId, i
|
|
art.article_id UNION ALL
|
|
art.article_id UNION ALL
|
|
SELECT
|
|
SELECT
|
|
art.product_interior_id AS article_id,
|
|
art.product_interior_id AS article_id,
|
|
|
|
+ 0 as category_id,
|
|
art.title,
|
|
art.title,
|
|
art.publish_time AS publish_date,
|
|
art.publish_time AS publish_date,
|
|
( SELECT COUNT( 1 ) FROM cygx_product_interior_history AS rec WHERE rec.user_id = ` + strconv.Itoa(userId) + ` AND rec.product_interior_id = art.product_interior_id ) AS readnum ,
|
|
( SELECT COUNT( 1 ) FROM cygx_product_interior_history AS rec WHERE rec.user_id = ` + strconv.Itoa(userId) + ` AND rec.product_interior_id = art.product_interior_id ) AS readnum ,
|