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
85924600
Commit
85924600
authored
Nov 17, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utilsChannelPartnerSve
parent
90affc71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
center-channel/app/base/service/impl/utilsSve/utilsChannelPartnerSve.js
+16
-4
No files found.
center-channel/app/base/service/impl/utilsSve/utilsChannelPartnerSve.js
View file @
85924600
...
...
@@ -7,6 +7,7 @@ class UtilsChannelPartnerService extends AppServiceBase {
constructor
()
{
super
();
this
.
opPushQueueUrl
=
settings
.
opPushQueueUrl
();
this
.
signSve
=
system
.
getObject
(
"service.common.signSve"
);
}
/**
* 推送业务信息到渠道合作方
...
...
@@ -19,11 +20,12 @@ class UtilsChannelPartnerService extends AppServiceBase {
if
(
verifyResult
.
status
!=
0
)
{
return
await
this
.
disposePushResultFail
(
pobj
,
verifyResult
,
"deliver->pushBusiness2Channel->verifyResult"
,
this
.
pushlogFailType
.
FQ
);
}
var
actionbody
=
pobj
.
actionBody
;
var
interface_params_info
=
verifyResult
.
data
;
if
(
interface_params_info
.
headData
){
i
f
(
pobj
&&
pobj
.
appInfo
&&
pobj
.
appInfo
.
app_code
){
interface_params_info
.
headData
.
appcode
=
pobj
.
appInfo
.
app_code
;
}
i
nterface_params_info
.
headData
.
appcode
=
pobj
.
appInfo
.
app_code
;
interface_params_info
.
headData
.
sign
=
verifyResult
.
sign
;
interface_params_info
.
headData
.
appkey
=
pobj
.
appInfo
.
uapp_key
;
}
var
reqParams
=
{
actionType
:
"produceData"
,
// Y 功能名称
...
...
@@ -32,7 +34,7 @@ class UtilsChannelPartnerService extends AppServiceBase {
actionType
:
interface_params_info
.
actionType
,
// Y 推送地址接收时的功能名称
notifyUrl
:
interface_params_info
.
notifyUrl
||
""
,
// N 推送成功后通知的Url
identifyCode
:
interface_params_info
.
identifyCode
,
// Y 操作的业务标识
messageBody
:
pobj
.
actionB
ody
,
// Y 推送的业务消息,必须有一项对象属性值
messageBody
:
actionb
ody
,
// Y 推送的业务消息,必须有一项对象属性值
headData
:
interface_params_info
.
headData
//N 请求头信息,Json格式,如:{token:"XXXXXXX"}
},
requestId
:
pobj
.
requestId
||
""
// N 请求id
...
...
@@ -73,7 +75,17 @@ class UtilsChannelPartnerService extends AppServiceBase {
if
(
!
interface_params_info
||
!
interface_params_info
.
pushUrl
||
!
interface_params_info
.
headData
)
{
verify
=
system
.
getResult
(
null
,
"interface_params(pushUrl、headData) can not be empty,100430"
);
}
if
(
!
pobj
||
!
pobj
.
appInfo
||
!
pobj
.
appInfo
.
app_code
){
verify
=
system
.
getResult
(
null
,
"appInfo can not be empty,100450"
);
}
var
signRes
=
await
this
.
signSve
.
createSign
(
pobj
.
actionBody
,
pobj
.
appInfo
.
uapp_secret
);
if
(
signRes
&&
signRes
.
status
==
0
){
verify
.
sign
=
signRes
.
data
;
}
else
{
verify
=
system
.
getResult
(
null
,
"creatSign fail!,100470"
);
}
verify
.
data
=
interface_params_info
;
console
.
log
(
verify
,
"app/base/service/impl/utilsSve/utilsChannelPartnerSve.js____verifyParam___________________"
);
return
verify
;
}
...
...
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