Commit 4333bca0 by lizefeng

新增sku标签的刷新

parent 859dc56b
...@@ -1087,6 +1087,31 @@ alter table dc_auto_purchase_ontheway rename dc_auto_purchase_onthewayTemp; ...@@ -1087,6 +1087,31 @@ alter table dc_auto_purchase_ontheway rename dc_auto_purchase_onthewayTemp;
alter table dc_auto_purchase_ontheway_temp rename dc_auto_purchase_ontheway; alter table dc_auto_purchase_ontheway_temp rename dc_auto_purchase_ontheway;
alter table dc_auto_purchase_onthewayTemp rename dc_auto_purchase_ontheway_temp; alter table dc_auto_purchase_onthewayTemp rename dc_auto_purchase_ontheway_temp;
truncate table dc_auto_purchase_ontheway_temp; ",commandTimeout:0); truncate table dc_auto_purchase_ontheway_temp; ",commandTimeout:0);
_connection.Execute(@"-- 刷新 订单sku 标签表
set session transaction isolation level read uncommitted;
start transaction;
-- 清空视图表的数据
Truncate table dc_auto_config_sku_label_temp;
INSERT into dc_auto_config_sku_label_temp(`bailun_sku`,`label`) (
select
t1.bailun_sku,
(
case when t1.buyer_name='赵美聪' and t1.source = 1 then '服装精准开发'
when t1.buyer_name='赵美聪' then '服装供应商推荐'
when t1.buyer_name!='赵美聪' and t1.source = 1 then '非服装精准开发'
else '未知'
end
) as 'label'
from dc_base_sku as t1
);
alter table dc_auto_config_sku_label rename dc_auto_config_sku_labelTemp;
alter table dc_auto_config_sku_label_temp rename dc_auto_config_sku_label;
alter table dc_auto_config_sku_labelTemp rename dc_auto_config_sku_label_temp;
truncate table dc_auto_config_sku_label_temp; ", commandTimeout: 0);
} }
catch (Exception ex) catch (Exception ex)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment