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
681163dd
Commit
681163dd
authored
Jul 29, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wdy
parent
912781ca
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
114 additions
and
138 deletions
+114
-138
igirl-channel-gateway/app/base/api/impl/action/intentionapi.js
+3
-0
igirl-channel-gateway/app/base/service/impl/common/gatewaypushlogSve.js
+105
-5
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
+4
-1
igirl-channel-gateway/app/config/routes/api.js
+0
-130
igirl-channel-gateway/app/config/settings.js
+2
-2
No files found.
igirl-channel-gateway/app/base/api/impl/action/intentionapi.js
View file @
681163dd
...
@@ -39,6 +39,9 @@ class TradetransferAPI extends APIBase {
...
@@ -39,6 +39,9 @@ class TradetransferAPI extends APIBase {
case
"receiveFeedback"
:
//接收方案反馈信息
case
"receiveFeedback"
:
//接收方案反馈信息
opResult
=
await
this
.
utilsNeedSve
.
reqcenterchannel
(
pobj
);
opResult
=
await
this
.
utilsNeedSve
.
reqcenterchannel
(
pobj
);
break
;
break
;
case
"icpFeedbackSubmit"
:
//接收方案反馈信息
opResult
=
await
this
.
utilsNeedSve
.
reqcenterchannel
(
pobj
);
break
;
case
"paySuccess"
:
//支付回调
case
"paySuccess"
:
//支付回调
opResult
=
await
this
.
utilsNeedSve
.
paySuccess
(
pobj
);
opResult
=
await
this
.
utilsNeedSve
.
paySuccess
(
pobj
);
break
;
break
;
...
...
igirl-channel-gateway/app/base/service/impl/common/gatewaypushlogSve.js
View file @
681163dd
...
@@ -174,11 +174,109 @@ class GatewaypushlogService extends ServiceBase {
...
@@ -174,11 +174,109 @@ class GatewaypushlogService extends ServiceBase {
}
}
pobj
.
type
=
pobj
.
consultType
;
pobj
.
type
=
pobj
.
consultType
;
pobj
.
mobile
=
pobj
.
phone
;
pobj
.
mobile
=
pobj
.
phone
;
pobj
.
action_type
=
"submitNeed"
;
if
(
pobj
.
area
)
{
// switch (action_type) {
// case "1":
// pobj.area = "";
// break;
// case "2":
// pobj.area = "";
// break;
// case "3":
// pobj.area = "";
// break;
// case "4":
// pobj.area = "";
// break;
// case "5":
// pobj.area = "";
// break;
// case "6":
// pobj.area = "";
// break;
// case "7":
// pobj.area = "";
// break;
// case "8":
// pobj.area = "";
// break;
// case "9":
// pobj.area = "";
// break;
// case "10":
// pobj.area = "";
// break;
// case "11":
// pobj.area = "";
// break;
// case "12":
// pobj.area = "";
// break;
// case "13":
// pobj.area = "";
// break;
// case "14":
// pobj.area = "";
// break;
// case "15":
// pobj.area = "";
// break;
// case "16":
// pobj.area = "";
// break;
// case "17":
// pobj.area = "";
// break;
// case "18":
// pobj.area = "";
// break;
// case "19":
// pobj.area = "";
// break;
// case "20":
// pobj.area = "";
// break;
// case "21":
// pobj.area = "";
// break;
// case "22":
// pobj.area = "";
// break;
// case "23":
// pobj.area = "";
// break;
// case "24":
// pobj.area = "";
// break;
// case "25":
// pobj.area = "";
// break;
// case "26":
// pobj.area = "";
// break;
// case "27":
// pobj.area = "";
// break;
// case "28":
// pobj.area = "";
// break;
// case "29":
// pobj.area = "";
// break;
// case "30":
// pobj.area = "";
// break;
// default:
// opResult = system.getResult(null, "action_type参数错误");
// break;
}
var
param
=
{
var
param
=
{
requestId
:
self
.
getUUID
(),
requestId
:
self
.
getUUID
(),
requestUrl
:
"/api/ali/tm/consultation/submit"
,
requestUrl
:
"/api/ali/tm/consultation/submit"
,
requestjson
:
JSON
.
stringify
(
pobj
),
//请求地址
requestjson
:
JSON
.
stringify
(
pobj
),
//请求地址
pushUrl
:
"/action/intentionapi/queryOrderState
"
,
//调用地址
pushUrl
:
"/action/intentionapi/springBoard
"
,
//调用地址
pushActionType
:
"submitNeed"
,
//调用参数
pushActionType
:
"submitNeed"
,
//调用参数
pushtimes
:
0
,
//推送次数
pushtimes
:
0
,
//推送次数
pushStatus
:
"wts"
,
//推送状态
pushStatus
:
"wts"
,
//推送状态
...
@@ -203,7 +301,7 @@ class GatewaypushlogService extends ServiceBase {
...
@@ -203,7 +301,7 @@ class GatewaypushlogService extends ServiceBase {
requestId
:
self
.
getUUID
(),
requestId
:
self
.
getUUID
(),
requestUrl
:
"/api/ali/tm/feedback/submit"
,
requestUrl
:
"/api/ali/tm/feedback/submit"
,
requestjson
:
JSON
.
stringify
(
pobj
),
//请求地址
requestjson
:
JSON
.
stringify
(
pobj
),
//请求地址
pushUrl
:
"/action/intentionapi/queryOrderState
"
,
//调用地址
pushUrl
:
"/action/intentionapi/springBoard
"
,
//调用地址
pushActionType
:
"icpFeedbackSubmit"
,
//调用参数
pushActionType
:
"icpFeedbackSubmit"
,
//调用参数
pushtimes
:
0
,
//推送次数
pushtimes
:
0
,
//推送次数
pushStatus
:
"wts"
,
//推送状态
pushStatus
:
"wts"
,
//推送状态
...
@@ -221,11 +319,12 @@ class GatewaypushlogService extends ServiceBase {
...
@@ -221,11 +319,12 @@ class GatewaypushlogService extends ServiceBase {
if
(
!
pobj
.
status
)
{
if
(
!
pobj
.
status
)
{
return
self
.
getResultFail
(
"status不能为空"
);
return
self
.
getResultFail
(
"status不能为空"
);
}
}
pobj
.
action_type
=
"queryOrderState"
;
var
param
=
{
var
param
=
{
requestId
:
self
.
getUUID
(),
requestId
:
self
.
getUUID
(),
requestUrl
:
"/api/ali/tm/feedback/submit
"
,
requestUrl
:
"/api/ali/tm/status/notify
"
,
requestjson
:
JSON
.
stringify
(
pobj
),
//请求地址
requestjson
:
JSON
.
stringify
(
pobj
),
//请求地址
pushUrl
:
"/action/intentionapi/queryOrderState
"
,
//调用地址
pushUrl
:
"/action/intentionapi/springBoard
"
,
//调用地址
pushActionType
:
"icpNotify"
,
//调用参数
pushActionType
:
"icpNotify"
,
//调用参数
pushtimes
:
0
,
//推送次数
pushtimes
:
0
,
//推送次数
pushStatus
:
"wts"
,
//推送状态
pushStatus
:
"wts"
,
//推送状态
...
@@ -235,5 +334,5 @@ class GatewaypushlogService extends ServiceBase {
...
@@ -235,5 +334,5 @@ class GatewaypushlogService extends ServiceBase {
}
}
}
}
module
.
exports
=
GatewaypushlogService
;
module
.
exports
=
GatewaypushlogService
;
\ No newline at end of file
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
681163dd
...
@@ -84,6 +84,7 @@ class UtilsNeedSve extends AppServiceBase {
...
@@ -84,6 +84,7 @@ class UtilsNeedSve extends AppServiceBase {
if
(
!
userpin
)
{
if
(
!
userpin
)
{
return
system
.
getResultFail
(
-
88
,
"获取userpin失败!!"
);
return
system
.
getResultFail
(
-
88
,
"获取userpin失败!!"
);
}
}
}
}
//带userpin请求
//带userpin请求
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/need/springBoard"
;
...
@@ -312,11 +313,13 @@ class UtilsNeedSve extends AppServiceBase {
...
@@ -312,11 +313,13 @@ class UtilsNeedSve extends AppServiceBase {
pobj
.
publishMobile
=
result
.
data
.
publishMobile
;
pobj
.
publishMobile
=
result
.
data
.
publishMobile
;
pobj
.
channelNeedNo
=
result
.
data
.
channelNeedNo
;
pobj
.
channelNeedNo
=
result
.
data
.
channelNeedNo
;
pobj
.
needNo
=
result
.
data
.
needNo
;
pobj
.
needNo
=
result
.
data
.
needNo
;
pobj
.
channelTypeCode
=
result
.
data
.
channelTypeCode
;
pobj
.
province
=
result
.
data
.
province
;
var
sobj
=
{
var
sobj
=
{
"actionType"
:
"icpNotify"
,
"actionType"
:
"icpNotify"
,
"actionBody"
:
pobj
"actionBody"
:
pobj
}
}
var
r
esult
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpinResultTmp
.
data
.
userpin
);
var
r
tn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpinResultTmp
.
data
.
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
{
return
{
"requestId"
:
self
.
getUUID
(),
"requestId"
:
self
.
getUUID
(),
...
...
igirl-channel-gateway/app/config/routes/api.js
View file @
681163dd
...
@@ -136,136 +136,6 @@ module.exports = function (app) {
...
@@ -136,136 +136,6 @@ module.exports = function (app) {
});
});
// //test
// app.use('/api/alitest/esp/intention/submit', async function (req, res) {
// try {
// console.log(req.headers['content-type'])
// if (req.headers['content-type'].indexOf('application/octet-stream')>-1 ) {
// await logCtl.applicationOctetStream2Json(req);
// }
// var client_ip = system.get_client_ip(req);
// req.body.action_type = "submitNeed";
// 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: "api/ali/esp/intention/submit",
// content: "回调参数:" + JSON.stringify(req.body) + "回调处理订单结果:" + JSON.stringify(result),
// 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,
// op: "/api/ali/esp/intention/submit",
// content: "回调参数:" + JSON.stringify(req.body) + "error:" + error.stack,
// clientIp: client_ip || ""
// });
// return JSON.stringify(result);
// }
// });
// app.use('/api/alitest/esp/intention/solution/feedback', async function (req, res) {
// try {
// if (req.headers['content-type'].indexOf('application/octet-stream')>-1 ) {
// await logCtl.applicationOctetStream2Json(req);
// }
// var client_ip = system.get_client_ip(req);
// req.body.action_type = "receiveFeedback";
// 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: "/api/ali/esp/intention/solution/feedback",
// content: "回调参数:" + JSON.stringify(req.body) + "回调处理订单结果:" + JSON.stringify(result),
// 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,
// op: "/api/ali/esp/intention/solution/feedback",
// content: "回调参数:" + JSON.stringify(req.body) + "error:" + error.stack,
// clientIp: client_ip || ""
// });
// }
// });
// app.use('/api/alitest/ic/paySuccess', async function (req, res) {
// try {
// if (req.headers['content-type'].indexOf('application/octet-stream')>-1 ) {
// await logCtl.applicationOctetStream2Json(req);
// }
// var client_ip = system.get_client_ip(req);
// req.body.action_type = "paySuccess";
// var result = await utilsNeedSve.paySuccess(req.body, client_ip);
// logCtl.info({
// optitle: (new Date()).Format("yyyy-MM-dd hh:mm:ss") + "回调处理订单结果:,method=" + req.body.trxcode,
// op: "/api/ali/ic/paySuccess",
// content: "回调参数:" + JSON.stringify(req.body) + "回调处理订单结果:" + JSON.stringify(result),
// 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,
// op: "/api/ali/ic/paySuccess",
// content: "回调参数:" + JSON.stringify(req.body) + "error:" + error.stack,
// clientIp: client_ip || ""
// });
// }
// });
// app.use('/api/alitest/ic/close', async function (req, res) {
// try {
// if (req.headers['content-type'].indexOf('application/octet-stream')>-1 ) {
// await logCtl.applicationOctetStream2Json(req);
// }
// var client_ip = system.get_client_ip(req);
// req.body.action_type = "orderClose";
// var result = await utilsNeedSve.orderClose(req.body, client_ip);
// logCtl.info({
// optitle: (new Date()).Format("yyyy-MM-dd hh:mm:ss") + "回调处理订单结果:,method=" + req.body.trxcode,
// op: "/api/ali/ic/close",
// content: "回调参数:" + JSON.stringify(req.body) + "回调处理订单结果:" + JSON.stringify(result),
// 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,
// op: "/api/ali/ic/close",
// content: "回调参数:" + JSON.stringify(req.body) + "error:" + error.stack,
// clientIp: client_ip || ""
// });
// }
// });
// app.use('/api/alitest/esp/intention/close', async function (req, res) {
// try {
// if (req.headers['content-type'].indexOf('application/octet-stream')>-1 ) {
// await logCtl.applicationOctetStream2Json(req);
// }
// var client_ip = system.get_client_ip(req);
// req.body.action_type = "needClose";
// 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: "/api/ali/esp/intention/close",
// content: "回调参数:" + JSON.stringify(req.body) + "回调处理订单结果:" + JSON.stringify(result),
// 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,
// op: "/api/ali/esp/intention/close",
// content: "回调参数:" + JSON.stringify(req.body) + "error:" + error.stack,
// clientIp: client_ip || ""
// });
// }
// });
app
.
use
(
'/api/ali/tm/consultation/submit'
,
async
function
(
req
,
res
)
{
app
.
use
(
'/api/ali/tm/consultation/submit'
,
async
function
(
req
,
res
)
{
try
{
try
{
console
.
log
(
req
.
headers
[
'content-type'
])
console
.
log
(
req
.
headers
[
'content-type'
])
...
...
igirl-channel-gateway/app/config/settings.js
View file @
681163dd
...
@@ -33,14 +33,14 @@ var settings = {
...
@@ -33,14 +33,14 @@ var settings = {
},
},
channelApiUrl
:
function
()
{
//----igirl-channel
channelApiUrl
:
function
()
{
//----igirl-channel
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
return
"http://
gsb.qifu.gongsibao.com
:4003"
;
return
"http://
192.168.210.192
:4003"
;
}
else
{
}
else
{
return
"http://zc-channel-service"
;
return
"http://zc-channel-service"
;
}
}
},
},
centerChannelUrl
:
function
()
{
//---------center-channel
centerChannelUrl
:
function
()
{
//---------center-channel
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
return
"http://gsb
.qifu.gongsibao.com:4012
"
;
//localsettings.reqEsDevUrl;
return
"http://gsb
web.qifu-dev.gongsibao.com
"
;
//localsettings.reqEsDevUrl;
}
else
{
}
else
{
return
"http://center-channel-service"
;
return
"http://center-channel-service"
;
}
}
...
...
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