alter table wx_rent_contract
add column contract_type smallint(2) not null default 0 comment '合同类型1店铺租金合同5店铺租金物业合同3多经租金合同6多经租金物业合同';
alter table wx_property_contract
add column contract_type smallint(2) not null default 0 comment '合同类型2店铺物业合同4多经物业合同5店铺租金物业合同6多经租金物业合同';

update wx_rent_contract set contract_type=1 where rent_shop_type=1 and operation_type=1;
update wx_rent_contract set contract_type=3 where rent_shop_type=2 and operation_type=1;
update wx_rent_contract set contract_type=5 where rent_shop_type=1 and operation_type=2;
update wx_rent_contract set contract_type=6 where rent_shop_type=2 and operation_type=2;

update wx_property_contract set contract_type=2 where rent_shop_type=1 and operation_type=1;
update wx_property_contract set contract_type=4 where rent_shop_type=2 and operation_type=1;
update wx_property_contract set contract_type=5 where rent_shop_type=1 and operation_type=2;
update wx_property_contract set contract_type=6 where rent_shop_type=2 and operation_type=2;