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
1c131b9d
Commit
1c131b9d
authored
Jul 12, 2021
by
任晓松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 同步接口
parent
3550070e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
center-channel/app/base/api/impl/opaction/360tmOrder.js
+3
-0
center-channel/app/base/service/impl/utilsSve/utils360Sve.js
+46
-0
No files found.
center-channel/app/base/api/impl/opaction/360tmOrder.js
View file @
1c131b9d
...
...
@@ -29,6 +29,9 @@ class ProductAPI extends WEBBase {
case
"getParamsFor360"
:
opResult
=
await
this
.
utils360Sve
.
getParamsFor360
(
pobj
,
pobj
.
actionBody
);
break
;
case
"pushTmOrderStatus"
:
opResult
=
await
this
.
utils360Sve
.
pushTmOrderStatus
(
pobj
.
actionBody
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utils360Sve.js
View file @
1c131b9d
...
...
@@ -143,6 +143,52 @@ class utils360Sve extends AppServiceBase {
return
system
.
getResultSuccess
(
result
.
data
);
}
async
pushTmOrderStatus
(
pobj
){
let
token
=
await
this
.
utilsAuthSve
.
get360Token
();
let
url
=
settings
.
pushUrl360
()
+
'api/v1/eshop/GsbOrderUpdate?token='
+
token
.
access_token
;
let
order_id
=
pobj
.
orderNo
;
let
sub_status
=
pobj
.
sub_status
;
let
status
=
pobj
.
status
;
let
pushObj
=
{
order_id
,
status
,
sub_status
:
sub_status
}
let
result
=
await
this
.
restPostUrl
(
pushObj
,
url
);
if
(
result
.
code
==
200
)
{
this
.
pushlogSve
.
createDb
({
op
:
"360-pushTMOrderStatus"
,
content
:
JSON
.
stringify
(
pushObj
),
//推送的参数信息
resultInfo
:
JSON
.
stringify
(
result
),
returnType
:
'1'
,
logLevel
:
1
,
opTitle
:
"推送360信息返回成功"
});
}
else
{
this
.
logCtl
.
error
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"utilsSve/utils360Sve/pushTMOrderStatus"
,
content
:
"error:"
+
result
.
msg
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送操作异常status->pushTMOrderStatus"
,
});
}
console
.
log
(
result
,
'-------------push360-----------------'
)
return
result
;
}
catch
(
e
)
{
this
.
logCtl
.
error
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"utilsSve/utils360Sve/pushTMOrderStatus"
,
content
:
"error:"
+
e
.
stack
,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"推送操作异常status->pushOrderStatus"
,
});
}
}
module
.
exports
=
utils360Sve
;
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