Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
script
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚闰伍
script
Commits
aa06f7ba
Commit
aa06f7ba
authored
Feb 18, 2019
by
蘑菇🍄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加eid
parent
39ed73c5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
65 deletions
+65
-65
合并会员临时表.sql
jnby-home/合并会员临时表.sql
+28
-28
合并到正式表.sql
jnby-home/合并到正式表.sql
+2
-2
合并清理.sql
jnby-home/合并清理.sql
+2
-2
导入指定的会员.sql
jnby-home/导入指定的会员.sql
+15
-15
数据组装pro.sql
jnby-home/数据组装pro.sql
+18
-18
No files found.
jnby-home/合并会员临时表.sql
View file @
aa06f7ba
-- 会员信息集合
CREATE
TABLE
tab_gic_member_
SAMO
LIKE
tab_gic_member_0
;
-- delete from `gic3.0`.tab_gic_member_
SAMO
;
insert
into
`gic3.0`
.
tab_gic_member_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_0
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_1
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_2
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_3
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_4
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_5
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_6
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_7
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_8
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_9
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
CREATE
TABLE
tab_gic_member_
HOME
LIKE
tab_gic_member_0
;
-- delete from `gic3.0`.tab_gic_member_
HOME
;
insert
into
`gic3.0`
.
tab_gic_member_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_0
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_1
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_2
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_3
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_4
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_5
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_6
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_7
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_8
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_9
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
-- 会员信息集合
CREATE
TABLE
tab_gic_member_clerk_
SAMO
LIKE
tab_gic_member_clerk_0
;
-- delete from `gic3.0`.tab_gic_member_clerk_
SAMO
;
delete
from
`gic3.0`
.
tab_gic_member_clerk_
SAMO
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_clerk_0
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_clerk_1
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_clerk_2
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_clerk_3
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_clerk_4
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_clerk_5
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_clerk_6
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_clerk_7
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_clerk_8
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
SAMO
select
*
from
`gic3.0`
.
tab_gic_member_clerk_9
where
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
CREATE
TABLE
tab_gic_member_clerk_
HOME
LIKE
tab_gic_member_clerk_0
;
-- delete from `gic3.0`.tab_gic_member_clerk_
HOME
;
delete
from
`gic3.0`
.
tab_gic_member_clerk_
HOME
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_clerk_0
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_clerk_1
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_clerk_2
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_clerk_3
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_clerk_4
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_clerk_5
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_clerk_6
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_clerk_7
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_clerk_8
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
insert
into
`gic3.0`
.
tab_gic_member_clerk_
HOME
select
*
from
`gic3.0`
.
tab_gic_member_clerk_9
where
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
...
...
jnby-home/合并到正式表.sql
View file @
aa06f7ba
-- 数据
合并
-- 数据
合并
...
...
@@ -10,4 +10,4 @@ insert into tab_gic_mall_collection select * from tab_gic_mall_coll
insert
into
tab_gic_mall_evaluate
select
*
from
tab_gic_mall_evaluate_copy
;
insert
into
tab_gic_mall_order_batch_deliver_log
select
*
from
tab_gic_mall_order_batch_deliver_log_copy
;
insert
into
tab_gic_mall_shopping_cart
select
*
from
tab_gic_mall_shopping_cart_copy
;
insert
into
`gic3.0`
.
tab_gic_member_address
select
*
from
`gic3.0`
.
tab_gic_member_address_copy
where
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_address
select
*
from
`gic3.0`
.
tab_gic_member_address_copy
where
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
;
jnby-home/合并清理.sql
View file @
aa06f7ba
...
...
@@ -35,7 +35,7 @@ insert into tab_gic_mall_collection select * from tab_gic_mall_col
insert
into
tab_gic_mall_evaluate
select
*
from
tab_gic_mall_evaluate_copy
;
insert
into
tab_gic_mall_order_batch_deliver_log
select
*
from
tab_gic_mall_order_batch_deliver_log_copy
;
insert
into
tab_gic_mall_shopping_cart
select
*
from
tab_gic_mall_shopping_cart_copy
;
insert
into
`gic3.0`
.
tab_gic_member_address
select
*
from
`gic3.0`
.
tab_gic_member_address_copy
where
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
;
insert
into
`gic3.0`
.
tab_gic_member_address
select
*
from
`gic3.0`
.
tab_gic_member_address_copy
where
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
;
...
...
jnby-home/导入指定的会员.sql
View file @
aa06f7ba
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
=
'ff8080816
4f65d9501651798e0f8143d
'
and
B
.
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
)
and
A
.
from_erp
=
1
;
WHERE
B
.
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
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
=
'ff8080816
4f65d9501651798e0f8143d
'
and
B
.
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
)
and
A
.
from_erp
=
1
;
WHERE
B
.
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
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
=
'ff8080816
4f65d9501651798e0f8143d
'
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
=
'ff8080816
4f65d9501651798e0f8143d
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_order_item
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_order_logistics
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_order_process
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_order_refund
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_collection
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_evaluate
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
`gic3.0`
.
tab_gic_member_address
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_shopping_cart
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
WHERE
B
.
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
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
=
'ff8080816
170e8990161f65038745e4e
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_order_item
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_order_logistics
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_order_process
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_order_refund
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_collection
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_evaluate
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
`gic3.0`
.
tab_gic_member_address
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
DELETE
FROM
tab_gic_mall_shopping_cart
WHERE
from_erp
=
1
and
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
and
member_id
in
(
'ff80808166174bfd016619bd2fbd1657'
,
'ff8080816717fc9c01671a89e80c4f17'
,
'ff80808163b2461d0163b2787ad50179'
);
...
...
jnby-home/数据组装pro.sql
View file @
aa06f7ba
...
...
@@ -56,10 +56,10 @@ update `order_tmp_import`.order_import A inner join(select county_id,full_name f
,
1
as
from_erp
FROM
`order_tmp_import`
.
order_member_address
addr
LEFT
JOIN
`gic3.0`
.
tab_gic_member_
SAMO
members_view
on
members_view
.
card_num
=
addr
.
member_number
LEFT
JOIN
`gic3.0`
.
tab_gic_member_
HOME
members_view
on
members_view
.
card_num
=
addr
.
member_number
LEFT
JOIN
`gic3.0`
.
tab_gic_member_sms
s
on
s
.
phone_number
=
addr
.
buyer_moile
WHERE
s
.
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
and
addr
.
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
WHERE
s
.
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
and
addr
.
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
GROUP
BY
addr
.
member_number
,
addr
.
address
;
...
...
@@ -103,7 +103,7 @@ update `order_tmp_import`.order_import A inner join(select county_id,full_name f
,
1
as
from_erp
,
null
as
order_sequence
FROM
`order_tmp_import`
.
order_import
oi
left
join
`gic3.0`
.
tab_gic_member_
SAMO
members_view
on
members_view
.
card_num
=
oi
.
member_card_num
left
join
`gic3.0`
.
tab_gic_member_
HOME
members_view
on
members_view
.
card_num
=
oi
.
member_card_num
LEFT
join
(
SELECT
*
FROM
`gic3.0`
.
tab_gic_member_address
UNION
...
...
@@ -111,7 +111,7 @@ update `order_tmp_import`.order_import A inner join(select county_id,full_name f
)
addr
on
addr
.
member_id
=
members_view
.
member_id
left
join
`gic3.0`
.
tab_gic_logistics_company
logistics
on
oi
.
logistics_company_code
LIKE
CONCAT
(
'%'
,
logistics
.
logistics_company_name
,
'%'
)
left
join
`gic3.0`
.
tab_gic_member_clerk_
SAMO
clerk
on
clerk
.
member_id
=
members_view
.
member_id
left
join
`gic3.0`
.
tab_gic_member_clerk_
HOME
clerk
on
clerk
.
member_id
=
members_view
.
member_id
WHERE
members_view
.
member_id
is
not
null
-- AND oi.member_card_num in ('WX60206813','WX60332175','WX01805426')
...
...
@@ -159,8 +159,8 @@ update `order_tmp_import`.order_import A inner join(select county_id,full_name f
FROM
`order_tmp_import`
.
order_item_import
oitem
left
join
tab_gic_mall_order_copy
o
on
o
.
erp_order_id
=
oitem
.
erp_order_id
left
join
`gic_mall`
.
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
oitem
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
left
join
`gic_mall`
.
tab_gic_mall_pro_sku
sku
on
sku
.
mall_pro_sku_code
=
oitem
.
mall_pro_sku_code
and
sku
.
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
left
join
`gic_mall`
.
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
oitem
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
left
join
`gic_mall`
.
tab_gic_mall_pro_sku
sku
on
sku
.
mall_pro_sku_code
=
oitem
.
mall_pro_sku_code
and
sku
.
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
where
o
.
order_id
is
not
NULL
and
oitem
.
member_card_no
is
not
NULL
...
...
@@ -288,7 +288,7 @@ UPDATE `tab_gic_mall_order_refund_logistics_copy` SET logistics_information = re
FROM
`order_tmp_import`
.
order_refund_import
r
left
join
tab_gic_mall_order_copy
o
on
o
.
order_number
=
r
.
out_trade_no
left
join
tab_gic_mall_order_item_copy
item
on
item
.
order_id
=
o
.
order_id
and
r
.
apply_refund_price
=
item
.
pay_amount
left
join
`gic3.0`
.
tab_gic_member_
SAMO
members_view
on
members_view
.
card_num
=
r
.
member_card_no
left
join
`gic3.0`
.
tab_gic_member_
HOME
members_view
on
members_view
.
card_num
=
r
.
member_card_no
WHERE
o
.
order_id
is
not
NULL
-- and o.member_in in ('ff80808166174bfd016619bd2fbd1657','ff8080816717fc9c01671a89e80c4f17','ff80808163b2461d0163b2787ad50179' )
group
by
r
.
order_item_number
...
...
@@ -371,9 +371,9 @@ group by e.id
;
UPDATE
tab_gic_mall_evaluate_copy
e
inner
JOIN
`gic3.0`
.
tab_gic_member_
SAMO
members_view
ON
members_view
.
card_num
=
e
.
member_card_no
inner
JOIN
`gic3.0`
.
tab_gic_member_
HOME
members_view
ON
members_view
.
card_num
=
e
.
member_card_no
SET
e
.
member_id
=
members_view
.
member_id
,
e
.
clique_member_id
=
members_view
.
clique_member_id
,
e
.
member_nickname
=
members_view
.
third_nickname
,
e
.
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d'
,
e
.
clique_id
=
members_view
.
clique_id
where
members_view
.
enterprise_id
=
'ff80808164f65d9501651798e0f8143d
'
;
e
.
enterprise_id
=
'ff8080816
170e8990161f65038745e4e'
,
e
.
clique_id
=
members_view
.
clique_id
where
members_view
.
enterprise_id
=
'ff8080816170e8990161f65038745e4e
'
;
-- 把收藏夹导入导临时表【tab_gic_mall_collection_copy】
...
...
@@ -395,8 +395,8 @@ replace INTO `tab_gic_mall_collection_copy`
,
co
.
erp_create_time
,
co
.
erp_create_time
as
update_time
,
members_view
.
clique_id
,
members_view
.
clique_member_id
,
1
as
from_erp
from
`order_tmp_import`
.
collect_import
co
left
join
`gic_mall`
.
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
co
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
left
join
`gic3.0`
.
tab_gic_member_
SAMO
members_view
on
members_view
.
card_num
=
co
.
card_no
left
join
`gic_mall`
.
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
co
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
left
join
`gic3.0`
.
tab_gic_member_
HOME
members_view
on
members_view
.
card_num
=
co
.
card_no
-- WHERE co.card_no in ('WX60206813','WX60332175','WX01805426')
group
by
co
.
card_no
,
co
.
mall_pro_code
;
...
...
@@ -420,9 +420,9 @@ replace INTO `tab_gic_mall_shopping_cart_copy` (
from
`order_tmp_import`
.
mall_shoopping_cart
cart
left
join
`gic_mall`
.
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
cart
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
left
join
`gic_mall`
.
tab_gic_mall_pro_sku
sku
on
sku
.
mall_pro_sku_code
=
cart
.
mall_sku_code
and
sku
.
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
left
join
`gic3.0`
.
tab_gic_member_
SAMO
members_view
on
members_view
.
card_num
=
cart
.
cardno
left
join
`gic_mall`
.
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
cart
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
left
join
`gic_mall`
.
tab_gic_mall_pro_sku
sku
on
sku
.
mall_pro_sku_code
=
cart
.
mall_sku_code
and
sku
.
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
left
join
`gic3.0`
.
tab_gic_member_
HOME
members_view
on
members_view
.
card_num
=
cart
.
cardno
-- WHERE cart.cardno in ('WX60206813','WX60332175','WX01805426')
group
by
cart
.
cardno
,
cart
.
mall_pro_code
,
cart
.
mall_sku_code
;
...
...
@@ -437,7 +437,7 @@ INNER JOIN (
set
A
.
delivered_count
=
c
.
delivered_count
,
A
.
no_delivere_count
=
(
mall_pro_number
-
c
.
delivered_count
)
WHERE
A
.
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
WHERE
A
.
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
;
-- 退款数量
...
...
@@ -453,6 +453,6 @@ INNER JOIN (
set
A
.
refund_number
=
r
.
refund_number
,
A
.
refund_status
=
2
WHERE
A
.
enterprise_id
=
'ff8080816
4f65d9501651798e0f8143d
'
WHERE
A
.
enterprise_id
=
'ff8080816
170e8990161f65038745e4e
'
AND
r
.
refund_number
is
not
null
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment