|
@@ -485,6 +485,73 @@
|
|
|
left join biz_attachment bat on 1=2
|
|
|
where bar.status = 1 and bar.approval_status = 1 and bc.id = 1161
|
|
|
order by top desc, create_time desc LIMIT 0,8) b
|
|
|
+
|
|
|
+ union ALL
|
|
|
+ select * from (select
|
|
|
+ bc.id bc_id,bc.name bc_name,bar.id,bar.title,bar.user_id,bar.author,bar.cover_image,bar.qrcode_path,bar.is_markdown,bar.top,
|
|
|
+ bar.category_id,bar.office_group_id,bar.status,bar.recommended,bar.slider,bar.slider_img,bar.original,
|
|
|
+ bar.description,bar.keywords,bar.comment,bar.signfor,bar.approval_status,bar.create_time,bar.update_time,bar.browse_number,bar.provinces_filter,bat.id bat_id,bat.file_name bat_file_name,bat.file_size bat_file_size,bat.file_type bat_file_type,bat.file_url bat_file_url,bat.business_id bat_business_id,bat.office_id bat_office_id,bat.create_by bat_create_by,bat.create_time bat_create_time,
|
|
|
+ bat.update_by bat_update_by,bat.update_time bat_update_time,bat.status bat_status
|
|
|
+ ,CASE WHEN datediff(NOW(),bar.create_time) < 2 THEN '1' ELSE '0' END isNews
|
|
|
+ from biz_category bc left join biz_article bar on bc.id = bar.category_id
|
|
|
+ left join biz_attachment bat on 1=2
|
|
|
+ where bar.status = 1 and bar.approval_status = 1 and bc.id = 11169
|
|
|
+ order by top desc, create_time desc LIMIT 0,7) b
|
|
|
+ union ALL
|
|
|
+ select * from (select
|
|
|
+ bc.id bc_id,bc.name bc_name,bar.id,bar.title,bar.user_id,bar.author,bar.cover_image,bar.qrcode_path,bar.is_markdown,bar.top,
|
|
|
+ bar.category_id,bar.office_group_id,bar.status,bar.recommended,bar.slider,bar.slider_img,bar.original,
|
|
|
+ bar.description,bar.keywords,bar.comment,bar.signfor,bar.approval_status,bar.create_time,bar.update_time,bar.browse_number,bar.provinces_filter,bat.id bat_id,bat.file_name bat_file_name,bat.file_size bat_file_size,bat.file_type bat_file_type,bat.file_url bat_file_url,bat.business_id bat_business_id,bat.office_id bat_office_id,bat.create_by bat_create_by,bat.create_time bat_create_time,
|
|
|
+ bat.update_by bat_update_by,bat.update_time bat_update_time,bat.status bat_status
|
|
|
+ ,CASE WHEN datediff(NOW(),bar.create_time) < 2 THEN '1' ELSE '0' END isNews
|
|
|
+ from biz_category bc left join biz_article bar on bc.id = bar.category_id
|
|
|
+ left join biz_attachment bat on 1=2
|
|
|
+ where bar.status = 1 and bar.approval_status = 1 and bc.id = 11171
|
|
|
+ order by top desc, create_time desc LIMIT 0,7) b
|
|
|
+ union ALL
|
|
|
+ select * from (select
|
|
|
+ bc.id bc_id,bc.name bc_name,bar.id,bar.title,bar.user_id,bar.author,bar.cover_image,bar.qrcode_path,bar.is_markdown,bar.top,
|
|
|
+ bar.category_id,bar.office_group_id,bar.status,bar.recommended,bar.slider,bar.slider_img,bar.original,
|
|
|
+ bar.description,bar.keywords,bar.comment,bar.signfor,bar.approval_status,bar.create_time,bar.update_time,bar.browse_number,bar.provinces_filter,bat.id bat_id,bat.file_name bat_file_name,bat.file_size bat_file_size,bat.file_type bat_file_type,bat.file_url bat_file_url,bat.business_id bat_business_id,bat.office_id bat_office_id,bat.create_by bat_create_by,bat.create_time bat_create_time,
|
|
|
+ bat.update_by bat_update_by,bat.update_time bat_update_time,bat.status bat_status
|
|
|
+ ,CASE WHEN datediff(NOW(),bar.create_time) < 2 THEN '1' ELSE '0' END isNews
|
|
|
+ from biz_category bc left join biz_article bar on bc.id = bar.category_id
|
|
|
+ left join biz_attachment bat on 1=2
|
|
|
+ where bar.status = 1 and bar.approval_status = 1 and bc.id = 11172
|
|
|
+ order by top desc, create_time desc LIMIT 0,7) b
|
|
|
+ union ALL
|
|
|
+ select * from (select
|
|
|
+ bc.id bc_id,bc.name bc_name,bar.id,bar.title,bar.user_id,bar.author,bar.cover_image,bar.qrcode_path,bar.is_markdown,bar.top,
|
|
|
+ bar.category_id,bar.office_group_id,bar.status,bar.recommended,bar.slider,bar.slider_img,bar.original,
|
|
|
+ bar.description,bar.keywords,bar.comment,bar.signfor,bar.approval_status,bar.create_time,bar.update_time,bar.browse_number,bar.provinces_filter,bat.id bat_id,bat.file_name bat_file_name,bat.file_size bat_file_size,bat.file_type bat_file_type,bat.file_url bat_file_url,bat.business_id bat_business_id,bat.office_id bat_office_id,bat.create_by bat_create_by,bat.create_time bat_create_time,
|
|
|
+ bat.update_by bat_update_by,bat.update_time bat_update_time,bat.status bat_status
|
|
|
+ ,CASE WHEN datediff(NOW(),bar.create_time) < 2 THEN '1' ELSE '0' END isNews
|
|
|
+ from biz_category bc left join biz_article bar on bc.id = bar.category_id
|
|
|
+ left join biz_attachment bat on 1=2
|
|
|
+ where bar.status = 1 and bar.approval_status = 1 and bc.id = 11173
|
|
|
+ order by top desc, create_time desc LIMIT 0,7) b
|
|
|
+ union ALL
|
|
|
+ select * from (select
|
|
|
+ bc.id bc_id,bc.name bc_name,bar.id,bar.title,bar.user_id,bar.author,bar.cover_image,bar.qrcode_path,bar.is_markdown,bar.top,
|
|
|
+ bar.category_id,bar.office_group_id,bar.status,bar.recommended,bar.slider,bar.slider_img,bar.original,
|
|
|
+ bar.description,bar.keywords,bar.comment,bar.signfor,bar.approval_status,bar.create_time,bar.update_time,bar.browse_number,bar.provinces_filter,bat.id bat_id,bat.file_name bat_file_name,bat.file_size bat_file_size,bat.file_type bat_file_type,bat.file_url bat_file_url,bat.business_id bat_business_id,bat.office_id bat_office_id,bat.create_by bat_create_by,bat.create_time bat_create_time,
|
|
|
+ bat.update_by bat_update_by,bat.update_time bat_update_time,bat.status bat_status
|
|
|
+ ,CASE WHEN datediff(NOW(),bar.create_time) < 2 THEN '1' ELSE '0' END isNews
|
|
|
+ from biz_category bc left join biz_article bar on bc.id = bar.category_id
|
|
|
+ left join biz_attachment bat on 1=2
|
|
|
+ where bar.status = 1 and bar.approval_status = 1 and bc.id = 11174
|
|
|
+ order by top desc, create_time desc LIMIT 0,7) b
|
|
|
+ union ALL
|
|
|
+ select * from (select
|
|
|
+ bc.id bc_id,bc.name bc_name,bar.id,bar.title,bar.user_id,bar.author,bar.cover_image,bar.qrcode_path,bar.is_markdown,bar.top,
|
|
|
+ bar.category_id,bar.office_group_id,bar.status,bar.recommended,bar.slider,bar.slider_img,bar.original,
|
|
|
+ bar.description,bar.keywords,bar.comment,bar.signfor,bar.approval_status,bar.create_time,bar.update_time,bar.browse_number,bar.provinces_filter,bat.id bat_id,bat.file_name bat_file_name,bat.file_size bat_file_size,bat.file_type bat_file_type,bat.file_url bat_file_url,bat.business_id bat_business_id,bat.office_id bat_office_id,bat.create_by bat_create_by,bat.create_time bat_create_time,
|
|
|
+ bat.update_by bat_update_by,bat.update_time bat_update_time,bat.status bat_status
|
|
|
+ ,CASE WHEN datediff(NOW(),bar.create_time) < 2 THEN '1' ELSE '0' END isNews
|
|
|
+ from biz_category bc left join biz_article bar on bc.id = bar.category_id
|
|
|
+ left join biz_attachment bat on 1=2
|
|
|
+ where bar.status = 1 and bar.approval_status = 1 and bc.id = 11175
|
|
|
+ order by top desc, create_time desc LIMIT 0,7) b
|
|
|
</select>
|
|
|
|
|
|
<sql id="Base_Column_List">
|