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
9a760aaf
Commit
9a760aaf
authored
Mar 18, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wdy
parent
57c68b17
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
+14
-2
igirl-channel-gateway/app/config/routes/api.js
+4
-2
No files found.
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
9a760aaf
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
AppServiceBase
=
require
(
"../../app.base"
);
const
uuidv4
=
require
(
'uuid/v4'
);
const
logCtl
=
system
.
getObject
(
"service.common.oplogSve"
);
//商标查询操作
class
UtilsNeedSve
extends
AppServiceBase
{
...
...
@@ -32,10 +33,15 @@ class UtilsNeedSve extends AppServiceBase {
return
tokenResult
;
}
getUUID
()
{
var
uuid
=
uuidv4
();
var
u
=
uuid
.
replace
(
/
\-
/g
,
""
);
return
u
;
}
async
reqcenterchannel
(
pobj
)
{
var
sobj
=
{
"actionProcess"
:
"ali"
,
"actionProcess"
:
"ali"
,
"actionType"
:
pobj
.
action_type
,
"isUser"
:
"yes"
,
"actionBody"
:
pobj
...
...
@@ -43,7 +49,13 @@ class UtilsNeedSve extends AppServiceBase {
var
tokenInfo
=
await
this
.
getToken
();
var
url
=
settings
.
centerChannelUrl
()
+
"web/opreceive/need/springBoard"
;
var
rtn
=
await
this
.
execlient
.
execPostTK
(
sobj
,
url
,
tokenInfo
.
data
.
token
);
return
rtn
;
var
self
=
this
;
return
{
"requestId"
:
self
.
getUUID
(),
"success"
:
true
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
};
}
}
...
...
igirl-channel-gateway/app/config/routes/api.js
View file @
9a760aaf
...
...
@@ -31,6 +31,7 @@ module.exports = function (app) {
clientIp
:
client_ip
||
""
});
res
.
end
(
JSON
.
stringify
(
result
));
return
JSON
.
stringify
(
result
);
}
catch
(
error
)
{
logCtl
.
error
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"记录回调处理结果异常:,method="
+
req
.
body
.
trxcode
,
...
...
@@ -38,6 +39,7 @@ module.exports = function (app) {
content
:
"回调参数:"
+
JSON
.
stringify
(
req
.
body
)
+
"error:"
+
error
.
stack
,
clientIp
:
client_ip
||
""
});
return
JSON
.
stringify
(
result
);
}
});
app
.
use
(
'/api/ali/esp/intention/solution/feedback'
,
async
function
(
req
,
res
)
{
...
...
@@ -85,8 +87,8 @@ module.exports = function (app) {
app
.
use
(
'/api/ali/esp/intention/close'
,
async
function
(
req
,
res
)
{
try
{
var
client_ip
=
system
.
get_client_ip
(
req
);
req
.
body
.
action_type
=
"
solution
Close"
;
var
result
=
await
utilsNeedSve
.
opBackNotify
(
req
.
body
,
client_ip
);
req
.
body
.
action_type
=
"
need
Close"
;
var
result
=
await
utilsNeedSve
.
reqcenterchannel
(
req
.
body
,
client_ip
);
logCtl
.
info
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"回调处理订单结果:,method="
+
req
.
body
.
trxcode
,
op
:
"center-channel/tlpay/opBackNotify"
,
...
...
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