|
@@ -169,7 +169,7 @@ func GetReportAndproductIndustrylList(categoryId, startSize, pageSize int) (item
|
|
|
cygx_article AS art
|
|
|
WHERE
|
|
|
art.publish_status = 1
|
|
|
- AND category_id IN ( SELECT category_id_celue FROM cygx_report_mapping_group WHERE id_cygx = ` + strconv.Itoa(categoryId) + ` ) UNION ALL
|
|
|
+ AND art.article_id IN ( SELECT article_id FROM cygx_report_mapping_category_group WHERE id_cygx = ` + strconv.Itoa(categoryId) + ` ) UNION ALL
|
|
|
SELECT
|
|
|
art.product_interior_id AS article_id,
|
|
|
art.title,
|
|
@@ -351,7 +351,7 @@ func GetReportAndproductInteriorIndustrialList(pars []interface{}, categoryId, i
|
|
|
INNER JOIN cygx_industrial_article_group_management AS man_g ON man_g.article_id = art.article_id
|
|
|
WHERE
|
|
|
art.publish_status = 1
|
|
|
- AND category_id IN ( SELECT category_id_celue FROM cygx_report_mapping_group WHERE id_cygx = ` + strconv.Itoa(categoryId) + ` )
|
|
|
+ AND art.article_id IN ( SELECT article_id FROM cygx_report_mapping_category_group WHERE id_cygx = ` + strconv.Itoa(categoryId) + ` )
|
|
|
AND art.is_class = 1
|
|
|
AND man_g.industrial_management_id =` + strconv.Itoa(industrialManagementId) + `
|
|
|
GROUP BY
|
|
@@ -702,10 +702,10 @@ FROM
|
|
|
cam.industrial_management_id = ? AND cam.source = 1
|
|
|
) AS t`
|
|
|
totalSql := `SELECT COUNT(1) total FROM (` + sql + `) z `
|
|
|
- err = o.Raw(totalSql, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId,industrialManagementId).QueryRow(&total)
|
|
|
+ err = o.Raw(totalSql, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId).QueryRow(&total)
|
|
|
sql += ` ORDER BY
|
|
|
t.publish_date DESC LIMIT ?,? `
|
|
|
- _, err = o.Raw(sql, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId,industrialManagementId, startSize, pageSize).QueryRows(&items)
|
|
|
+ _, err = o.Raw(sql, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId, startSize, pageSize).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
|