|
@@ -262,29 +262,32 @@ WHERE
|
|
|
classify_name_first != "晨报"
|
|
|
AND classify_name_first != "周报"
|
|
|
AND classify_id_second in ?
|
|
|
- AND state IN (2, 6) and is_public_publish=1
|
|
|
+ AND state IN (2, 6) and is_public_publish=1 and report_layout in (1,2)
|
|
|
)
|
|
|
UNION
|
|
|
|
|
|
( SELECT
|
|
|
-report_id,
|
|
|
-report_chapter_id,
|
|
|
-classify_id_first,
|
|
|
+a.report_id,
|
|
|
+a.report_chapter_id,
|
|
|
+a.classify_id_first,
|
|
|
0 as classify_id_second,
|
|
|
-classify_name_first,
|
|
|
+a.classify_name_first,
|
|
|
null as classify_name_second,
|
|
|
-type_id as report_chapter_type_id,
|
|
|
-title,
|
|
|
-content_sub,
|
|
|
-publish_time,
|
|
|
+a.type_id as report_chapter_type_id,
|
|
|
+a.title,
|
|
|
+a.content_sub,
|
|
|
+a.publish_time,
|
|
|
0 as rai_report_id
|
|
|
FROM
|
|
|
- report_chapter
|
|
|
+ report_chapter as a
|
|
|
+JOIN report as ru on a.report_id=ru.id
|
|
|
+
|
|
|
WHERE
|
|
|
- publish_state = 2
|
|
|
- AND type_id in ?
|
|
|
+ a.publish_state = 2
|
|
|
+ AND a.type_id in ?
|
|
|
+and ru.report_layout in (1,2)
|
|
|
)
|
|
|
- ORDER BY publish_time DESC, report_id desc LIMIT ? OFFSET ?
|
|
|
+ ORDER BY a.publish_time DESC, a.report_id desc LIMIT ? OFFSET ?
|
|
|
`
|
|
|
err = global.MYSQL["rddp"].Raw(sql, classifyIdSeconds, typeIds, limit, offset).Scan(&list).Error
|
|
|
return
|
|
@@ -373,7 +376,7 @@ WHERE
|
|
|
AND c.show_type = 2
|
|
|
AND c.is_show = 1
|
|
|
AND c.enabled = 1
|
|
|
- AND state IN (2, 6) and is_public_publish=1
|
|
|
+ AND state IN (2, 6) and is_public_publish=1 and report_layout in (1,2)
|
|
|
ORDER BY publish_time DESC LIMIT 1
|
|
|
`
|
|
|
err = global.MYSQL["rddp"].Raw(sql).First(&list).Error
|
|
@@ -406,6 +409,7 @@ FROM
|
|
|
JOIN classify as b
|
|
|
WHERE
|
|
|
a.state IN (2, 6) and a.is_public_publish=1
|
|
|
+and a.report_layout in (1,2)
|
|
|
AND a.classify_name_first = "%v"
|
|
|
AND a.classify_id_second = %v
|
|
|
AND a.classify_id_second = b.id
|
|
@@ -427,6 +431,7 @@ WHERE
|
|
|
AND classify_name_first != "周报"
|
|
|
AND classify_id_second in ?
|
|
|
AND state IN (2, 6) and is_public_publish=1
|
|
|
+ AND report_layout in (1,2)
|
|
|
ORDER BY publish_time DESC, id desc LIMIT ? OFFSET ?
|
|
|
`
|
|
|
err = global.MYSQL["rddp"].Raw(sql, classifyIdSeconds, limit, offset).Scan(&list).Error
|
|
@@ -599,6 +604,7 @@ FROM
|
|
|
report as a
|
|
|
WHERE
|
|
|
a.state IN (2, 6) and a.is_public_publish=1
|
|
|
+ and a.report_layout in (1,2)
|
|
|
AND a.classify_id_first = ?
|
|
|
AND a.classify_id_second = ?
|
|
|
AND a.classify_id_third = ?
|