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
b4a4aab5
Commit
b4a4aab5
authored
Jan 20, 2022
by
陈思聪
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:商标注册、商标交易商机 阿里双呼接入
parent
3e6ce91c
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 @
b4a4aab5
...
@@ -65,8 +65,10 @@ class UtilsNeedService extends AppServiceBase {
...
@@ -65,8 +65,10 @@ class UtilsNeedService extends AppServiceBase {
pobj
.
actionBody
.
type
=
"ali.edi"
;
pobj
.
actionBody
.
type
=
"ali.edi"
;
pobj
.
actionBody
.
idempotentSource
=
"edi_ali"
;
pobj
.
actionBody
.
idempotentSource
=
"edi_ali"
;
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
"tmjy"
)
{
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
"tmjy"
)
{
// 阿里商标交易
pobj
.
actionBody
.
type
=
"ali.tmd"
;
pobj
.
actionBody
.
type
=
"ali.tmd"
;
pobj
.
actionBody
.
idempotentSource
=
"tmd_ali"
;
pobj
.
actionBody
.
idempotentSource
=
"tmd_ali"
;
pobj
.
actionBody
.
contactsDingtalk
=
pobj
.
actionBody
.
idempotentId
;
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
1
)
{
}
else
if
(
pobj
.
actionBody
.
channel_type_code
==
1
)
{
// 阿里商标交易
// 阿里商标交易
pobj
.
actionBody
.
type
=
"ali.tmd"
;
pobj
.
actionBody
.
type
=
"ali.tmd"
;
...
...
center-channel/app/base/utils/aliyunClient.js
View file @
b4a4aab5
...
@@ -16,7 +16,7 @@ class aliyunClient {
...
@@ -16,7 +16,7 @@ class aliyunClient {
}
}
getAliTMClient
()
{
getAliTMClient
()
{
return
new
RPCClient
({
return
new
RPCClient
({
accessKeyId
:
'LTAI4FmyipY1wuLHjLhMWiPa'
,
accessKeyId
:
'LTAI4FmyipY1wuLHjLhMWiPa'
,
//对应的aliuid 是 1525276744866147
accessKeySecret
:
'hp4FF18IDCSym1prqzxrAjnnhNH3ju'
,
accessKeySecret
:
'hp4FF18IDCSym1prqzxrAjnnhNH3ju'
,
endpoint
:
'https://trademark.aliyuncs.com'
,
endpoint
:
'https://trademark.aliyuncs.com'
,
apiVersion
:
'2018-07-24'
apiVersion
:
'2018-07-24'
...
@@ -97,12 +97,23 @@ class aliyunClient {
...
@@ -97,12 +97,23 @@ class aliyunClient {
//-----------阿里云双呼能力接口接入------start--------chensicong----2022.01.17----------------------
//-----------阿里云双呼能力接口接入------start--------chensicong----2022.01.17----------------------
getAliDoubleCallClient
()
{
// 专家辅助申请(商标注册) 双呼客户端
getAliDoubleCallClientForTMREG
()
{
return
new
RPCClient
({
return
new
RPCClient
({
accessKeyId
:
'LTAI1pJs7KQizBe2'
,
accessKeyId
:
"LTAI1pJs7KQizBe2"
,
//对应的aliuid 是 30039057
accessKeySecret
:
'MMNibebAPqR9AnX5YWHnSL2tHMSIoL'
,
accessKeySecret
:
"MMNibebAPqR9AnX5YWHnSL2tHMSIoL"
,
endpoint
:
"https://companyreg.aliyuncs.com"
,
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 {
...
@@ -111,26 +122,33 @@ class aliyunClient {
let
res
=
null
;
let
res
=
null
;
try
{
try
{
console
.
log
(
`开始调用阿里云-获取可用外呼号码列表接口。参数bizType=
${
bizType
}
`
)
console
.
log
(
`开始调用阿里云-获取可用外呼号码列表接口。参数bizType=
${
bizType
}
`
)
// let reqAliclient = this.getAliDoubleCallClient()
if
(
!
bizType
){
var
client
=
new
RPCClient
({
return
system
.
getResultFail
(
-
200
,
"bizType不能为空"
);
accessKeyId
:
'LTAI1pJs7KQizBe2'
,
}
accessKeySecret
:
'MMNibebAPqR9AnX5YWHnSL2tHMSIoL'
,
endpoint
:
"https://companyreg.aliyuncs.com"
,
let
reqAliclient
=
null
apiVersion
:
'2020-03-06'
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
}
let
obj
=
{
bizType
:
bizType
}
res
=
await
client
.
request
(
"QueryAvailableNumbers"
,
obj
,
{
res
=
await
reqAli
client
.
request
(
"QueryAvailableNumbers"
,
obj
,
{
timeout
:
3000
,
// default 3000 ms
timeout
:
3000
,
// default 3000 ms
formatAction
:
true
,
// default true, format the action to Action
formatAction
:
true
,
// default true, format the action to Action
formatParams
:
true
,
// default true, format the parameter name to first letter upper case
formatParams
:
true
,
// default true, format the parameter name to first letter upper case
method
:
'POST'
,
// set the http method, default is GET
method
:
'POST'
,
// set the http method, default is GET
headers
:
{},
// set the http request headers
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
);
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
){
}
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
));
this
.
execClientNew
.
execLogs
(
`获取可用外呼号码列表失败接口`
,
{
bizType
:
bizType
},
"center-channel-aliyunClient-queryAvailabelNumbers"
,
res
,
JSON
.
stringify
(
e
.
stack
));
return
system
.
getResultFail
(
-
200
,
"api调用出现异常,error:"
+
e
.
stack
);
return
system
.
getResultFail
(
-
200
,
"api调用出现异常,error:"
+
e
.
stack
);
}
}
...
@@ -145,7 +163,19 @@ class aliyunClient {
...
@@ -145,7 +163,19 @@ class aliyunClient {
let
res
=
null
;
let
res
=
null
;
try
{
try
{
console
.
log
(
`开始调用阿里云-发起双呼接口。参数reqbody`
,
reqbody
)
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
,
{
res
=
await
reqAliclient
.
request
(
"StartBackToBackCall"
,
reqbody
,
{
timeout
:
10000
,
// default 3000 ms 2020 0916 lin修改3000为10000,原因ConfirmIcpIntention BizIds 超过5条会超时
timeout
:
10000
,
// default 3000 ms 2020 0916 lin修改3000为10000,原因ConfirmIcpIntention BizIds 超过5条会超时
formatAction
:
true
,
// default true, format the action to Action
formatAction
:
true
,
// default true, format the action to Action
...
@@ -153,13 +183,13 @@ class aliyunClient {
...
@@ -153,13 +183,13 @@ class aliyunClient {
method
:
'POST'
,
// set the http method, default is GET
method
:
'POST'
,
// set the http method, default is GET
headers
:
{},
// set the http request headers
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
);
this
.
execClientNew
.
execLogs
(
`获取可用外呼号码列表成功`
,
reqbody
,
"center-channel-aliyunClient-queryAvailabelNumbers"
,
res
,
null
);
return
system
.
getResultSuccess
(
res
.
data
);
return
system
.
getResultSuccess
(
res
.
Data
||
res
.
data
);
}
catch
(
e
){
}
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
));
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 @
b4a4aab5
...
@@ -28,7 +28,7 @@ module.exports = {
...
@@ -28,7 +28,7 @@ module.exports = {
],
],
apiMustUserpinList
:
[
apiMustUserpinList
:
[
"icpOrderClose"
,
"icpOrderClose"
,
"
submitNeed"
,
"
paySuccess"
,
"icpNotify"
,
"getLoginInfo"
,
"icpNotifyNew"
,
"submitIcpProgramme"
,
"serviceProviderSubmitMaterial"
,
"abolishIcpProgramme"
,
"paySuccess"
,
"icpNotify"
,
"getLoginInfo"
,
"icpNotifyNew"
,
"submitIcpProgramme"
,
"serviceProviderSubmitMaterial"
,
"abolishIcpProgramme"
,
"submitService"
,
"serviceProviderNotification"
,
"submitService"
,
"serviceProviderNotification"
,
"ncSubmitMaterial"
,
"ncNotification"
,
"ncSubmitSolution"
,
"ncCloseNeed"
,
"ncClosePlan"
,
"ncSubmitMaterial"
,
"ncNotification"
,
"ncSubmitSolution"
,
"ncCloseNeed"
,
"ncClosePlan"
,
"rtSubmitMaterial"
,
"rtNotification"
,
"rtSubmitSolution"
,
"rtCloseNeed"
,
"rtClosePlan"
,
"rtSubmitMaterial"
,
"rtNotification"
,
"rtSubmitSolution"
,
"rtCloseNeed"
,
"rtClosePlan"
,
...
...
陈思聪
@scchen
mentioned in commit
72acaf22
Jan 21, 2022
mentioned in commit
72acaf22
mentioned in commit 72acaf2243af5e948e98b8b236c542e0f294cb88
Toggle commit list
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