西藏巴青项目

biz_v_livestock_resource.sql 846B

1234567
  1. create or replace view v_livestock_resource as
  2. select id, 1 as source_type, resource_name as title, introduction, resource_type as type, photo_file_url as cover_file_url, null as content_file_url, publish_time from biz_medical_resource where del_flag='0' and publish_status=1 and resource_type='004002'
  3. UNION ALL
  4. select id, 2 as source_type, resource_name as title, introduction, resource_type as type, cover_file_url, video_file_url as content_file_url, publish_time from biz_tech_resource where del_flag='0' and publish_status=1 and resource_type in ('004006','004008')
  5. UNION ALL
  6. select id, 2 as source_type, resource_name as title, introduction, resource_type as type, photo_file_url as cover_file_url, video_file_url as content_file_url, publish_time from biz_tech_resource where del_flag='0' and publish_status=1 and resource_type='004007';