明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
letian_backend
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zengfanpei
letian_backend
Commits
2c9f0f51
Commit
2c9f0f51
authored
Jun 20, 2025
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
27fc5ca0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
heavyMetalController.js
controller/heavyMetalController.js
+7
-1
db.zip
db.zip
+0
-0
No files found.
controller/heavyMetalController.js
View file @
2c9f0f51
...
...
@@ -43,7 +43,13 @@ async function batchCreate(req, res, next) {
let
metals
=
req
.
body
.
metals
;
let
ret
=
[];
if
(
metals
&&
metals
.
length
)
{
ret
=
await
DB
.
HeavyMetal
.
insertMany
(
metals
);
let
arr
=
[];
for
(
let
index
=
0
;
index
<
metals
.
length
;
index
++
)
{
const
element
=
metals
[
index
];
element
.
proHaveMetal
=
!
element
.
proHaveMetal
;
//要取反,对方传递得true是没有金属
arr
.
push
(
element
);
}
ret
=
await
DB
.
HeavyMetal
.
insertMany
(
arr
);
}
else
{
let
datas
=
req
.
body
.
datas
;
let
arr
=
[];
...
...
db.zip
0 → 100644
View file @
2c9f0f51
File added
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