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
584addcc
Commit
584addcc
authored
Jan 20, 2022
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
065f9b0a
b4a4aab5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
22 deletions
+54
-22
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+2
-0
center-channel/app/base/utils/aliyunClient.js
+51
-21
center-channel/app/config/businessConfig.js
+1
-1
No files found.
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
584addcc
...
...
@@ -65,8 +65,10 @@ class UtilsNeedService extends AppServiceBase {
pobj
.
actionBody
.
type
=
"ali.edi"
;
pobj
.
actionBody
.
idempotentSource
=
"edi_ali"
;
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
"tmjy"
)
{
// 阿里商标交易
pobj
.
actionBody
.
type
=
"ali.tmd"
;
pobj
.
actionBody
.
idempotentSource
=
"tmd_ali"
;
pobj
.
actionBody
.
contactsDingtalk
=
pobj
.
actionBody
.
idempotentId
;
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
1
)
{
// 阿里商标交易
pobj
.
actionBody
.
type
=
"ali.tmd"
;
...
...
center-channel/app/base/utils/aliyunClient.js
View file @
584addcc
...
...
@@ -16,7 +16,7 @@ class aliyunClient {
}
getAliTMClient
()
{
return
new
RPCClient
({
accessKeyId
:
'LTAI4FmyipY1wuLHjLhMWiPa'
,
accessKeyId
:
'LTAI4FmyipY1wuLHjLhMWiPa'
,
//对应的aliuid 是 1525276744866147
accessKeySecret
:
'hp4FF18IDCSym1prqzxrAjnnhNH3ju'
,
endpoint
:
'https://trademark.aliyuncs.com'
,
apiVersion
:
'2018-07-24'
...
...
@@ -97,12 +97,23 @@ class aliyunClient {
//-----------阿里云双呼能力接口接入------start--------chensicong----2022.01.17----------------------
getAliDoubleCallClient
()
{
// 专家辅助申请(商标注册) 双呼客户端
getAliDoubleCallClientForTMREG
()
{
return
new
RPCClient
({
accessKeyId
:
'LTAI1pJs7KQizBe2'
,
accessKeySecret
:
'MMNibebAPqR9AnX5YWHnSL2tHMSIoL'
,
accessKeyId
:
"LTAI1pJs7KQizBe2"
,
//对应的aliuid 是 30039057
accessKeySecret
:
"MMNibebAPqR9AnX5YWHnSL2tHMSIoL"
,
endpoint
:
"https://companyreg.aliyuncs.com"
,
apiVersion
:
'2020-03-06'
apiVersion
:
"2020-03-06"
});
}
// 商标交易(商标优选) 双呼客户端
getAliDoubleCallClientForTMTRADE
()
{
return
new
RPCClient
({
accessKeyId
:
'LTAI4FmyipY1wuLHjLhMWiPa'
,
// 对应的aliuid 是 1525276744866147
accessKeySecret
:
'hp4FF18IDCSym1prqzxrAjnnhNH3ju'
,
endpoint
:
"https://companyreg.aliyuncs.com"
,
apiVersion
:
"2020-03-06"
});
}
...
...
@@ -111,26 +122,33 @@ class aliyunClient {
let
res
=
null
;
try
{
console
.
log
(
`开始调用阿里云-获取可用外呼号码列表接口。参数bizType=
${
bizType
}
`
)
// let reqAliclient = this.getAliDoubleCallClient()
var
client
=
new
RPCClient
({
accessKeyId
:
'LTAI1pJs7KQizBe2'
,
accessKeySecret
:
'MMNibebAPqR9AnX5YWHnSL2tHMSIoL'
,
endpoint
:
"https://companyreg.aliyuncs.com"
,
apiVersion
:
'2020-03-06'
});
if
(
!
bizType
){
return
system
.
getResultFail
(
-
200
,
"bizType不能为空"
);
}
let
reqAliclient
=
null
if
(
bizType
==
'TM_TRADE'
){
reqAliclient
=
this
.
getAliDoubleCallClientForTMTRADE
();
}
else
if
(
bizType
==
'EXPERT_APPLY'
){
reqAliclient
=
this
.
getAliDoubleCallClientForTMREG
();
}
else
{
return
system
.
getResultFail
(
-
200
,
`不支持的bizType=
${
bizType
}
`
);
}
let
obj
=
{
bizType
:
bizType
}
res
=
await
client
.
request
(
"QueryAvailableNumbers"
,
obj
,
{
res
=
await
reqAli
client
.
request
(
"QueryAvailableNumbers"
,
obj
,
{
timeout
:
3000
,
// default 3000 ms
formatAction
:
true
,
// default true, format the action to Action
formatParams
:
true
,
// default true, format the parameter name to first letter upper case
method
:
'POST'
,
// set the http method, default is GET
headers
:
{},
// set the http request headers
});
console
.
log
(
`结束调用阿里云-获取可用外呼号码列表接口。参数bizType=
${
bizType
}
,结果=
${
res
}
`
)
console
.
log
(
`结束调用阿里云-获取可用外呼号码列表接口。参数bizType=
${
bizType
}
,结果=
${
JSON
.
stringify
(
res
)
}
`
)
this
.
execClientNew
.
execLogs
(
`获取可用外呼号码列表成功`
,
{
bizType
:
bizType
},
"center-channel-aliyunClient-queryAvailabelNumbers"
,
res
,
null
);
return
system
.
getResultSuccess
(
res
.
data
);
return
system
.
getResultSuccess
(
res
.
Data
||
res
.
data
);
}
catch
(
e
){
console
.
log
(
`调用异常:阿里云-获取可用外呼号码列表接口。参数bizType=
${
bizType
}
,结果=
${
res
}
,异常信息=
${
e
.
stack
}
`
)
console
.
log
(
`调用异常:阿里云-获取可用外呼号码列表接口。参数bizType=
${
bizType
}
,结果=
${
JSON
.
stringify
(
res
)
}
,异常信息=
${
e
.
stack
}
`
)
this
.
execClientNew
.
execLogs
(
`获取可用外呼号码列表失败接口`
,
{
bizType
:
bizType
},
"center-channel-aliyunClient-queryAvailabelNumbers"
,
res
,
JSON
.
stringify
(
e
.
stack
));
return
system
.
getResultFail
(
-
200
,
"api调用出现异常,error:"
+
e
.
stack
);
}
...
...
@@ -145,7 +163,19 @@ class aliyunClient {
let
res
=
null
;
try
{
console
.
log
(
`开始调用阿里云-发起双呼接口。参数reqbody`
,
reqbody
)
let
reqAliclient
=
this
.
getAliDoubleCallClient
()
if
(
!
reqbody
.
bizType
){
return
system
.
getResultFail
(
-
200
,
"bizType不能为空"
);
}
let
reqAliclient
=
null
if
(
reqbody
.
bizType
==
'TM_TRADE'
){
reqAliclient
=
this
.
getAliDoubleCallClientForTMTRADE
();
}
else
if
(
reqbody
.
bizType
==
'EXPERT_APPLY'
){
reqAliclient
=
this
.
getAliDoubleCallClientForTMREG
();
}
else
{
return
system
.
getResultFail
(
-
200
,
`不支持的bizType=
${
reqbody
.
bizType
}
`
);
}
res
=
await
reqAliclient
.
request
(
"StartBackToBackCall"
,
reqbody
,
{
timeout
:
10000
,
// default 3000 ms 2020 0916 lin修改3000为10000,原因ConfirmIcpIntention BizIds 超过5条会超时
formatAction
:
true
,
// default true, format the action to Action
...
...
@@ -153,13 +183,13 @@ class aliyunClient {
method
:
'POST'
,
// set the http method, default is GET
headers
:
{},
// set the http request headers
});
console
.
log
(
`结束调用阿里云-发起双呼接口。参数reqbody=`
,
reqbody
,
'结果='
,
res
)
console
.
log
(
`结束调用阿里云-发起双呼接口。参数reqbody=`
,
reqbody
,
'结果='
,
JSON
.
stringify
(
res
)
)
this
.
execClientNew
.
execLogs
(
`获取可用外呼号码列表成功`
,
reqbody
,
"center-channel-aliyunClient-queryAvailabelNumbers"
,
res
,
null
);
return
system
.
getResultSuccess
(
res
.
data
);
return
system
.
getResultSuccess
(
res
.
Data
||
res
.
data
);
}
catch
(
e
){
console
.
log
(
`调用异常:阿里云-发起双呼接口。参数reqbody=`
,
reqbody
,
'结果='
,
res
,
`异常信息=
${
e
.
stack
}
`
)
console
.
log
(
`调用异常:阿里云-发起双呼接口。参数reqbody=`
,
reqbody
,
'结果='
,
JSON
.
stringify
(
res
)
,
`异常信息=
${
e
.
stack
}
`
)
this
.
execClientNew
.
execLogs
(
`调用阿里云发起双呼接口失败`
,
reqbody
,
"center-channel-aliyunClient-startBackToBackCall"
,
res
,
JSON
.
stringify
(
e
.
stack
));
return
system
.
getResultFail
(
-
200
,
"api调用出现异常,error:"
+
e
.
stack
);
return
system
.
getResultFail
(
-
200
,
"api调用出现异常,error:"
+
JSON
.
stringify
(
e
.
data
)
);
}
}
...
...
center-channel/app/config/businessConfig.js
View file @
584addcc
...
...
@@ -28,7 +28,7 @@ module.exports = {
],
apiMustUserpinList
:
[
"icpOrderClose"
,
"
submitNeed"
,
"
paySuccess"
,
"icpNotify"
,
"getLoginInfo"
,
"icpNotifyNew"
,
"submitIcpProgramme"
,
"serviceProviderSubmitMaterial"
,
"abolishIcpProgramme"
,
"paySuccess"
,
"icpNotify"
,
"getLoginInfo"
,
"icpNotifyNew"
,
"submitIcpProgramme"
,
"serviceProviderSubmitMaterial"
,
"abolishIcpProgramme"
,
"submitService"
,
"serviceProviderNotification"
,
"ncSubmitMaterial"
,
"ncNotification"
,
"ncSubmitSolution"
,
"ncCloseNeed"
,
"ncClosePlan"
,
"rtSubmitMaterial"
,
"rtNotification"
,
"rtSubmitSolution"
,
"rtCloseNeed"
,
"rtClosePlan"
,
...
...
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