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
2c4cf9c4
Commit
2c4cf9c4
authored
Jul 28, 2021
by
王悦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Revert "fix 不使用sytxpublic-msgq""
This reverts commit
11ed4f89
parent
11ed4f89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
15 deletions
+27
-15
zhiquanquan/app/base/controller/impl/trademark/trademarkCtl.js
+27
-15
No files found.
zhiquanquan/app/base/controller/impl/trademark/trademarkCtl.js
View file @
2c4cf9c4
...
...
@@ -133,16 +133,29 @@ class TrademarkCtl extends CtlBase {
async
publish
(
p
,
q
,
req
)
{
try
{
let
body
=
{
"tm"
:
p
.
data
"actionType"
:
"tmBatchUpload"
,
"actionBody"
:
{
"tm"
:
p
.
data
}
};
let
uploadid
;
if
(
q
&&
q
.
upload_id
)
{
uploadid
=
q
.
upload_id
;
body
.
upload_id
=
uploadid
;
}
let
rtn
=
await
pushClient
(
body
,
pushurl
,
notify
url
);
let
rtn
=
await
this
.
execClient
.
execPost
(
body
,
push
url
);
if
(
rtn
.
status
==
1
)
{
let
tradedb
=
[];
this
.
notify
({
actionBody
:
{
resultInfo
:
{
data
:
rtn
.
data
},
messageBody
:
{
upload_id
:
uploadid
}
}
},
q
,
req
)
p
.
data
.
map
(
db
=>
tradedb
.
push
({
opath
:
p
.
opath
,
user_id
:
p
.
userid
,
...
...
@@ -197,6 +210,7 @@ class TrademarkCtl extends CtlBase {
}
upload
.
total
=
data
.
length
;
await
upload
.
save
();
let
pros
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
+=
20
)
{
let
item
=
data
.
slice
(
i
,
i
+
20
);
item
.
forEach
(
e
=>
{
...
...
@@ -210,8 +224,9 @@ class TrademarkCtl extends CtlBase {
pushd
.
userid
=
p
.
actionBody
.
userid
;
pushd
.
company_id
=
p
.
actionBody
.
company_id
;
pushd
.
channel_name
=
p
.
actionBody
.
channel_name
;
await
this
.
publish
(
pushd
,
{
upload_id
:
uploadid
}
)
pros
.
push
(
this
.
publish
(
pushd
,
{
upload_id
:
uploadid
})
)
}
await
Promise
.
all
(
pros
)
return
{
status
:
1
,
msg
:
"ok"
...
...
@@ -234,18 +249,15 @@ class TrademarkCtl extends CtlBase {
name
:
p
.
name
,
file_url
:
p
.
file_url
});
let
rtn
=
await
pushClient
({
upload_id
:
upload
.
id
,
file_url
:
p
.
file_url
,
opath
:
p
.
opath
,
userid
:
p
.
userid
,
channel_name
:
p
.
channel_name
,
company_id
:
p
.
company_id
},
pushmyurl
);
if
(
rtn
.
status
==
1
)
{
return
system
.
getResult
(
rtn
)
}
return
system
.
getResultFail
(
-
1
,
rtn
.
msg
,
rtn
)
this
.
process
({
actionBody
:{
upload_id
:
upload
.
id
,
file_url
:
p
.
file_url
,
opath
:
p
.
opath
,
userid
:
p
.
userid
,
channel_name
:
p
.
channel_name
,
company_id
:
p
.
company_id
},
q
,
req
})
return
system
.
getResultSuccess
(
rtn
)
}
catch
(
e
)
{
return
system
.
getResultFail
(
-
2
,
e
)
}
...
...
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