明树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
90951ca5
Commit
90951ca5
authored
Dec 16, 2024
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
50a33465
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
productDeepController.js
controller/productDeepController.js
+1
-1
productDirPlantController.js
controller/productDirPlantController.js
+1
-1
productPreController.js
controller/productPreController.js
+2
-2
index.js
cron/index.js
+1
-1
No files found.
controller/productDeepController.js
View file @
90951ca5
...
@@ -3,7 +3,7 @@ async function createDeepPlant(req, res, next) {
...
@@ -3,7 +3,7 @@ async function createDeepPlant(req, res, next) {
try
{
try
{
//
//
const
body
=
req
.
body
;
const
body
=
req
.
body
;
let
count
=
await
DB
.
ProductDeep
.
count
();
//没有真实删除 永远递增
let
count
=
await
DB
.
ProductDeep
.
count
Documents
();
//没有真实删除 永远递增
body
.
productNumber
=
count
;
body
.
productNumber
=
count
;
let
ret
=
await
DB
.
ProductDeep
.
create
(
body
);
let
ret
=
await
DB
.
ProductDeep
.
create
(
body
);
res
.
sendData
(
ret
);
res
.
sendData
(
ret
);
...
...
controller/productDirPlantController.js
View file @
90951ca5
...
@@ -3,7 +3,7 @@ async function createDirectPlant(req, res, next) {
...
@@ -3,7 +3,7 @@ async function createDirectPlant(req, res, next) {
try
{
try
{
//
//
const
body
=
req
.
body
;
const
body
=
req
.
body
;
let
count
=
await
DB
.
ProductPlant
.
count
();
//没有真实删除 永远递增
let
count
=
await
DB
.
ProductPlant
.
count
Documents
();
//没有真实删除 永远递增
body
.
productNumber
=
count
;
body
.
productNumber
=
count
;
let
ret
=
await
DB
.
ProductPlant
.
create
(
body
);
let
ret
=
await
DB
.
ProductPlant
.
create
(
body
);
res
.
sendData
(
ret
);
res
.
sendData
(
ret
);
...
...
controller/productPreController.js
View file @
90951ca5
...
@@ -4,7 +4,7 @@ async function createPrePlant(req, res, next) {
...
@@ -4,7 +4,7 @@ async function createPrePlant(req, res, next) {
try
{
try
{
//
//
const
body
=
req
.
body
;
const
body
=
req
.
body
;
let
count
=
await
DB
.
ProductPre
.
count
();
//没有真实删除 永远递增
let
count
=
await
DB
.
ProductPre
.
count
Documents
();
//没有真实删除 永远递增
body
.
productNumber
=
count
;
body
.
productNumber
=
count
;
let
ret
=
await
DB
.
ProductPre
.
create
(
body
);
let
ret
=
await
DB
.
ProductPre
.
create
(
body
);
res
.
sendData
(
ret
);
res
.
sendData
(
ret
);
...
@@ -20,7 +20,7 @@ async function listPrePlant(req, res, next) {
...
@@ -20,7 +20,7 @@ async function listPrePlant(req, res, next) {
let
skip
=
(
page
-
1
)
*
pageSize
;
let
skip
=
(
page
-
1
)
*
pageSize
;
const
count
=
await
DB
.
ProductPre
.
countDocuments
(
search
);
const
count
=
await
DB
.
ProductPre
.
countDocuments
(
search
);
let
list
=
await
DB
.
ProductPre
.
find
(
search
).
populate
({
pat
:
"productPhotos"
}).
sort
({
_id
:
-
1
}).
skip
(
skip
).
limit
(
pageSize
);
let
list
=
await
DB
.
ProductPre
.
find
(
search
).
populate
({
pat
h
:
"productPhotos"
}).
sort
({
_id
:
-
1
}).
skip
(
skip
).
limit
(
pageSize
);
res
.
sendData
({
count
,
list
});
res
.
sendData
({
count
,
list
});
}
catch
(
error
)
{
}
catch
(
error
)
{
next
(
error
);
next
(
error
);
...
...
cron/index.js
View file @
90951ca5
...
@@ -101,7 +101,7 @@ const cron = () => {
...
@@ -101,7 +101,7 @@ const cron = () => {
if
(
sysConfig
&&
sysConfig
.
cron
&&
sysConfig
.
cron
.
plantearlywarning
)
{
if
(
sysConfig
&&
sysConfig
.
cron
&&
sysConfig
.
cron
.
plantearlywarning
)
{
console
.
log
(
"plant:"
,
new
Date
());
console
.
log
(
"plant:"
,
new
Date
());
new
nodeCron
.
schedule
(
'1
01 06
* * *'
,
async
()
=>
{
new
nodeCron
.
schedule
(
'1
*/1 *
* * *'
,
async
()
=>
{
await
plantWarnCron
.
plantearlywarning
();
await
plantWarnCron
.
plantearlywarning
();
},
{
timezone
:
"Asia/Shanghai"
});
},
{
timezone
:
"Asia/Shanghai"
});
}
}
...
...
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