ziwen 1 ano atrás
pai
commit
2b31351d07
1 arquivos alterados com 3 adições e 2 exclusões
  1. 3 2
      models/report.go

+ 3 - 2
models/report.go

@@ -664,6 +664,7 @@ FROM
 		AND pm.industrial_management_id = ? UNION ALL
  	SELECT 
 		ca.activity_id AS id,
+		0 as  article_id,
 		cav.video_name AS title,
 		ca.activity_time AS publish_time,
 		cav.video_url AS video_url,
@@ -679,10 +680,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).QueryRow(&total)
+	err = o.Raw(totalSql, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId).QueryRow(&total)
 	sql += ` ORDER BY 
 	t.publish_date DESC LIMIT ?,? `
-	_, err = o.Raw(sql, industrialManagementId, industrialManagementId, industrialManagementId, startSize, pageSize).QueryRows(&items)
+	_, err = o.Raw(sql, industrialManagementId, industrialManagementId, industrialManagementId, industrialManagementId, startSize, pageSize).QueryRows(&items)
 	return
 }