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
e3fda442
Commit
e3fda442
authored
Jan 25, 2019
by
蘑菇🍄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
671c48a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
合并清理.sql
jnby-samo/合并清理.sql
+12
-12
数据组装pro.sql
jnby-samo/数据组装pro.sql
+3
-2
No files found.
jnby-samo/合并清理.sql
View file @
e3fda442
...
...
@@ -24,17 +24,17 @@ DELETE FROM `gic3.0`.tab_gic_member_address WHERE from_erp = 1 and enterpri
-- 数据合并
insert
into
tab_gic_mall_order
select
*
from
`order_import_CROQUIS`
.
tab_gic_mall_order_copy
;
insert
into
tab_gic_mall_order_item
select
*
from
`order_import_CROQUIS`
.
tab_gic_mall_order_item_copy
;
insert
into
tab_gic_mall_order_logistics
select
*
from
`order_import_CROQUIS`
.
tab_gic_mall_order_logistics_copy
;
insert
into
tab_gic_mall_order_process
select
*
from
`order_import_CROQUIS`
.
tab_gic_mall_order_process_copy
;
insert
into
tab_gic_mall_order_refund_consult
select
*
from
`order_import_CROQUIS`
.
tab_gic_mall_order_refund_consult_copy
;
insert
into
tab_gic_mall_order_refund
select
*
from
`order_import_CROQUIS`
.
tab_gic_mall_order_refund_copy
;
insert
into
tab_gic_mall_order_refund_logistics
select
*
from
`order_import_CROQUIS`
.
tab_gic_mall_order_refund_logistics_copy
;
insert
into
tab_gic_mall_collection
select
*
from
`order_import_CROQUIS`
.
tab_gic_mall_collection_copy
;
insert
into
tab_gic_mall_evaluate
select
*
from
`order_import_CROQUIS`
.
tab_gic_mall_evaluate_copy
;
insert
into
tab_gic_mall_order_batch_deliver_log
select
*
from
`order_import_CROQUIS`
.
tab_gic_mall_order_batch_deliver_log_copy
;
insert
into
tab_gic_mall_shopping_cart
select
*
from
`order_import_CROQUIS`
.
tab_gic_mall_shopping_cart_copy
;
insert
into
tab_gic_mall_order
select
*
from
tab_gic_mall_order_copy
;
insert
into
tab_gic_mall_order_item
select
*
from
tab_gic_mall_order_item_copy
;
insert
into
tab_gic_mall_order_logistics
select
*
from
tab_gic_mall_order_logistics_copy
;
insert
into
tab_gic_mall_order_process
select
*
from
tab_gic_mall_order_process_copy
;
insert
into
tab_gic_mall_order_refund_consult
select
*
from
tab_gic_mall_order_refund_consult_copy
;
insert
into
tab_gic_mall_order_refund
select
*
from
tab_gic_mall_order_refund_copy
;
insert
into
tab_gic_mall_order_refund_logistics
select
*
from
tab_gic_mall_order_refund_logistics_copy
;
insert
into
tab_gic_mall_collection
select
*
from
tab_gic_mall_collection_copy
;
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
=
'ff80808164f65d9501651798e0f8143d'
;
...
...
jnby-samo/数据组装pro.sql
View file @
e3fda442
...
...
@@ -18,7 +18,7 @@ truncate table tab_gic_mall_shopping_cart_copy;
-- 数据填充,订单地址所在区域
update
`order_tmp_import`
.
order_import
A
inner
join
(
select
county_id
,
full_name
from
`gic3.0`
.
tab_gic_county
)
c
on
on
(
locate
(
A
.
province_name
,
c
.
full_name
)
>
0
and
locate
(
A
.
city_name
,
c
.
full_name
)
>
0
and
locate
(
A
.
area_name
,
c
.
full_name
)
>
0
)
set
A
.
area_id
=
c
.
county_id
;
...
...
@@ -59,6 +59,7 @@ update `order_tmp_import`.order_import A inner join(select county_id,full_name f
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_sms
s
on
s
.
phone_number
=
addr
.
buyer_moile
WHERE
s
.
enterprise_id
=
'ff80808164f65d9501651798e0f8143d'
and
addr
.
enterprise_id
=
'ff80808164f65d9501651798e0f8143d'
GROUP
BY
addr
.
member_number
,
addr
.
address
;
...
...
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