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
a855b85a
Commit
a855b85a
authored
Apr 14, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
97af5cb9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
170 additions
and
116 deletions
+170
-116
center-channel/app/base/api/impl/opaction/opOrder.js
+16
-10
center-channel/app/base/service/app.base.js
+22
-10
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+6
-6
center-channel/app/base/service/impl/utilsSve/utilsTmAliyunSve.js
+117
-85
center-channel/app/base/utils/aliyunClient.js
+2
-0
center-channel/app/config/routes/api.js
+2
-2
center-channel/提示编码使用
+5
-3
No files found.
center-channel/app/base/api/impl/opaction/opOrder.js
View file @
a855b85a
...
@@ -6,6 +6,7 @@ class ProductAPI extends WEBBase {
...
@@ -6,6 +6,7 @@ class ProductAPI extends WEBBase {
super
();
super
();
this
.
utilsOpOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOpOrderSve"
);
this
.
utilsOpOrderSve
=
system
.
getObject
(
"service.utilsSve.utilsOpOrderSve"
);
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
this
.
utilsPushSve
=
system
.
getObject
(
"service.utilsSve.utilsPushSve"
);
this
.
utilsTmAliyunSve
=
system
.
getObject
(
"service.utilsSve.utilsTmAliyunSve"
);
}
}
/**
/**
* 接口跳转-POST请求
* 接口跳转-POST请求
...
@@ -27,20 +28,25 @@ class ProductAPI extends WEBBase {
...
@@ -27,20 +28,25 @@ class ProductAPI extends WEBBase {
pobj
.
requestId
=
req
.
requestId
;
pobj
.
requestId
=
req
.
requestId
;
var
opResult
=
null
;
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
case
"
closeAliTrademarkApplication"
:
//关闭阿里自主申请actionBody:{product_id:产品id,parentCode:商标申请实例id
}
case
"
opAliDingInterfaceManage"
:
//操作阿里钉钉接口管理---actionBody:{为阿里需要的参数
}
var
pushInterfaceResult
=
await
this
.
utilsOpOrderSve
.
getProductInterface
(
pobj
,
pobj
.
actionBody
.
product_id
);
var
pushInterfaceResult
=
await
this
.
utilsOpOrderSve
.
getProductInterface
(
pobj
.
appInfo
,
pobj
.
product_id
);
if
(
pushInterfaceResult
.
status
!=
0
)
{
if
(
pushInterfaceResult
.
status
!=
0
)
{
pobj
.
actionBody
.
product_info
.
interface_info
=
pushInterfaceResult
.
data
;
return
pushInterfaceResult
;
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
"closeAliTmApply"
,
1
);
}
}
break
;
var
interface_list_temp
=
pushInterfaceResult
.
data
.
filter
(
f
=>
f
.
op_type
==
"createAliTmApply"
)
case
"checkTmNameByAli"
:
//检测商标名称是否合规
if
(
!
interface_list_temp
||
interface_list_temp
.
length
==
0
)
{
var
pushInterfaceResult
=
await
this
.
utilsOpOrderSve
.
getProductInterface
(
pobj
,
pobj
.
actionBody
.
product_id
);
return
system
.
getResult
(
null
,
"暂无【createAliTmApply】的推送配置,100520"
);
if
(
pushInterfaceResult
.
status
!=
0
)
{
pobj
.
actionBody
.
product_info
.
interface_info
=
pushInterfaceResult
.
data
;
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
"closeAliTmApply"
,
1
);
}
}
pobj
.
interface_params
=
interface_list_temp
[
0
].
params
;
opResult
=
await
this
.
utilsTmAliyunSve
.
opAliDingInterfaceManage
(
pobj
);
break
;
break
;
// case "checkTmNameByAli"://检测商标名称是否合规
// var pushInterfaceResult = await this.utilsOpOrderSve.getProductInterface(pobj, pobj.actionBody.product_id);
// if (pushInterfaceResult.status != 0) {
// pobj.actionBody.product_info.interface_info = pushInterfaceResult.data;
// this.utilsPushSve.pushBusInfo(pobj, "closeAliTmApply", 1);
// }
// break;
case
"updateContacts"
:
//修改订单联系人
case
"updateContacts"
:
//修改订单联系人
opResult
=
await
this
.
utilsOpOrderSve
.
updateContacts
(
pobj
,
pobj
.
actionBody
);
opResult
=
await
this
.
utilsOpOrderSve
.
updateContacts
(
pobj
,
pobj
.
actionBody
);
break
;
break
;
...
...
center-channel/app/base/service/app.base.js
View file @
a855b85a
...
@@ -81,10 +81,10 @@ class AppServiceBase {
...
@@ -81,10 +81,10 @@ class AppServiceBase {
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"service/app.base.js/
rest
PostUrl"
,
op
:
"service/app.base.js/
exec
PostUrl"
,
content
:
errorMsg
,
content
:
errorMsg
,
// clientIp: pobj.clientIp,
// clientIp: pobj.clientIp,
optitle
:
pobj
.
opType
+
"
推送操作异常->rest
PostUrl"
,
optitle
:
pobj
.
opType
+
"
基类操作异常->exec
PostUrl"
,
});
});
return
system
.
getResult
(
null
,
errorMsg
);
return
system
.
getResult
(
null
,
errorMsg
);
}
}
...
@@ -161,8 +161,8 @@ class AppServiceBase {
...
@@ -161,8 +161,8 @@ class AppServiceBase {
var
opType
=
pobj
.
opType
||
""
;
var
opType
=
pobj
.
opType
||
""
;
if
(
result
.
status
!=
0
)
{
if
(
result
.
status
!=
0
)
{
this
.
pushlogSve
.
createFailLogDb
({
this
.
pushlogSve
.
createFailLogDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
requestId
:
pobj
.
requestId
||
""
,
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
JSON
.
stringify
(
result
),
resultInfo
:
JSON
.
stringify
(
result
),
...
@@ -175,8 +175,8 @@ class AppServiceBase {
...
@@ -175,8 +175,8 @@ class AppServiceBase {
return
result
;
return
result
;
}
}
this
.
pushlogSve
.
createDb
({
this
.
pushlogSve
.
createDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
requestId
:
pobj
.
requestId
||
""
,
op
:
"推送业务类型:"
+
opType
,
op
:
"推送业务类型:"
+
opType
,
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
...
@@ -192,13 +192,13 @@ class AppServiceBase {
...
@@ -192,13 +192,13 @@ class AppServiceBase {
* @param {*} pobj
* @param {*} pobj
* @param {*} result
* @param {*} result
* @param {*} opTitleDesc
* @param {*} opTitleDesc
* @param {*} failType 错误类型,1为old-rpc推送失败日志,2为new-rpc推送失败日志,业务处理失败日志
* @param {*} failType 错误类型,1为old-rpc推送失败日志,2为new-rpc推送失败日志,业务处理失败日志
,3为失败日志记录
*/
*/
async
disposePushResultFail
(
pobj
,
result
,
opTitleDesc
,
failType
)
{
//处理失败的结果信息--内部使用
async
disposePushResultFail
(
pobj
,
result
,
opTitleDesc
,
failType
)
{
//处理失败的结果信息--内部使用
var
opType
=
pobj
.
opType
||
""
;
var
opType
=
pobj
.
opType
||
""
;
this
.
pushlogSve
.
createFailLogDb
({
this
.
pushlogSve
.
createFailLogDb
({
appid
:
pobj
.
appInfo
.
uapp_id
,
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
.
uapp_key
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
requestId
:
pobj
.
requestId
||
""
,
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
content
:
JSON
.
stringify
(
pobj
),
//推送的参数信息
resultInfo
:
JSON
.
stringify
(
result
),
resultInfo
:
JSON
.
stringify
(
result
),
...
@@ -211,12 +211,24 @@ class AppServiceBase {
...
@@ -211,12 +211,24 @@ class AppServiceBase {
return
result
;
return
result
;
}
}
async
getAliossjavaFileUrl
(
pobj
,
params
)
{
//上传ali oss 文件调用
async
getAliossjavaFileUrl
(
pobj
,
params
)
{
//上传ali oss 文件调用
var
opType
=
pobj
.
opType
||
""
;
try
{
try
{
var
aliOssFileInfo
=
await
this
.
execPostUrl
(
params
,
settings
.
aliossjavaUrl
());
var
aliOssFileInfo
=
await
this
.
execPostUrl
(
params
,
settings
.
aliossjavaUrl
());
if
(
aliOssFileInfo
)
{
if
(
aliOssFileInfo
==
true
)
{
var
fileUrl
=
params
.
filedir
+
"/"
+
params
.
objectName
;
var
fileUrl
=
params
.
filedir
+
"/"
+
params
.
objectName
;
return
system
.
getResultSuccess
(
fileUrl
);
return
system
.
getResultSuccess
(
fileUrl
);
}
}
this
.
pushlogSve
.
createFailLogDb
({
appid
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_id
||
""
:
""
,
appkey
:
pobj
.
appInfo
?
pobj
.
appInfo
.
uapp_key
||
""
:
""
,
requestId
:
pobj
.
requestId
||
""
,
content
:
JSON
.
stringify
(
params
),
//推送的参数信息
resultInfo
:
JSON
.
stringify
(
aliOssFileInfo
),
clientIp
:
pobj
.
clientIp
||
""
,
failType
:
3
,
opTitle
:
opType
+
"aliossjava-upload阿里上传文件操作失败->getAliossjavaFileUrl"
,
pushNumber
:
1
});
return
system
.
getResult
(
null
,
"java ali oss upload fail"
);
return
system
.
getResult
(
null
,
"java ali oss upload fail"
);
}
catch
(
e
)
{
}
catch
(
e
)
{
this
.
logCtl
.
error
({
this
.
logCtl
.
error
({
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
a855b85a
...
@@ -488,13 +488,13 @@ class UtilsOrderService extends AppServiceBase {
...
@@ -488,13 +488,13 @@ class UtilsOrderService extends AppServiceBase {
// uappId: outTradeInfo[1],
// uappId: outTradeInfo[1],
// productId: outTradeInfo.length == 3 ? outTradeInfo[2] : 0
// productId: outTradeInfo.length == 3 ? outTradeInfo[2] : 0
// }
// }
opResult
.
data
=
{
//
opResult.data = {
orderNo
:
"TM36202004111014WcFs
"
,
// orderNo: "TM36202004142002tEl6
",
uappId
:
36
,
//
uappId: 36,
productId
:
42
//
productId: 42
};
//
};
//获取充值业务锁
//获取充值业务锁
await
this
.
cacheManager
[
"TlPayLocker"
].
init
(
opResult
.
data
.
orderNo
);
//---测试时放开
//
await this.cacheManager["TlPayLocker"].init(opResult.data.orderNo);//---测试时放开
var
locker
=
await
this
.
cacheManager
[
"TlPayLocker"
].
enter
(
opResult
.
data
.
orderNo
);
var
locker
=
await
this
.
cacheManager
[
"TlPayLocker"
].
enter
(
opResult
.
data
.
orderNo
);
if
(
!
locker
||
locker
!=
"1"
)
{
if
(
!
locker
||
locker
!=
"1"
)
{
this
.
logCtl
.
info
({
this
.
logCtl
.
info
({
...
...
center-channel/app/base/service/impl/utilsSve/utilsTmAliyunSve.js
View file @
a855b85a
...
@@ -31,6 +31,9 @@ class UtilsTmAliyunService extends AppServiceBase {
...
@@ -31,6 +31,9 @@ class UtilsTmAliyunService extends AppServiceBase {
var
idCardOssKey
=
""
;
var
idCardOssKey
=
""
;
var
businessLicenceOssKey
=
""
;
var
businessLicenceOssKey
=
""
;
var
legalNoticeOssKey
=
""
;
var
legalNoticeOssKey
=
""
;
var
picUrl
=
""
;
var
authorizationOssKey
=
""
;
if
(
apply
.
customerType
!=
"ent"
&&
apply
.
identityCardPic
)
{
if
(
apply
.
customerType
!=
"ent"
&&
apply
.
identityCardPic
)
{
idCardOssKey
=
await
this
.
getAliOssFileUrl
(
"trade-mark-user-upload"
,
pobj
,
this
.
aliOssFileType
.
CARD
,
apply
.
identityCardPic
,
rpcParam
);
idCardOssKey
=
await
this
.
getAliOssFileUrl
(
"trade-mark-user-upload"
,
pobj
,
this
.
aliOssFileType
.
CARD
,
apply
.
identityCardPic
,
rpcParam
);
if
(
!
idCardOssKey
)
{
if
(
!
idCardOssKey
)
{
...
@@ -43,24 +46,24 @@ class UtilsTmAliyunService extends AppServiceBase {
...
@@ -43,24 +46,24 @@ class UtilsTmAliyunService extends AppServiceBase {
verifyResult
=
system
.
getResult
(
null
,
"businessLicensePic ali oss upload is error,100464"
);
verifyResult
=
system
.
getResult
(
null
,
"businessLicensePic ali oss upload is error,100464"
);
}
}
}
}
if
(
apply
.
smwjUrl
)
{
if
(
verifyResult
.
status
==
0
)
{
legalNoticeOssKey
=
await
this
.
getAliOssFileUrl
(
"trade-mark-user-upload"
,
pobj
,
this
.
aliOssFileType
.
LEGAL_NOTICE
,
apply
.
smwjUrl
,
rpcParam
);
if
(
apply
.
smwjUrl
)
{
if
(
!
legalNoticeOssKey
)
{
legalNoticeOssKey
=
await
this
.
getAliOssFileUrl
(
"trade-mark-user-upload"
,
pobj
,
this
.
aliOssFileType
.
LEGAL_NOTICE
,
apply
.
smwjUrl
,
rpcParam
);
verifyResult
=
system
.
getResult
(
null
,
"smwjUrl ali oss upload is error,100466"
);
if
(
!
legalNoticeOssKey
)
{
verifyResult
=
system
.
getResult
(
null
,
"smwjUrl ali oss upload is error,100466"
);
}
}
}
}
if
(
tmInfo
.
picUrl
)
{
var
picUrl
=
""
;
picUrl
=
await
this
.
getAliOssFileUrl
(
"trade-mark-user-upload"
,
pobj
,
this
.
aliOssFileType
.
ICON
,
tmInfo
.
picUrl
,
rpcParam
);
var
authorizationOssKey
=
""
;
if
(
!
picUrl
)
{
if
(
tmInfo
.
picUrl
)
{
verifyResult
=
system
.
getResult
(
null
,
"picUrl ali oss upload is error,100467"
);
picUrl
=
await
this
.
getAliOssFileUrl
(
"trade-mark-user-upload"
,
pobj
,
this
.
aliOssFileType
.
ICON
,
tmInfo
.
picUrl
,
rpcParam
);
}
if
(
!
picUrl
)
{
verifyResult
=
system
.
getResult
(
null
,
"picUrl ali oss upload is error,100467"
);
}
}
}
if
(
apply
.
gzwtsUrl
)
{
if
(
apply
.
gzwtsUrl
)
{
authorizationOssKey
=
await
this
.
getAliOssFileUrl
(
"trade-mark-user-upload"
,
pobj
,
this
.
aliOssFileType
.
ATTORNEY
,
apply
.
gzwtsUrl
,
rpcParam
);
authorizationOssKey
=
await
this
.
getAliOssFileUrl
(
"trade-mark-user-upload"
,
pobj
,
this
.
aliOssFileType
.
ATTORNEY
,
apply
.
gzwtsUrl
,
rpcParam
);
if
(
!
authorizationOssKey
)
{
if
(
!
authorizationOssKey
)
{
verifyResult
=
system
.
getResult
(
null
,
"gzwtsUrl ali oss upload is error,100468"
);
verifyResult
=
system
.
getResult
(
null
,
"gzwtsUrl ali oss upload is error,100468"
);
}
}
}
}
}
if
(
verifyResult
.
status
!=
0
)
{
if
(
verifyResult
.
status
!=
0
)
{
...
@@ -94,21 +97,38 @@ class UtilsTmAliyunService extends AppServiceBase {
...
@@ -94,21 +97,38 @@ class UtilsTmAliyunService extends AppServiceBase {
reqbody
:
actionBody
,
reqbody
:
actionBody
,
rpcParam
:
rpcParam
rpcParam
:
rpcParam
}
}
// var applicantResult = await this.opAliyunRpcReq(pobj, params);
var
applicantResult
=
await
this
.
opAliyunRpcReq
(
pobj
,
params
);
// if (applicantResult.status != 0) {
if
(
applicantResult
.
status
!=
0
)
{
// return await this.disposePushResultFail(pobj, applicantResult, "ali->tmCreateApplicant->applicantResult");
return
await
this
.
disposePushResultFail
(
pobj
,
applicantResult
,
"ali->tmCreateApplicant->applicantResult"
);
// }//++++++++++++++++++++++323661
var
classificationsResult
=
await
this
.
getClassifications
(
pobj
,
pobj
.
actionBody
.
delivery_content
.
nclones
,
rpcParam
);
if
(
Object
.
keys
(
classificationsResult
).
length
==
0
)
{
classificationsResult
=
system
.
getResult
(
null
,
"获取阿里尼斯数据为空,100469"
);
return
await
this
.
disposePushResultFail
(
pobj
,
classificationsResult
,
"ali->tmCreateApplicant->classificationsResult"
);
}
}
var
tmCreateResult
=
await
this
.
tmCreate
(
pobj
,
tmInfo
,
rpcParam
,
picUrl
,
authorizationOssKey
,
classificationsResult
,
323661
);
//applicantResult.data.ApplicantId);
var
classificationsResult
=
system
.
getResultSuccess
();
if
(
tmCreateResult
.
status
==
0
)
{
var
tmCreateResult
=
system
.
getResultSuccess
();
var
self
=
this
;
for
(
let
i
=
0
;
i
<
pobj
.
actionBody
.
delivery_content
.
nclones
.
length
;
i
++
)
{
const
nclonesItem
=
pobj
.
actionBody
.
delivery_content
.
nclones
[
i
];
classificationsResult
=
await
self
.
getClassifications
(
pobj
,
nclonesItem
,
rpcParam
);
if
(
classificationsResult
.
status
!=
0
)
{
classificationsResult
=
await
self
.
getClassifications
(
pobj
,
nclonesItem
,
rpcParam
);
if
(
classificationsResult
.
status
!=
0
)
{
classificationsResult
=
system
.
getResult
(
null
,
"获取阿里尼斯数据为空,100469"
);
break
;
}
//第二次调用失败则尼斯调用失败
}
tmCreateResult
=
await
self
.
tmCreate
(
pobj
,
tmInfo
,
rpcParam
,
picUrl
,
authorizationOssKey
,
classificationsResult
.
data
,
applicantResult
.
data
.
ApplicantId
);
if
(
tmCreateResult
.
status
!=
0
)
{
tmCreateResult
=
await
self
.
tmCreate
(
pobj
,
tmInfo
,
rpcParam
,
picUrl
,
authorizationOssKey
,
classificationsResult
.
data
,
applicantResult
.
data
.
ApplicantId
);
if
(
tmCreateResult
.
status
!=
0
)
{
break
;
}
//第二次调用失败则创建商标失败
}
//保存渠道申请人数据
//保存渠道申请人数据
actionBody
.
ApplicantId
=
323661
;
//
applicantResult.data.ApplicantId;
actionBody
.
ApplicantId
=
applicantResult
.
data
.
ApplicantId
;
actionBody
.
AuthorizationOssKey
=
authorizationOssKey
;
actionBody
.
AuthorizationOssKey
=
authorizationOssKey
;
this
.
addAliChannelTmApplicant
(
pobj
,
actionBody
,
tmCreateResult
.
data
.
orderId
);
tmCreateResult
.
data
.
tmInfo
.
Classifications
=
classificationsResult
.
data
;
self
.
addAliChannelTmApplicant
(
pobj
,
actionBody
,
tmCreateResult
.
data
.
OrderId
,
tmCreateResult
.
data
.
tmInfo
);
}
if
(
classificationsResult
.
status
!=
0
)
{
return
await
this
.
disposePushResultFail
(
pobj
,
classificationsResult
,
"ali->tmCreateApplicant->classificationsResult"
);
}
}
return
await
this
.
disposePushResult
(
pobj
,
tmCreateResult
,
"ali->tmCreateApplicant->tmCreateResult"
);
return
await
this
.
disposePushResult
(
pobj
,
tmCreateResult
,
"ali->tmCreateApplicant->tmCreateResult"
);
}
}
...
@@ -189,23 +209,7 @@ class UtilsTmAliyunService extends AppServiceBase {
...
@@ -189,23 +209,7 @@ class UtilsTmAliyunService extends AppServiceBase {
var
result
=
await
this
.
opAliyunRpcReq
(
pobj
,
params
);
var
result
=
await
this
.
opAliyunRpcReq
(
pobj
,
params
);
return
await
this
.
disposePushResult
(
pobj
,
result
,
"ali->updateAliTmApplicant->result"
);
return
await
this
.
disposePushResult
(
pobj
,
result
,
"ali->updateAliTmApplicant->result"
);
}
}
async
closeAliTrademarkApplication
(
pobj
)
{
//主动关闭商标申请
var
verifyResult
=
await
this
.
opAliyunRpcVerifyParam
(
pobj
);
if
(
!
pobj
.
actionBody
.
parentCode
)
{
verifyResult
=
system
.
getResult
(
null
,
"parentCode param is empty,100490"
);
}
if
(
verifyResult
.
status
!=
0
)
{
return
await
this
.
disposePushResultFail
(
pobj
,
verifyResult
,
"ali->closeAliTrademarkApplication->verifyResult"
);
}
var
rpcParam
=
verifyResult
.
data
;
var
params
=
{
action
:
rpcParam
.
action
,
reqbody
:
{
ParentCode
:
pobj
.
actionBody
.
parentCode
},
rpcParam
:
rpcParam
}
var
result
=
await
this
.
opAliyunRpcReq
(
pobj
,
params
);
return
await
this
.
disposePushResult
(
pobj
,
result
,
"ali->closeAliTrademarkApplication->result"
);
}
//--------------------------------------------------内部辅助方法-------------------start-----------------
//--------------------------------------------------内部辅助方法-------------------start-----------------
...
@@ -238,10 +242,12 @@ class UtilsTmAliyunService extends AppServiceBase {
...
@@ -238,10 +242,12 @@ class UtilsTmAliyunService extends AppServiceBase {
reqbody
:
actionBody
,
reqbody
:
actionBody
,
rpcParam
:
rpcParam
rpcParam
:
rpcParam
}
}
// var tmCreateReslut = await this.opAliyunRpcReq(pobj, params);
var
tmCreateReslut
=
await
this
.
opAliyunRpcReq
(
pobj
,
params
);
if
(
tmCreateReslut
.
status
==
0
)
{
// return tmCreateReslut;
tmCreateReslut
.
data
.
tmInfo
=
actionBody
;
return
system
.
getResultSuccess
({
"orderId"
:
"204426185080629"
});
}
return
tmCreateReslut
;
// return system.getResultSuccess({ "orderId": "204426185080629" });
}
}
async
bindAliTmApplicantGzwtsUrl
(
pobj
,
rpcParam
,
applicantId
,
authorizationOssKey
)
{
//绑定商标申请人信息-(绑定授权书Oss文件)---内部使用
async
bindAliTmApplicantGzwtsUrl
(
pobj
,
rpcParam
,
applicantId
,
authorizationOssKey
)
{
//绑定商标申请人信息-(绑定授权书Oss文件)---内部使用
if
(
!
authorizationOssKey
)
{
if
(
!
authorizationOssKey
)
{
...
@@ -293,42 +299,46 @@ class UtilsTmAliyunService extends AppServiceBase {
...
@@ -293,42 +299,46 @@ class UtilsTmAliyunService extends AppServiceBase {
var
self
=
this
;
var
self
=
this
;
var
aliNclThreesList
=
{};
var
aliNclThreesList
=
{};
var
aliNclTwosList
=
[];
var
aliNclTwosList
=
[];
for
(
let
i
=
0
;
i
<
nclones
.
length
;
i
++
)
{
// for (let i = 0; i < nclones.length; i++) {
const
nclOneItem
=
nclones
[
i
];
const
nclOneItem
=
nclones
;
var
nclThreeList
=
nclOneItem
.
nclThree
;
var
nclThreeList
=
nclOneItem
.
nclThree
;
var
getAliThreeList
=
[];
var
getAliThreeList
=
[];
for
(
let
j
=
0
;
j
<
nclThreeList
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
nclThreeList
.
length
;
j
++
)
{
const
nclThreeItem
=
nclThreeList
[
j
];
const
nclThreeItem
=
nclThreeList
[
j
];
var
aliThreeList
=
null
;
var
aliThreeList
=
null
;
var
aliNclTwosListIndex
=
aliNclTwosList
.
findIndex
(
f
=>
f
.
pcode
===
nclThreeItem
.
pcode
);
var
aliNclTwosListIndex
=
aliNclTwosList
.
findIndex
(
f
=>
f
.
pcode
===
nclThreeItem
.
pcode
);
if
(
aliNclTwosListIndex
<
0
)
{
if
(
aliNclTwosListIndex
<
0
)
{
var
aliNclDataResult
=
await
self
.
getAliNclInfo
(
pobj
,
nclThreeItem
.
pcode
,
rpcParam
);
var
aliNclDataResult
=
await
self
.
getAliNclInfo
(
pobj
,
nclThreeItem
.
pcode
,
rpcParam
);
if
(
aliNclDataResult
.
status
==
0
)
{
if
(
aliNclDataResult
.
status
==
0
)
{
aliThreeList
=
aliNclDataResult
.
data
;
aliThreeList
=
aliNclDataResult
.
data
;
aliNclTwosList
.
push
({
aliNclTwosList
.
push
({
pcode
:
nclThreeItem
.
pcode
,
pcode
:
nclThreeItem
.
pcode
,
nclThree
:
aliThreeList
nclThree
:
aliThreeList
});
});
}
}
//获取ali 的信息
else
{
aliThreeList
=
aliNclTwosList
[
aliNclTwosListIndex
].
nclThree
;
}
if
(
!
aliThreeList
)
{
continue
;
}
}
for
(
let
k
=
0
;
k
<
aliThreeList
.
length
;
k
++
)
{
}
//获取ali 的信息
const
aliNclThree
=
aliThreeList
[
k
];
else
{
if
(
aliNclThree
.
ClassificationName
==
nclThreeItem
.
name
)
{
aliThreeList
=
aliNclTwosList
[
aliNclTwosListIndex
].
nclThree
;
getAliThreeList
.
push
(
aliNclThree
.
ClassificationCode
);
}
break
;
if
(
!
aliThreeList
)
{
}
continue
;
}
for
(
let
k
=
0
;
k
<
aliThreeList
.
length
;
k
++
)
{
const
aliNclThree
=
aliThreeList
[
k
];
if
(
aliNclThree
.
ClassificationName
==
nclThreeItem
.
name
)
{
getAliThreeList
.
push
(
aliNclThree
.
ClassificationCode
);
break
;
}
}
}
//一个大类下小项组装完毕
}
aliNclThreesList
[
nclOneItem
.
code
]
=
getAliThreeList
.
join
(
','
);
}
//一个大类下小项组装完毕
// aliNclThreesList["\"" + nclOneItem.code + "\""] = "\"" + getAliThreeList.join(',') + "\"";
if
(
getAliThreeList
.
length
==
0
)
{
}
return
system
.
getResult
(
null
,
"获取阿里尼斯数据失败,100530"
);
return
aliNclThreesList
;
}
aliNclThreesList
[
nclOneItem
.
code
]
=
getAliThreeList
.
join
(
','
);
// aliNclThreesList["\"" + nclOneItem.code + "\""] = "\"" + getAliThreeList.join(',') + "\"";
// }
return
system
.
getResultSuccess
(
aliNclThreesList
)
// return aliNclThreesList;
}
}
async
getAliNclInfo
(
pobj
,
parentCode
,
rpcParam
)
{
async
getAliNclInfo
(
pobj
,
parentCode
,
rpcParam
)
{
var
params
=
{
var
params
=
{
...
@@ -345,11 +355,11 @@ class UtilsTmAliyunService extends AppServiceBase {
...
@@ -345,11 +355,11 @@ class UtilsTmAliyunService extends AppServiceBase {
//-------------------------操作渠道商标信息
//-------------------------操作渠道商标信息
async
addAliChannelTmApplicant
(
pobj
,
applyInfo
,
channelOrderNo
)
{
//新增ali渠道商标交付信息
async
addAliChannelTmApplicant
(
pobj
,
applyInfo
,
channelOrderNo
,
tmInfo
)
{
//新增ali渠道商标交付信息
var
tmpPobj
=
{
var
tmpPobj
=
{
actionType
:
"addAliChannelTmApplicant"
,
actionType
:
"addAliChannelTmApplicant"
,
appInfo
:
pobj
.
appInfo
,
appInfo
:
pobj
.
appInfo
,
actionBody
:
{
deliveryData
:
{
apply
:
applyInfo
},
orderNo
:
pobj
.
actionBody
.
orderNo
,
channelOrderNo
:
channelOrderNo
}
actionBody
:
{
deliveryData
:
{
apply
:
applyInfo
,
tm
:
tmInfo
},
orderNo
:
pobj
.
actionBody
.
orderNo
,
channelOrderNo
:
channelOrderNo
}
}
}
var
reqUrl
=
settings
.
centerOrderUrl
()
+
"opaction/opOrder/springBoard"
;
var
reqUrl
=
settings
.
centerOrderUrl
()
+
"opaction/opOrder/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
tmpPobj
,
reqUrl
);
var
result
=
await
this
.
restPostUrl
(
tmpPobj
,
reqUrl
);
...
@@ -377,5 +387,27 @@ class UtilsTmAliyunService extends AppServiceBase {
...
@@ -377,5 +387,27 @@ class UtilsTmAliyunService extends AppServiceBase {
//--------------------------------------------------内部辅助方法-------------------end-----------------
//--------------------------------------------------内部辅助方法-------------------end-----------------
//--------------------------------------------------供外部调用方法-----------------start---------------
async
opAliDingInterfaceManage
(
pobj
,
rpcParam
)
{
//操作阿里钉钉接口管理---外部调用
var
verifyResult
=
await
this
.
opAliyunRpcVerifyParam
(
pobj
);
if
(
verifyResult
.
status
!=
0
)
{
return
await
this
.
disposePushResultFail
(
pobj
,
verifyResult
,
"ali->opAliDingInterfaceManage->verifyResult"
,
3
);
}
var
rpcParam
=
verifyResult
.
data
;
var
params
=
{
action
:
pobj
.
action
,
reqbody
:
pobj
.
actionBody
,
rpcParam
:
rpcParam
}
var
result
=
await
this
.
opAliyunRpcReq
(
pobj
,
params
);
return
result
;
}
//--------------------------------------------------供外部调用方法-----------------end---------------
}
}
module
.
exports
=
UtilsTmAliyunService
;
module
.
exports
=
UtilsTmAliyunService
;
center-channel/app/base/utils/aliyunClient.js
View file @
a855b85a
...
@@ -88,6 +88,8 @@ class aliyunClient {
...
@@ -88,6 +88,8 @@ class aliyunClient {
method
:
'GET'
,
// set the http method, default is GET
method
:
'GET'
,
// set the http method, default is GET
headers
:
{},
// set the http request headers
headers
:
{},
// set the http request headers
});
});
console
.
log
(
action
,
"action..........."
);
console
.
log
(
reqbody
,
"reqbody..........."
);
return
system
.
getResultSuccess
(
res
);
return
system
.
getResultSuccess
(
res
);
}
}
async
reqCustomByPost
(
obj
,
cbk
)
{
async
reqCustomByPost
(
obj
,
cbk
)
{
...
...
center-channel/app/config/routes/api.js
View file @
a855b85a
...
@@ -109,8 +109,8 @@ module.exports = function (app) {
...
@@ -109,8 +109,8 @@ module.exports = function (app) {
}
}
req
.
body
.
appInfo
=
result
.
data
;
req
.
body
.
appInfo
=
result
.
data
;
req
.
body
.
actionProcess
=
result
.
data
.
app_code
;
req
.
body
.
actionProcess
=
result
.
data
.
app_code
;
var
lst
=
[
"tmConfirm"
,
"getNeedSolutionDetailByUser"
,
var
lst
=
[
"tmConfirm"
,
"getNeedSolutionDetailByUser"
,
"submitIcpProgramme"
,
"submitIcpMaterial"
,
"acceptIcpPartnerNotification"
,
"abolishIcpProgramme"
,
"submitIcpProgramme"
,
"submitIcpMaterial"
,
"acceptIcpPartnerNotification"
,
"abolishIcpProgramme"
,
"addOrder"
,
"getH5PayUrl"
,
"getOrderQrCode"
,
"queryOrderStatus"
,
"getOrderInfo"
,
"getOrderDeliveryInfo"
,
"getOrderDetails"
,
"addOrder"
,
"getH5PayUrl"
,
"getOrderQrCode"
,
"queryOrderStatus"
,
"getOrderInfo"
,
"getOrderDeliveryInfo"
,
"getOrderDetails"
,
"getOrderDeliveryFlowInfo"
,
"getOrderDeliveryFlowList"
,
"getOrderLogInfo"
,
"updateContacts"
,
"updateTmOrder"
,
"delOrder"
,
"getOrderDeliveryFlowInfo"
,
"getOrderDeliveryFlowList"
,
"getOrderLogInfo"
,
"updateContacts"
,
"updateTmOrder"
,
"delOrder"
,
"submitProgramme"
,
"getProgrammeListByUser"
,
"getProgrammeInfoByNeedNo"
,
"abolishProgramme"
,
"getAliPayInfo"
"submitProgramme"
,
"getProgrammeListByUser"
,
"getProgrammeInfoByNeedNo"
,
"abolishProgramme"
,
"getAliPayInfo"
...
...
center-channel/提示编码使用
View file @
a855b85a
已经使用的
编码汇总:
已经使用的
编码汇总:
...
@@ -49,4 +49,6 @@
...
@@ -49,4 +49,6 @@
100480
100480
100490
100490
100500
100500
100510
100510
\ No newline at end of file
100520
100530
\ No newline at end of file
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