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
457bfd9d
Commit
457bfd9d
authored
May 14, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
0f1ed92a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
56 deletions
+6
-56
fqboss/app/base/api/impl/tmsub.js
+6
-56
No files found.
fqboss/app/base/api/impl/tmsub.js
View file @
457bfd9d
...
...
@@ -302,7 +302,7 @@ class TmSub {
if
(
opResult
.
code
!=
1
)
{
this
.
oplogSve
.
createDb
({
logLevel
:
"error"
,
optitle
:
"fq渠道商标状态通知
DB
异常---error"
,
optitle
:
"fq渠道商标状态通知
处理
异常---error"
,
op
:
"base/api/impl/tmsub/channelTmNotify"
,
content
:
JSON
.
stringify
(
pobj
),
clientIp
:
""
...
...
@@ -342,71 +342,21 @@ class TmSub {
});
var
result
=
{
code
:
1
,
msg
:
"SUCCESS"
};
try
{
var
appCode
=
pobj
.
appCode
||
""
;
//应用编码
var
actionProcess
=
pobj
.
actionProcess
||
""
;
//作业方
var
sign
=
pobj
.
sign
||
""
;
//签名信息
if
(
!
appCode
)
{
result
.
code
=
-
100
;
result
.
message
=
"appCode参数错误"
;
return
result
;
}
if
(
!
actionProcess
)
{
result
.
code
=
-
110
;
result
.
message
=
"actionProcess参数错误"
;
return
result
;
}
if
(
!
sign
)
{
result
.
code
=
-
105
;
result
.
message
=
"sign参数错误"
;
return
result
;
}
let
applistCache
=
await
this
.
cacheManager
[
"ApplistCache"
].
getListByCache
();
if
(
applistCache
==
null
||
applistCache
==
""
||
applistCache
==
"undefined"
)
{
result
.
code
=
-
110
;
result
.
message
=
"缓存app数据有误"
;
return
result
;
}
let
appList
=
JSON
.
parse
(
applistCache
);
if
(
appList
==
null
||
appList
.
length
==
0
)
{
result
.
code
=
-
120
;
result
.
message
=
"缓存app数据有误!!"
;
return
result
;
}
var
newList
=
appCode
&&
sign
?
appList
.
filter
(
item
=>
item
.
app_code
==
appCode
)
:
appList
.
filter
(
item
=>
item
.
app_code
==
appCode
);
//没有签名则用渠道自动提报
if
(
newList
==
null
||
newList
.
length
==
0
)
{
result
.
code
=
-
130
;
result
.
message
=
"通过缓存获取app数据有误"
;
return
result
;
}
let
appItem
=
newList
[
0
];
if
(
appCode
&&
sign
)
{
// 验证签名
var
signResult
=
await
this
.
paramsSign
(
sign
,
pobj
.
actionBody
,
appItem
.
secret
);
if
(
signResult
.
code
!=
1
)
{
result
.
code
=
-
140
;
result
.
message
=
"签名错误,请重试"
;
return
result
;
}
}
if
(
actionProcess
==
"AliTm"
)
{
var
opResult
=
await
this
.
opAliNotify
(
pobj
.
actionBody
);
// if (opResult.code == 1 && pobj.status && pobj.status == "2") {//阿里云审不通过---调用关闭注册方案(目前阿里那边自动关闭)
// var rc = System.getObject("util.aliyunClient");
// rc.post("CloseTradeMarkProduct", { BizId: pobj.actionBody.bizId });
// }
if
(
opResult
.
code
!=
1
)
{
this
.
oplogSve
.
createDb
({
logLevel
:
"error"
,
optitle
:
"fq渠道商标状态通知
DB异常
---error"
,
optitle
:
"fq渠道商标状态通知
处理用于阿里
---error"
,
op
:
"base/api/impl/tmsub/channelTmNotify"
,
content
:
JSON
.
stringify
(
pobj
),
clientIp
:
""
});
result
.
code
=
-
150
;
result
.
status
=
-
150
;
result
.
msg
=
"渠道商标状态通知异常"
;
result
.
message
=
"渠道商标状态通知异常"
;
result
.
msg
=
"渠道商标状态通知异常
用于阿里
"
;
result
.
message
=
"渠道商标状态通知异常
用于阿里
"
;
return
result
;
}
result
.
status
=
0
;
...
...
@@ -414,13 +364,13 @@ class TmSub {
return
result
;
}
catch
(
e
)
{
logCtl
.
error
({
optitle
:
"fq渠道商标状态通知异常---error"
,
optitle
:
"fq渠道商标状态通知异常
用于阿里
---error"
,
op
:
"base/api/impl/tmsub/channelTmNotify"
,
content
:
e
.
stack
,
clientIp
:
""
});
result
.
code
=
-
200
;
result
.
msg
=
"渠道商标状态通知异常:"
+
e
.
stack
;
result
.
msg
=
"渠道商标状态通知异常
用于阿里
:"
+
e
.
stack
;
}
return
result
;
}
...
...
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