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
67e6a160
Commit
67e6a160
authored
May 15, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fqboss' of gitlab.gongsibao.com:jiangyong/zhichan into fqboss
parents
aae78c53
b93ac94c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
12 deletions
+85
-12
fqboss/app/base/api/impl/tmsub.js
+71
-11
fqboss/app/config/settings.js
+13
-0
fqboss/app/front/vues/pages/trademark/trademark.js
+1
-1
No files found.
fqboss/app/base/api/impl/tmsub.js
View file @
67e6a160
var
System
=
require
(
"../../system"
);
const
logCtl
=
System
.
getObject
(
"web.oplogCtl"
);
const
trademarkCtl
=
System
.
getObject
(
"web.trademarkCtl"
);
const
settings
=
require
(
"../../../config/settings"
);
const
md5
=
require
(
"MD5"
);
class
TmSub
{
constructor
()
{
...
...
@@ -282,35 +283,94 @@ class TmSub {
}
}
if
(
actionProcess
==
"AliTm"
)
{
var
reqUrl
=
settings
.
channelApiUrl
(
actionProcess
)
+
"/api/auth/accessAuth/getAppTokenByHosts"
;
var
reqParam
=
{
"actionType"
:
"getAppTokenByHosts"
,
"actionBody"
:
{}
};
var
rc
=
System
.
getObject
(
"util.execClient"
);
var
tokenReqResult
=
await
rc
.
execPost
(
reqParam
,
reqUrl
);
if
(
!
tokenReqResult
||
!
tokenReqResult
.
stdout
)
{
result
.
code
=
-
150
;
}
var
tokenResult
=
JSON
.
parse
(
tokenReqResult
.
stdout
);
if
(
tokenResult
.
status
!=
0
)
{
result
.
code
=
-
150
;
}
if
(
result
.
code
==
-
150
)
{
var
opResult
=
await
this
.
opAliNotify
(
pobj
.
actionBody
);
if
(
opResult
.
code
!=
1
)
{
logCtl
.
info
({
logLevel
:
"error"
,
optitle
:
"fq渠道商标状态通知处理异常---error"
,
op
:
"base/api/impl/tmsub/channelTmNotify"
,
content
:
"参数:"
+
JSON
.
stringify
(
pobj
)
+
",返回结果:"
+
JSON
.
stringify
(
opResult
),
clientIp
:
""
});
result
.
msg
=
"渠道商标状态通知异常"
;
result
.
message
=
"渠道商标状态通知异常"
;
return
result
;
}
}
reqUrl
=
settings
.
channelApiUrl
(
actionProcess
)
+
"/api/action/tmTransaction/springBoard"
;
reqParam
.
actionType
=
"addPushContent"
;
reqParam
.
actionBody
=
{
pushUrl
:
settings
.
pushFqBossAliTmNotify
(),
pushContent
:
pobj
,
};
await
rc
.
execPostTK
(
reqParam
,
reqUrl
,
tokenResult
.
data
.
token
);
}
return
result
;
}
catch
(
e
)
{
logCtl
.
error
({
optitle
:
"fq渠道商标状态通知异常---error"
,
op
:
"base/api/impl/tmsub/channelTmNotify"
,
content
:
e
.
stack
,
clientIp
:
""
});
result
.
code
=
-
200
;
result
.
msg
=
"渠道商标状态通知异常:"
+
e
.
stack
;
}
return
result
;
}
async
channelTmNotifyByAli
(
pobj
)
{
//渠道通知商标状态-用于阿里
logCtl
.
info
({
optitle
:
"渠道通知商标状态参数用于阿里---info"
,
op
:
"base/api/impl/tmsub/channelTmNotify"
,
content
:
JSON
.
stringify
(
pobj
),
clientIp
:
""
});
var
result
=
{
code
:
1
,
msg
:
"SUCCESS"
};
try
{
var
actionProcess
=
pobj
.
actionProcess
||
""
;
//作业方
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
({
logCtl
.
info
({
logLevel
:
"error"
,
optitle
:
"fq渠道商标状态通知
DB异常
---error"
,
optitle
:
"fq渠道商标状态通知
处理用于阿里
---error"
,
op
:
"base/api/impl/tmsub/channelTmNotify"
,
content
:
JSON
.
stringify
(
pobj
),
content
:
"参数:"
+
JSON
.
stringify
(
pobj
)
+
",返回结果:"
+
JSON
.
stringify
(
opResult
),
clientIp
:
""
});
result
.
code
=
-
150
;
result
.
msg
=
"渠道商标状态通知异常"
;
result
.
message
=
"渠道商标状态通知异常"
;
result
.
status
=
-
150
;
result
.
msg
=
"渠道商标状态通知异常用于阿里,返回结果:"
+
JSON
.
stringify
(
opResult
);
result
.
message
=
"渠道商标状态通知异常用于阿里"
;
return
result
;
}
result
.
status
=
0
;
}
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
;
}
...
...
fqboss/app/config/settings.js
View file @
67e6a160
...
...
@@ -40,6 +40,9 @@ var settings = {
},
channelApiUrl
:
function
(
channelCode
)
{
if
(
this
.
env
==
"dev"
)
{
if
(
channelCode
==
"AliTm"
)
{
return
"http://alitm.qifu.gongsibao.com:4012"
;
}
return
"http://centerorder.apps.com:4011"
;
}
else
{
if
(
channelCode
==
"jd"
)
{
...
...
@@ -48,9 +51,19 @@ var settings = {
if
(
channelCode
==
"gsbh5"
)
{
return
"http://center-order-service"
;
}
if
(
channelCode
==
"AliTm"
)
{
return
"http://alitm.qifu.gongsibao.com"
;
}
return
"https://zcchannel.gongsibao.com"
;
//"http://zc-channel-service";
}
},
pushFqBossAliTmNotify
:
function
(
channelCode
)
{
if
(
this
.
env
==
"dev"
)
{
return
"http://192.168.201.137:3000/api/tmsub/channelTmNotifyByAli"
;
}
else
{
return
"https://fqgirl.gongsibao.com/api/tmsub/channelTmNotifyByAli"
;
}
},
reqEsAddrIc
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
var
localsettings
=
require
(
"./localsettings"
);
...
...
fqboss/app/front/vues/pages/trademark/trademark.js
View file @
67e6a160
...
...
@@ -875,7 +875,7 @@
/**查询商标状态*/
this
.
$root
.
getReq
(
"/web/trademarkCtl/queryAliTmStatus"
,
{
methodType
:
"QueryPartnerTradeMarkApplications"
,
body
:{
"BizId"
:
row
.
businessId
}}).
then
(
function
(
d
)
{
if
(
d
.
code
==
200
&&
d
.
data
)
{
if
(
d
.
data
.
data
&&
d
.
data
.
data
.
Data
&&
d
.
data
.
data
.
Data
.
TmProduces
&&
d
.
data
.
data
.
Data
.
TmProduces
.
length
>
0
&&
!
d
.
data
.
data
.
Data
.
TmProduces
[
0
].
SupplementId
){
if
(
d
.
data
.
data
&&
d
.
data
.
data
.
Data
&&
d
.
data
.
data
.
Data
.
TmProduces
&&
d
.
data
.
data
.
Data
.
TmProduces
.
length
>
0
&&
d
.
data
.
data
.
Data
.
TmProduces
[
0
].
SupplementId
){
that
.
supplementaryEvidenceTmInfo
=
{
UploadOssKeyList
:[],
BizId
:
row
.
businessId
,
...
...
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