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
57e1dc68
Commit
57e1dc68
authored
Jan 17, 2019
by
蘑菇🍄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
脚本细节处理
parent
ee37d893
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
20 deletions
+18
-20
数据组装pro.sql
jnby-CROQUIS速写/数据组装pro.sql
+9
-11
数据组装pro.sql
jnby-less/数据组装pro.sql
+9
-9
No files found.
jnby-CROQUIS速写/数据组装pro.sql
View file @
57e1dc68
-- 数据填充,订单地址所在区域
update
order_import
A
inner
join
(
select
county_id
,
full_name
from
`gic3.0`
.
tab_gic_county
)
c
on
...
...
@@ -141,8 +139,8 @@ update order_import A inner join(select county_id,full_name from `gic3.0`.tab_gi
FROM
order_item_import
oitem
left
join
tab_gic_mall_order_copy
o
on
o
.
erp_order_id
=
oitem
.
erp_order_id
left
join
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
oitem
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816170e8990161f6809a4b609b'
left
join
tab_gic_mall_pro_sku
sku
on
sku
.
mall_pro_sku_code
=
oitem
.
mall_pro_sku_code
and
sku
.
enterprise_id
=
'ff8080816170e8990161f6809a4b609b'
left
join
`gic_mall`
.
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
oitem
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816170e8990161f6809a4b609b'
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
=
'ff8080816170e8990161f6809a4b609b'
where
o
.
order_id
is
not
NULL
and
oitem
.
member_card_no
is
not
NULL
...
...
@@ -266,7 +264,7 @@ UPDATE `tab_gic_mall_order_refund_logistics_copy` SET logistics_information = re
,
null
as
refund_process_time
,
null
as
refund_goods_time
,
o
.
order_number
as
doc_no
,
1
as
from_erp
FROM
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_i
tem_number
=
r
.
order_item_number
left
join
tab_gic_mall_order_item_copy
item
on
item
.
order_i
d
=
o
.
order_id
and
r
.
apply_refund_price
=
item
.
pay_amount
left
join
`gic3.0`
.
tab_gic_member_CROQUIS
members_view
on
members_view
.
card_num
=
r
.
member_card_no
WHERE
o
.
order_id
is
not
NULL
group
by
r
.
order_item_number
...
...
@@ -320,8 +318,8 @@ FROM tab_gic_mall_order_refund_copy r
;
-- 把商品评论导入导临时表【tab_gic_mall_evaluate】
INSERT
INTO
`tab_gic_mall_evaluate
`
-- 把商品评论导入导临时表【tab_gic_mall_evaluate
_copy
】
INSERT
INTO
`tab_gic_mall_evaluate
_copy`
(
`evaluate_id`
,
`enterprise_id`
,
`member_id`
,
`evaluate_type`
,
`mall_order_id`
,
`mall_order_item_id`
,
`mall_pro_id`
,
`evaluate_content`
...
...
@@ -360,7 +358,7 @@ INSERT 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
collect_import
co
left
join
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
co
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816170e8990161f6809a4b609b'
left
join
`gic_mall`
.
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
co
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816170e8990161f6809a4b609b'
left
join
`gic3.0`
.
tab_gic_member_CROQUIS
members_view
on
members_view
.
card_num
=
co
.
card_no
group
by
co
.
card_no
,
co
.
mall_pro_code
;
...
...
@@ -383,8 +381,8 @@ INSERT INTO `tab_gic_mall_shopping_cart_copy` (
,
cart
.
mall_pro_summary_price
,
members_view
.
clique_id
,
members_view
.
clique_member_id
,
1
as
from_erp
from
mall_shoopping_cart
cart
left
join
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
cart
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816170e8990161f6809a4b609b'
left
join
tab_gic_mall_pro_sku
sku
on
sku
.
mall_pro_sku_code
=
cart
.
mall_sku_code
and
sku
.
enterprise_id
=
'ff8080816170e8990161f6809a4b609b'
left
join
`gic_mall`
.
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
cart
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816170e8990161f6809a4b609b'
left
join
`gic_mall`
.
tab_gic_mall_pro_sku
sku
on
sku
.
mall_pro_sku_code
=
cart
.
mall_sku_code
and
sku
.
enterprise_id
=
'ff8080816170e8990161f6809a4b609b'
left
join
`gic3.0`
.
tab_gic_member_CROQUIS
members_view
on
members_view
.
card_num
=
cart
.
cardno
group
by
cart
.
cardno
,
cart
.
mall_pro_code
,
cart
.
mall_sku_code
;
...
...
jnby-less/数据组装pro.sql
View file @
57e1dc68
...
...
@@ -139,8 +139,8 @@ update order_import A inner join(select county_id,full_name from `gic3.0`.tab_gi
FROM
order_item_import
oitem
left
join
tab_gic_mall_order_copy
o
on
o
.
erp_order_id
=
oitem
.
erp_order_id
left
join
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
oitem
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816170e8990161f66a272a5fe4'
left
join
tab_gic_mall_pro_sku
sku
on
sku
.
mall_pro_sku_code
=
oitem
.
mall_pro_sku_code
and
sku
.
enterprise_id
=
'ff8080816170e8990161f66a272a5fe4'
left
join
`gic_mall`
.
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
oitem
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816170e8990161f66a272a5fe4'
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
=
'ff8080816170e8990161f66a272a5fe4'
where
o
.
order_id
is
not
NULL
and
oitem
.
member_card_no
is
not
NULL
...
...
@@ -264,7 +264,7 @@ UPDATE `tab_gic_mall_order_refund_logistics_copy` SET logistics_information = re
,
null
as
refund_process_time
,
null
as
refund_goods_time
,
o
.
order_number
as
doc_no
,
1
as
from_erp
FROM
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_i
tem_number
=
r
.
order_item_number
left
join
tab_gic_mall_order_item_copy
item
on
item
.
order_i
d
=
o
.
order_id
and
r
.
apply_refund_price
=
item
.
pay_amount
left
join
`gic3.0`
.
tab_gic_member_less
members_view
on
members_view
.
card_num
=
r
.
member_card_no
WHERE
o
.
order_id
is
not
NULL
group
by
r
.
order_item_number
...
...
@@ -318,8 +318,8 @@ FROM tab_gic_mall_order_refund_copy r
;
-- 把商品评论导入导临时表【tab_gic_mall_evaluate】
INSERT
INTO
`tab_gic_mall_evaluate
`
-- 把商品评论导入导临时表【tab_gic_mall_evaluate
_copy
】
INSERT
INTO
`tab_gic_mall_evaluate
_copy`
(
`evaluate_id`
,
`enterprise_id`
,
`member_id`
,
`evaluate_type`
,
`mall_order_id`
,
`mall_order_item_id`
,
`mall_pro_id`
,
`evaluate_content`
...
...
@@ -358,7 +358,7 @@ INSERT 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
collect_import
co
left
join
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
co
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816170e8990161f66a272a5fe4'
left
join
`gic_mall`
.
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
co
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816170e8990161f66a272a5fe4'
left
join
`gic3.0`
.
tab_gic_member_less
members_view
on
members_view
.
card_num
=
co
.
card_no
group
by
co
.
card_no
,
co
.
mall_pro_code
;
...
...
@@ -381,8 +381,8 @@ INSERT INTO `tab_gic_mall_shopping_cart_copy` (
,
cart
.
mall_pro_summary_price
,
members_view
.
clique_id
,
members_view
.
clique_member_id
,
1
as
from_erp
from
mall_shoopping_cart
cart
left
join
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
cart
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816170e8990161f66a272a5fe4'
left
join
tab_gic_mall_pro_sku
sku
on
sku
.
mall_pro_sku_code
=
cart
.
mall_sku_code
and
sku
.
enterprise_id
=
'ff8080816170e8990161f66a272a5fe4'
left
join
`gic_mall`
.
tab_gic_mall_pro
pro
on
pro
.
pro_code
=
cart
.
mall_pro_code
and
pro
.
enterprise_id
=
'ff8080816170e8990161f66a272a5fe4'
left
join
`gic_mall`
.
tab_gic_mall_pro_sku
sku
on
sku
.
mall_pro_sku_code
=
cart
.
mall_sku_code
and
sku
.
enterprise_id
=
'ff8080816170e8990161f66a272a5fe4'
left
join
`gic3.0`
.
tab_gic_member_less
members_view
on
members_view
.
card_num
=
cart
.
cardno
group
by
cart
.
cardno
,
cart
.
mall_pro_code
,
cart
.
mall_sku_code
;
...
...
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