Changes between Version 4 and Version 5 of Ticket #101


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #101 – Description

    v4 v5  
    1010  company_id bigint NOT NULL, 
    1111  recommend_status integer DEFAULT 0, -- 首页的推荐商家状态... 
     12  last_update_date timestamp without time zone, -- 最后更新时间 
    1213  CONSTRAINT ent_company_business_status_pkey PRIMARY KEY (company_id ) 
    1314) 
     
    2728{{{ 
    2829update ent_company_business_status a 
    29 set recommend_status = case when (b.TYPE<>3  AND b.VIP_RANK> 0 AND b.STATUS>=0) then 1 else 0 end 
     30set recommend_status = case when (b.TYPE<>3  AND b.VIP_RANK> 0 AND b.STATUS>=0) then 1 else 0 end, 
     31last_update_date = now() 
    3032from ent_company b 
    3133where a.company_id = b.id 
    3234 
    33 insert into ent_company_business_status  
    34 select a.id, case when (a.TYPE<>3  AND a.VIP_RANK> 0 AND a.STATUS>=0) then 1 else 0 end 
     35insert into ent_company_business_status(company_id, recommend_status, last_update_date)  
     36select a.id, case when (a.TYPE<>3  AND a.VIP_RANK> 0 AND a.STATUS>=0) then 1 else 0 end,now() 
    3537from ent_company a 
    3638where not exists (select s.company_id from ent_company_business_status s where s.company_id = a.id)