Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-java
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
dc-java
Commits
f68d32ec
Commit
f68d32ec
authored
Feb 05, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 更新
parent
a31a2dfb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
Application.java
...uto-turnover/src/main/java/com/bailuntec/Application.java
+2
-2
QueueConsumerJob.java
...ver/src/main/java/com/bailuntec/job/QueueConsumerJob.java
+3
-4
No files found.
data-show/show-auto-turnover/src/main/java/com/bailuntec/Application.java
View file @
f68d32ec
...
@@ -45,8 +45,8 @@ public class Application {
...
@@ -45,8 +45,8 @@ public class Application {
new
JobScheduler
(
createRegistryCenter
(),
new
JobScheduler
(
createRegistryCenter
(),
createJobConfigurationNeNormal
()).
init
();
createJobConfigurationNeNormal
()).
init
();
new
JobScheduler
(
createRegistryCenter
(),
//
new JobScheduler(createRegistryCenter(),
createJobConfigurationWeek
()).
init
();
//
createJobConfigurationWeek()).init();
}
}
...
...
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/QueueConsumerJob.java
View file @
f68d32ec
...
@@ -17,7 +17,6 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -17,7 +17,6 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.ibatis.session.SqlSession
;
import
org.apache.ibatis.session.SqlSession
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
import
java.util.List
;
import
java.util.List
;
...
@@ -52,7 +51,8 @@ public class QueueConsumerJob implements SimpleJob {
...
@@ -52,7 +51,8 @@ public class QueueConsumerJob implements SimpleJob {
List
<
DcBaseQueue
>
dcBaseQueueList
=
dcBaseQueueMapper
.
selectByExample
(
DcBaseQueueExample
.
newAndCreateCriteria
()
List
<
DcBaseQueue
>
dcBaseQueueList
=
dcBaseQueueMapper
.
selectByExample
(
DcBaseQueueExample
.
newAndCreateCriteria
()
.
andConsumeDateIsNull
()
.
andConsumeDateIsNull
()
.
example
());
.
example
()
.
limit
(
1000
));
dcBaseQueueList
.
forEach
(
dcBaseQueue
->
{
dcBaseQueueList
.
forEach
(
dcBaseQueue
->
{
BaseQueueMessage
baseQueueMessage
=
JSON
.
parseObject
(
dcBaseQueue
.
getMessage
(),
BaseQueueMessage
.
class
);
BaseQueueMessage
baseQueueMessage
=
JSON
.
parseObject
(
dcBaseQueue
.
getMessage
(),
BaseQueueMessage
.
class
);
...
@@ -63,13 +63,12 @@ public class QueueConsumerJob implements SimpleJob {
...
@@ -63,13 +63,12 @@ public class QueueConsumerJob implements SimpleJob {
.
example
());
.
example
());
try
{
try
{
autoTurnoverJob
.
autoTurnoverFromStock
(
DateTimeFormatter
.
ofPattern
(
CommonConstant
.
DATE_FORMAT
).
format
(
LocalDate
.
now
()),
dcBaseStock
);
autoTurnoverJob
.
autoTurnoverFromStock
(
DateTimeFormatter
.
ofPattern
(
CommonConstant
.
DATE_FORMAT
).
format
(
LocalDate
.
now
()),
dcBaseStock
);
dcBaseQueueMapper
.
deleteByPrimaryKey
(
dcBaseQueue
.
getId
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
dcBaseQueue
.
setErrorMessage
(
e
.
getMessage
());
dcBaseQueue
.
setErrorMessage
(
e
.
getMessage
());
dcBaseQueue
.
setErrorStackTrace
(
e
.
getStackTrace
().
toString
());
dcBaseQueue
.
setErrorStackTrace
(
e
.
getStackTrace
().
toString
());
}
finally
{
}
finally
{
log
.
info
(
"消费一条数据 message:{}"
,
dcBaseQueue
.
getMessage
());
log
.
info
(
"消费一条数据 message:{}"
,
dcBaseQueue
.
getMessage
());
dcBaseQueue
.
setConsumeDate
(
LocalDateTime
.
now
());
dcBaseQueueMapper
.
updateByPrimaryKey
(
dcBaseQueue
);
}
}
});
});
...
...
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