Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
golang-queue-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c8299b78
authored
Feb 05, 2021
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
2dec3371
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
dal/order/orderTrack/order_track.go
dal/order/orderTrack/order_track.go
View file @
c8299b78
...
...
@@ -62,6 +62,7 @@ func InsertData(trackList OrderTrackList) error{
create_time
int64
status_cn
string
ok
bool
currency
int64
)
//开启事务
tx
,
_
:=
db
.
DB
.
Beginx
()
...
...
@@ -74,10 +75,22 @@ func InsertData(trackList OrderTrackList) error{
continue
}
err
=
db
.
DB
.
Get
(
&
currency
,
"SELECT currency FROM lie_order WHERE order_id = ?"
,
orderItems
.
OrderId
)
if
err
!=
nil
{
logger
.
Error
(
"%s"
,
fmt
.
Sprintf
(
"没有找到订单信息 %d"
,
orderItems
.
OrderId
))
continue
}
create_time
=
util
.
ParseTimestrToTimestamp
(
data
.
BIZDATE
,
5
)
if
status_cn
,
ok
=
ORDER_TRACK_STATUS_CN
[
data
.
STATUS
];
!
ok
{
status_cn
=
""
}
if
data
.
STATUS
==
110
&&
currency
==
2
{
status_cn
=
"香港已到货"
data
.
MSG
=
"香港仓库入库验收成功,等待出库通知"
}
sql
:=
" INSERT INTO lie_order_items_tracking (rec_id,order_id,status,fqty,msg,status_cn,create_name,create_time) VALUES(?,?,?,?,?,?,?,?)"
_
,
err
:=
tx
.
Exec
(
sql
,
orderItems
.
RecId
,
orderItems
.
OrderId
,
data
.
STATUS
,
data
.
FQTY
,
data
.
MSG
,
status_cn
,
data
.
CREATOR
,
create_time
)
...
...
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