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
5922ed7f
Commit
5922ed7f
authored
Sep 28, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ali wangwen 2.1-2.4
parent
a0f8192b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
39 deletions
+77
-39
igirl-channel-gateway/app/base/api/impl/action/intentionapi.js
+2
-2
igirl-channel-gateway/app/base/service/impl/common/gatewaypushlogSve.js
+26
-2
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
+48
-34
igirl-channel-gateway/app/config/routes/api.js
+1
-1
No files found.
igirl-channel-gateway/app/base/api/impl/action/intentionapi.js
View file @
5922ed7f
...
...
@@ -57,8 +57,8 @@ class TradetransferAPI extends APIBase {
case
"produceNoticeAliEsp"
:
// 2020 0927 lin 新增 阿里文网文 服务商侧提供接口2.3 服务单通知服务商
opResult
=
await
this
.
utilsNeedSve
.
produceNoticeAliEsp
(
pobj
);
break
;
case
"
needCloseAliEsp"
:
// 2020 0926 lin 新增 阿里文网文 服务商侧提供接口2.2 关闭需求
通知服务商
opResult
=
await
this
.
utilsNeedSve
.
needClose
AliEsp
(
pobj
);
case
"
soulutionFeebackAliEsp"
:
// 2020 0928 lin 新增 阿里文网文 服务商侧提供接口2.4 ⽤户⽅案反馈
通知服务商
opResult
=
await
this
.
utilsNeedSve
.
soulutionFeeback
AliEsp
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
...
...
igirl-channel-gateway/app/base/service/impl/common/gatewaypushlogSve.js
View file @
5922ed7f
...
...
@@ -390,7 +390,7 @@ class GatewaypushlogService extends ServiceBase {
pobj
.
action_type
=
"needCloseAliEsp"
;
var
param
=
{
requestId
:
self
.
getUUID
(),
requestUrl
:
"/ali/esp/intention/
submit
"
,
requestUrl
:
"/ali/esp/intention/
close
"
,
requestjson
:
JSON
.
stringify
(
pobj
),
//请求地址
pushUrl
:
"/action/intentionapi/springBoard"
,
//调用地址
pushActionType
:
"needCloseAliEsp"
,
//调用参数
...
...
@@ -422,7 +422,7 @@ class GatewaypushlogService extends ServiceBase {
pobj
.
action_type
=
"produceNoticeAliEsp"
;
var
param
=
{
requestId
:
self
.
getUUID
(),
requestUrl
:
"/ali/esp/
intention/submit
"
,
requestUrl
:
"/ali/esp/
produce/notice
"
,
requestjson
:
JSON
.
stringify
(
pobj
),
//请求地址
pushUrl
:
"/action/intentionapi/springBoard"
,
//调用地址
pushActionType
:
"produceNoticeAliEsp"
,
//调用参数
...
...
@@ -433,5 +433,28 @@ class GatewaypushlogService extends ServiceBase {
return
self
.
getResultSuccess
(
param
.
requestId
);
}
// 2020 0928 lin 新增 阿里文网文 服务商侧提供接口2.4 ⽤户⽅案反馈通知服务商
async
soulutionFeebackAliEsp
(
pobj
)
{
var
self
=
this
;
if
(
!
pobj
.
solutionBizId
)
{
return
self
.
getResultFail
(
"solutionBizId is empty"
);
}
if
(
!
pobj
.
operateType
)
{
return
self
.
getResultFail
(
"operateType is empty"
);
}
pobj
.
action_type
=
"soulutionFeebackAliEsp"
;
var
param
=
{
requestId
:
self
.
getUUID
(),
requestUrl
:
"/ali/esp/intention/submit"
,
requestjson
:
JSON
.
stringify
(
pobj
),
//请求地址
pushUrl
:
"/action/intentionapi/springBoard"
,
//调用地址
pushActionType
:
"soulutionFeebackAliEsp"
,
//调用参数
pushtimes
:
0
,
//推送次数
pushStatus
:
"wts"
,
//推送状态
}
await
self
.
create
(
param
);
return
self
.
getResultSuccess
(
param
.
requestId
);
}
}
module
.
exports
=
GatewaypushlogService
;
\ No newline at end of file
igirl-channel-gateway/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
5922ed7f
...
...
@@ -506,12 +506,12 @@ class UtilsNeedSve extends AppServiceBase {
}
}
// 2020 092
6 lin 新增 阿里文网文 服务商侧提供接口2.2 关闭需求
通知服务商
// 2020 092
7 lin 新增 阿里文网文 服务商侧提供接口2.3 服务单
通知服务商
async
produceNoticeAliEsp
(
pobj
)
{
var
tokenInfo
=
await
this
.
getCenterToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
{
"requestId"
:
self
.
getUUID
(),
"requestId"
:
this
.
getUUID
(),
"success"
:
true
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
...
...
@@ -519,38 +519,6 @@ class UtilsNeedSve extends AppServiceBase {
}
var
token
=
tokenInfo
.
data
.
token
;
var
userpin
=
""
;
if
(
pobj
.
mobile
)
{
//获取用户userpin
var
userparam
=
{
actionType
:
"getLoginByUserName"
,
actionBody
:
{
"channelUserId"
:
pobj
.
userId
,
"mobile"
:
pobj
.
mobile
,
"userName"
:
pobj
.
userName
?
pobj
.
userName
:
pobj
.
mobile
}
};
var
self
=
this
;
var
url
=
settings
.
centerChannelUrl
()
+
"/api/auth/accessAuth/springBoard"
;
var
userpinResultTmp
=
await
this
.
execlient
.
execPostTK
(
userparam
,
url
,
tokenInfo
.
data
.
token
);
if
(
userpinResultTmp
.
status
!=
0
&&
userpinResultTmp
.
status
!=
2060
)
{
return
{
"requestId"
:
self
.
getUUID
(),
"success"
:
false
,
"errorMsg"
:
"网络错误"
,
"errorCode"
:
"ok"
};
}
userpin
=
userpinResultTmp
.
data
.
userpin
;
if
(
!
userpin
)
{
// return { "message": "网络错误", "data": {}, "code": -102 }
return
{
"requestId"
:
self
.
getUUID
(),
"success"
:
false
,
"errorMsg"
:
"网络错误"
,
"errorCode"
:
"ok"
};
}
}
//带userpin请求
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/edi/springBoard"
;
var
sobj
=
{
...
...
@@ -583,5 +551,51 @@ class UtilsNeedSve extends AppServiceBase {
};
}
}
// 2020 0928 lin 新增 阿里文网文 服务商侧提供接口2.4 ⽤户⽅案反馈通知服务商
async
soulutionFeebackAliEsp
(
pobj
)
{
var
tokenInfo
=
await
this
.
getCenterToken
();
if
(
tokenInfo
.
status
!=
0
)
{
return
{
"requestId"
:
self
.
getUUID
(),
"success"
:
true
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
};
}
var
token
=
tokenInfo
.
data
.
token
;
var
userpin
=
""
;
//带userpin请求
url
=
settings
.
centerChannelUrl
()
+
"/api/opreceive/edi/springBoard"
;
var
sobj
=
{
"actionType"
:
pobj
.
action_type
,
"actionBody"
:
pobj
}
var
rtn
=
rtn
=
await
this
.
execlient
.
execDataPostByTokenUserPin
(
sobj
,
url
,
token
,
userpin
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
{
"requestId"
:
self
.
getUUID
(),
"success"
:
false
,
"errorMsg"
:
"网络错误"
,
"errorCode"
:
"ok"
};
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
if
(
result
.
status
==
0
)
{
return
{
"requestId"
:
result
.
requestId
,
"success"
:
true
,
"errorMsg"
:
""
,
"errorCode"
:
"ok"
};
}
else
{
return
{
"requestId"
:
result
.
requestId
,
"success"
:
false
,
"errorMsg"
:
result
.
msg
,
"errorCode"
:
"ok"
};
}
}
}
module
.
exports
=
UtilsNeedSve
;
igirl-channel-gateway/app/config/routes/api.js
View file @
5922ed7f
...
...
@@ -313,7 +313,7 @@ module.exports = function (app) {
await
logCtl
.
applicationOctetStream2Json
(
req
);
}
var
client_ip
=
system
.
get_client_ip
(
req
);
var
result
=
await
gatewaypushlogSve
.
produceNotice
AliEsp
(
req
.
body
,
client_ip
);
var
result
=
await
gatewaypushlogSve
.
soulutionFeeback
AliEsp
(
req
.
body
,
client_ip
);
logCtl
.
info
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"回调处理订单结果:,method="
+
req
.
body
.
trxcode
,
op
:
"/ali/esp/produce/notice"
,
...
...
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