Commit 6021f850 by 蘑菇🍄

导入指定会员

parent f0d321d2
DELETE A FROM tab_gic_mall_order_batch_deliver_log A
LEFT JOIN tab_gic_mall_order B ON A.order_id=B.order_id
WHERE B.enterprise_id = 'ff8080816170e2970161f626826b5990' and B.member_id ='ff808081680f541901681309c4915322' and A.from_erp = 1;
WHERE B.enterprise_id = 'ff8080816170e2970161f626826b5990' and B.member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179') and A.from_erp = 1;
DELETE A FROM tab_gic_mall_order_refund_consult A
LEFT JOIN tab_gic_mall_order_refund B ON A.order_refund_id=B.order_refund_id
WHERE B.enterprise_id = 'ff8080816170e2970161f626826b5990' and B.member_id ='ff808081680f541901681309c4915322' and A.from_erp = 1;
WHERE B.enterprise_id = 'ff8080816170e2970161f626826b5990' and B.member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179') and A.from_erp = 1;
DELETE A FROM tab_gic_mall_order_refund_logistics A
LEFT JOIN tab_gic_mall_order_refund B ON A.mall_order_id=B.order_id
WHERE B.enterprise_id = 'ff8080816170e2970161f626826b5990' and B.member_id ='ff808081680f541901681309c4915322' and A.from_erp = 1;
WHERE B.enterprise_id = 'ff8080816170e2970161f626826b5990' and B.member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179') and A.from_erp = 1;
DELETE FROM tab_gic_mall_order WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id ='ff808081680f541901681309c4915322';
DELETE FROM tab_gic_mall_order_item WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id ='ff808081680f541901681309c4915322';
DELETE FROM tab_gic_mall_order_logistics WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id ='ff808081680f541901681309c4915322';
DELETE FROM tab_gic_mall_order_process WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id ='ff808081680f541901681309c4915322';
DELETE FROM tab_gic_mall_order_refund WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id ='ff808081680f541901681309c4915322';
DELETE FROM tab_gic_mall_collection WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id ='ff808081680f541901681309c4915322';
DELETE FROM tab_gic_mall_evaluate WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id ='ff808081680f541901681309c4915322';
DELETE FROM `gic3.0`.tab_gic_member_address WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id ='ff808081680f541901681309c4915322';
DELETE FROM tab_gic_mall_shopping_cart WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id ='ff808081680f541901681309c4915322';
DELETE FROM tab_gic_mall_order WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
DELETE FROM tab_gic_mall_order_item WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
DELETE FROM tab_gic_mall_order_logistics WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
DELETE FROM tab_gic_mall_order_process WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
DELETE FROM tab_gic_mall_order_refund WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
DELETE FROM tab_gic_mall_collection WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
DELETE FROM tab_gic_mall_evaluate WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
DELETE FROM `gic3.0`.tab_gic_member_address WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
DELETE FROM tab_gic_mall_shopping_cart WHERE from_erp = 1 and enterprise_id= 'ff8080816170e2970161f626826b5990' and member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
......@@ -29,33 +29,33 @@ DELETE FROM tab_gic_mall_shopping_cart WHERE from_erp = 1 and enterpri
-- 合并单个人的数据
-- WX20062935
INSERT INTO tab_gic_mall_order_item SELECT * FROM tab_gic_mall_order_item_copy WHERE member_id in ('ff808081680f541901681309c4915322');
INSERT INTO tab_gic_mall_order SELECT * FROM tab_gic_mall_order_copy WHERE member_id in ('ff808081680f541901681309c4915322');
INSERT INTO tab_gic_mall_shopping_cart SELECT * FROM tab_gic_mall_shopping_cart_copy WHERE member_id in ('ff808081680f541901681309c4915322');
INSERT INTO tab_gic_mall_collection SELECT * FROM tab_gic_mall_collection_copy WHERE member_id in ('ff808081680f541901681309c4915322');
insert into `gic3.0`.tab_gic_member_address SELECT * FROM `gic3.0`.tab_gic_member_address_copy WHERE member_id in ('ff808081680f541901681309c4915322');
insert into tab_gic_mall_evaluate SELECT * FROM tab_gic_mall_evaluate_copy WHERE member_id in ('ff808081680f541901681309c4915322');
insert into tab_gic_mall_order_logistics SELECT * FROM tab_gic_mall_order_logistics_copy WHERE member_id in ('ff808081680f541901681309c4915322');
INSERT INTO tab_gic_mall_order_item SELECT * FROM tab_gic_mall_order_item_copy WHERE member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
INSERT INTO tab_gic_mall_order SELECT * FROM tab_gic_mall_order_copy WHERE member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
INSERT INTO tab_gic_mall_shopping_cart SELECT * FROM tab_gic_mall_shopping_cart_copy WHERE member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
INSERT INTO tab_gic_mall_collection SELECT * FROM tab_gic_mall_collection_copy WHERE member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
insert into `gic3.0`.tab_gic_member_address SELECT * FROM `gic3.0`.tab_gic_member_address_copy WHERE member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
insert into tab_gic_mall_evaluate SELECT * FROM tab_gic_mall_evaluate_copy WHERE member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
insert into tab_gic_mall_order_logistics SELECT * FROM tab_gic_mall_order_logistics_copy WHERE member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
insert into tab_gic_mall_order_refund SELECT * FROM tab_gic_mall_order_refund_copy WHERE member_id in ('ff808081680f541901681309c4915322');
insert into tab_gic_mall_order_process SELECT * FROM tab_gic_mall_order_process_copy WHERE member_id in ('ff808081680f541901681309c4915322');
insert into tab_gic_mall_order_refund SELECT * FROM tab_gic_mall_order_refund_copy WHERE member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
insert into tab_gic_mall_order_process SELECT * FROM tab_gic_mall_order_process_copy WHERE member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179');
INSERT INTO tab_gic_mall_order_refund_consult SELECT * FROM tab_gic_mall_order_refund_consult_copy
WHERE order_refund_id in
(
SELECT order_refund_id FROM tab_gic_mall_order_refund_copy WHERE member_id in ('ff808081680f541901681309c4915322')
SELECT order_refund_id FROM tab_gic_mall_order_refund_copy WHERE member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179')
);
INSERT INTO tab_gic_mall_order_refund_logistics SELECT * FROM tab_gic_mall_order_refund_logistics_copy
WHERE mall_order_id in
(
SELECT order_id FROM tab_gic_mall_order_refund_copy WHERE member_id in ('ff808081680f541901681309c4915322')
SELECT order_id FROM tab_gic_mall_order_refund_copy WHERE member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179')
);
INSERT INTO tab_gic_mall_order_batch_deliver_log SELECT * FROM tab_gic_mall_order_batch_deliver_log_copy
WHERE order_id in
(
SELECT order_id FROM tab_gic_mall_order WHERE member_id in ('ff808081680f541901681309c4915322')
SELECT order_id FROM tab_gic_mall_order WHERE member_id in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179')
);
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