Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
848b781d
Commit
848b781d
authored
Apr 22, 2021
by
任晓松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add getOrderIdFrom360
parent
7e44a453
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
center-channel/app/base/api/impl/opaction/order.js
+3
-0
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+23
-0
No files found.
center-channel/app/base/api/impl/opaction/order.js
View file @
848b781d
...
...
@@ -108,6 +108,9 @@ class ProductAPI extends WEBBase {
case
"receiveAliTmOrderRefund"
:
//接收阿里商标订单退款信息
opResult
=
await
this
.
utilsOrderSve
.
receiveAliTmOrderRefund
(
pobj
,
pobj
.
actionBody
);
break
;
case
"getOrderIdFrom360"
:
opResult
=
await
this
.
utilsOrderSve
.
getOrderIdFrom360
(
pobj
,
pobj
.
actionBody
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
848b781d
...
...
@@ -1764,6 +1764,29 @@ class UtilsOrderService extends AppServiceBase {
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
return
result
;
}
/**
* 根据企服通订单号获取360订单号
* @param pobj
* @param actionBody
* @returns {Promise<void>}
*/
async
getOrderIdFrom360
(
pobj
,
actionBody
){
let
rtnt
=
await
this
.
execClient
.
exec360GetToken
(
settings
.
tokenUrl360
())
let
result
=
JSON
.
parse
(
rtnt
.
stdout
);
let
token
=
result
.
access_token
;
let
orderNo
=
actionBody
.
orderNo
let
subData
=
"gsb_order_id="
+
orderNo
+
"&token="
+
token
;
let
url
=
settings
.
pushUrl360
()
+
"api/v1/eshop/GetOrderInfo"
;
let
rtn
=
await
this
.
restClient
.
execGet
(
subData
,
url
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"restGet data is empty"
);
}
let
checkRet
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
checkRet
.
code
!=
200
)
{
return
system
.
getResultFail
(
-
1
,
checkRet
.
msg
)
}
}
}
module
.
exports
=
UtilsOrderService
;
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