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
91510e93
Commit
91510e93
authored
May 09, 2022
by
王悦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix判断队列是否存在消息,存在则不重复提交
parent
8e374d7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
center-tmtransaction/app/base/service/impl/tm/trademarktransactionSve.js
+8
-5
No files found.
center-tmtransaction/app/base/service/impl/tm/trademarktransactionSve.js
View file @
91510e93
...
...
@@ -816,11 +816,14 @@ class TrademarktransactionService extends ServiceBase {
return
err
}
async
allOnSale
(
pobj
,
status
)
{
let
res
=
await
this
.
dao
.
model
.
findAll
({
where
:
{
publish_status
:
"audit"
}})
while
(
res
.
length
>
0
){
let
push_data
=
res
.
splice
(
0
,
100
)
let
ids
=
push_data
.
map
(
ite
=>
ite
.
id
)
Channel
.
sendToQueue
(
queName
,
Buffer
.
from
(
JSON
.
stringify
(
ids
)),
{
persistent
:
true
});
let
ok
=
await
Channel
.
assertQueue
(
queName
,
{
durable
:
true
})
if
(
ok
.
messageCount
===
0
)
{
let
res
=
await
this
.
dao
.
model
.
findAll
({
where
:
{
publish_status
:
"audit"
}})
while
(
res
.
length
>
0
)
{
let
push_data
=
res
.
splice
(
0
,
100
)
let
ids
=
push_data
.
map
(
ite
=>
ite
.
id
)
Channel
.
sendToQueue
(
queName
,
Buffer
.
from
(
JSON
.
stringify
(
ids
)),
{
persistent
:
true
});
}
}
return
system
.
getResultSuccess
()
}
...
...
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