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
31f2f411
Commit
31f2f411
authored
Jul 25, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
icp gateway
parent
6cee492f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
0 deletions
+71
-0
igirl-channel-gateway/.vscode/launch.json
+18
-0
igirl-channel-gateway/app/base/api/impl/action/intentionapi.js
+3
-0
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
+50
-0
No files found.
igirl-channel-gateway/.vscode/launch.json
0 → 100644
View file @
31f2f411
{
//
使用
IntelliSense
了解相关属性。
//
悬停以查看现有属性的描述。
//
欲了解更多信息,请访问
:
https
:
//go.microsoft.com/fwlink/?linkid=
830387
"version"
:
"0.2.0"
,
"configurations"
:
[
{
"type"
:
"node"
,
"request"
:
"launch"
,
"name"
:
"启动程序"
,
"skipFiles"
:
[
"<node_internals>/**"
],
"program"
:
"${workspaceFolder}/main.js"
}
]
}
\ No newline at end of file
igirl-channel-gateway/app/base/api/impl/action/intentionapi.js
View file @
31f2f411
...
@@ -42,6 +42,9 @@ class TradetransferAPI extends APIBase {
...
@@ -42,6 +42,9 @@ class TradetransferAPI extends APIBase {
case
"paySuccess"
:
//支付回调
case
"paySuccess"
:
//支付回调
opResult
=
await
this
.
utilsNeedSve
.
paySuccess
(
pobj
);
opResult
=
await
this
.
utilsNeedSve
.
paySuccess
(
pobj
);
break
;
break
;
case
"queryOrderState"
:
// 通知状态变更
opResult
=
await
this
.
utilsNeedSve
.
queryOrderState
(
pobj
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
31f2f411
...
@@ -258,5 +258,55 @@ class UtilsNeedSve extends AppServiceBase {
...
@@ -258,5 +258,55 @@ class UtilsNeedSve extends AppServiceBase {
}
}
}
}
async
queryOrderState
(
pobj
)
{
var
self
=
this
;
// 获取app token
var
tokenInfo
=
await
this
.
getCenterToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
{
"requestId"
:
self
.
getUUID
(),
"success"
:
true
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
};
}
var
userpin
=
""
;
var
sobj
=
{
"actionType"
:
"getItemByChannelSolutionNo"
,
"actionBody"
:
pobj
}
//带userpin请求
var
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
var
token
=
tokenInfo
.
data
.
token
;
var
rtn
=
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
// return { "message": "网络错误", "data": {}, "code": -102 }
return
{
"requestId"
:
self
.
getUUID
(),
"success"
:
false
,
"errorMsg"
:
"网络错误"
,
"errorCode"
:
"ok"
};
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
==
0
)
{
// return { "message": "true", "data": {}, "code": 200 }
return
{
"requestId"
:
result
.
requestId
,
"success"
:
true
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
};
}
else
{
// return { "message": result.msg, "data": {}, "code": -102 }
return
{
"requestId"
:
result
.
requestId
,
"success"
:
false
,
"errorMsg"
:
result
.
msg
,
"errorCode"
:
"ok"
};
}
}
}
}
module
.
exports
=
UtilsNeedSve
;
module
.
exports
=
UtilsNeedSve
;
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