Changes between Version 3 and Version 4 of Ticket #101


Ignore:
Timestamp:
04/23/2012 11:10:25 AM (14 years ago)
Author:
chenchongqi
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #101 – Description

    v3 v4  
    2323ent_company.TYPE<>Company.TYPE_STORE(<>3,非网店)  AND ent_company.VIP_RANK> Company.VIP_RANK_FREE(>0,非免费商家)  AND ent_company.STATUS>=Company.STATUS_NO_AUDIT(>=0,非禁用或者删除商家)'; 
    2424}}} 
     25 
     26定时任务: 
     27{{{ 
     28update ent_company_business_status a 
     29set recommend_status = case when (b.TYPE<>3  AND b.VIP_RANK> 0 AND b.STATUS>=0) then 1 else 0 end 
     30from ent_company b 
     31where a.company_id = b.id 
     32 
     33insert into ent_company_business_status  
     34select a.id, case when (a.TYPE<>3  AND a.VIP_RANK> 0 AND a.STATUS>=0) then 1 else 0 end 
     35from ent_company a 
     36where not exists (select s.company_id from ent_company_business_status s where s.company_id = a.id) 
     37 
     38}}}