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
58e837c0
Commit
58e837c0
authored
Apr 08, 2022
by
王悦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
71d33aee
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
13 deletions
+53
-13
center-tmtransaction/app/base/service/impl/tm/trademarktransactionSve.js
+50
-12
center-tmtransaction/app/base/utils/aliClient.js
+3
-1
No files found.
center-tmtransaction/app/base/service/impl/tm/trademarktransactionSve.js
View file @
58e837c0
...
@@ -471,9 +471,52 @@ class TrademarktransactionService extends ServiceBase {
...
@@ -471,9 +471,52 @@ class TrademarktransactionService extends ServiceBase {
});
});
console
.
log
(
list
);
console
.
log
(
list
);
var
result
=
system
.
getResultSuccess
(
list
);
var
result
=
system
.
getResultSuccess
(
list
);
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
if
(
list
[
i
].
TmType
!==
"NORMAL"
&&
list
[
i
].
publish_status
===
"auditali"
){
let
data
=
await
this
.
queryAlistatus
(
list
[
i
].
code
)
if
(
data
.
status
===
1
){
list
[
i
].
publish_status
=
"ON_SALE"
list
[
i
].
publish_status_name
=
"在售"
this
.
dao
.
updateByWhere
(
list
[
i
],
{
where
:
{
id
:
list
[
i
].
id
}})
}
else
if
(
data
.
status
===
0
){
list
[
i
].
fail_reason
=
data
.
fail_reason
list
[
i
].
publish_status
=
"fail"
list
[
i
].
publish_status_name
=
"发布失败"
this
.
dao
.
updateByWhere
(
list
[
i
],
{
where
:
{
id
:
list
[
i
].
id
}})
}
}
}
result
.
totalCount
=
count
;
result
.
totalCount
=
count
;
return
result
;
return
result
;
}
}
/*
* {
"Status": 1,
"TrademarkName": "以旋",
"Classification": "20",
"OrderPrice": 11800,
"RegistrationNumber": "38975416",
"Icon": "https://trademark-images.oss-cn-beijing.aliyuncs.com/onsale/ad6ef2bd-2019-4f55-bf72-fb880f8a6d49.jpg",
"TmType": "NORMAL"
}*/
async
queryAlistatus
(
code
,
status
)
{
let
res
=
await
reqbyget
({
action
:
"QueryTrademarkOnSale"
,
reqbody
:
{
registerCode
:
code
,
PageNum
:
1
,
PageSize
:
50
}
},
true
)
res
=
res
.
Trademarks
if
(
res
.
length
>
0
){
if
(
res
[
0
].
Status
==
1
)
return
{
status
:
1
}
else
return
{
status
:
0
,
fail_reason
:
JSON
.
stringify
(
res
[
0
])}
}
else
return
{
status
:
9
}
}
/**
/**
* @api {post} /tmtransaction/action/trademarktransaction/springBoard 标原详情
* @api {post} /tmtransaction/action/trademarktransaction/springBoard 标原详情
* @apiGroup 标源管理
* @apiGroup 标源管理
...
@@ -714,16 +757,6 @@ class TrademarktransactionService extends ServiceBase {
...
@@ -714,16 +757,6 @@ class TrademarktransactionService extends ServiceBase {
this
.
updateAlistatus
(
ids
,
status
)
this
.
updateAlistatus
(
ids
,
status
)
}
}
async
queryAlistatus
(
code
,
status
)
{
let
err
=
await
reqbyget
({
action
:
"QueryTrademarkOnSale"
,
reqbody
:
{
RegisterNumber
:
code
,
PageNum
:
1
,
PageSize
:
1
}
})
}
async
updateAlistatus
(
ids
,
status
)
{
async
updateAlistatus
(
ids
,
status
)
{
let
res
=
await
this
.
dao
.
model
.
findAll
({
where
:
{
id
:
{
$in
:
ids
}}})
let
res
=
await
this
.
dao
.
model
.
findAll
({
where
:
{
id
:
{
$in
:
ids
}}})
let
err
let
err
...
@@ -740,8 +773,13 @@ class TrademarktransactionService extends ServiceBase {
...
@@ -740,8 +773,13 @@ class TrademarktransactionService extends ServiceBase {
item
.
publish_status
=
"fail"
item
.
publish_status
=
"fail"
item
.
publish_status_name
=
"发布失败"
item
.
publish_status_name
=
"发布失败"
}
else
{
}
else
{
item
.
publish_status
=
status
===
"ON_SALE"
?
"uppershelf"
:
"lowershelf"
if
(
item
.
TmType
===
"NORMAL"
)
{
item
.
publish_status_name
=
status
===
"ON_SALE"
?
"在售"
:
"下架"
item
.
publish_status
=
status
===
"ON_SALE"
?
"uppershelf"
:
"lowershelf"
item
.
publish_status_name
=
status
===
"ON_SALE"
?
"在售"
:
"下架"
}
else
{
item
.
publish_status
=
status
===
"ON_SALE"
?
"auditali"
:
"lowershelf"
item
.
publish_status_name
=
status
===
"ON_SALE"
?
"待阿里审核"
:
"下架"
}
}
}
item
.
save
()
item
.
save
()
}
}
...
...
center-tmtransaction/app/base/utils/aliClient.js
View file @
58e837c0
...
@@ -11,7 +11,7 @@ getAliTMClient = () => {
...
@@ -11,7 +11,7 @@ getAliTMClient = () => {
}
}
//阿里接口
//阿里接口
exports
.
reqbyget
=
async
(
obj
)
=>
{
exports
.
reqbyget
=
async
(
obj
,
rt
)
=>
{
var
action
=
obj
.
action
;
var
action
=
obj
.
action
;
var
reqbody
=
obj
.
reqbody
;
var
reqbody
=
obj
.
reqbody
;
try
{
try
{
...
@@ -27,6 +27,8 @@ exports.reqbyget = async (obj) => {
...
@@ -27,6 +27,8 @@ exports.reqbyget = async (obj) => {
headers
:
{},
// set the http request headers
headers
:
{},
// set the http request headers
});
});
console
.
log
(
res
);
console
.
log
(
res
);
if
(
rt
)
return
res
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
return
e
.
data
.
Message
return
e
.
data
.
Message
...
...
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