add workflow 市场News-Agents调度,dev

This commit is contained in:
root 2025-12-21 19:53:41 +08:00
parent 757f2af3dd
commit fae2b3a343
1 changed files with 2 additions and 1 deletions

View File

@ -64,7 +64,8 @@ on p1.crm_contact_number =p5.crm_contact_account
where (p1.product_class like '2025%' or p1.product_class like '2035%' or p1.product_class like '2610%' or p1.product_class like '2026%' or p1.product_class like '2036%') and coalesce(p2.name,p1.parent_account_name) in (select distinct company_name from newsletter_t1) where (p1.product_class like '2025%' or p1.product_class like '2035%' or p1.product_class like '2610%' or p1.product_class like '2026%' or p1.product_class like '2036%') and coalesce(p2.name,p1.parent_account_name) in (select distinct company_name from newsletter_t1)
order by p1.tek_opportunity_id,status_last_update desc,p1.as_of_date asc; order by p1.tek_opportunity_id,status_last_update desc,p1.as_of_date asc;
delete from p60_mart.news_letter_info; delete from p60_mart.news_letter_info
where source_system='market_summary';
INSERT INTO p60_mart.news_letter_info INSERT INTO p60_mart.news_letter_info
(account_name, saler_name, whitelist_flag, newsletter_title, summary, key_products, tek_relevance, industry, prov_name, city_name, district, contact_qty, total_funnel, report_amt,source_url,business_type,create_tm,source_system) (account_name, saler_name, whitelist_flag, newsletter_title, summary, key_products, tek_relevance, industry, prov_name, city_name, district, contact_qty, total_funnel, report_amt,source_url,business_type,create_tm,source_system)
select distinct on (p1.company_name,p1.source_url) p1.company_name account_name, coalesce(saler_name,''), whitelist_flag, newsletter_title, summary select distinct on (p1.company_name,p1.source_url) p1.company_name account_name, coalesce(saler_name,''), whitelist_flag, newsletter_title, summary