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
d1237a77
Commit
d1237a77
authored
Feb 27, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 更新
parent
80683738
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
Application.java
...uto-turnover/src/main/java/com/bailuntec/Application.java
+1
-1
QueueConsumerJob.java
...ver/src/main/java/com/bailuntec/job/QueueConsumerJob.java
+2
-0
AutoTurnoverTest.java
...ow/show-auto-turnover/src/test/java/AutoTurnoverTest.java
+5
-3
No files found.
data-show/show-auto-turnover/src/main/java/com/bailuntec/Application.java
View file @
d1237a77
...
...
@@ -80,7 +80,7 @@ public class Application {
private
static
LiteJobConfiguration
createQueueConsumer
()
{
JobCoreConfiguration
simpleCoreConfig
=
JobCoreConfiguration
.
newBuilder
(
"queueConsumer3"
,
"0
/10 *
* * * ? "
,
"0
0/1
* * * ? "
,
8
)
.
build
();
SimpleJobConfiguration
simpleJobConfig
=
new
SimpleJobConfiguration
(
simpleCoreConfig
,
QueueConsumerJob
.
class
.
getCanonicalName
());
...
...
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/QueueConsumerJob.java
View file @
d1237a77
...
...
@@ -62,7 +62,9 @@ public class QueueConsumerJob implements SimpleJob {
.
andWarehouseCodeEqualTo
(
baseQueueMessage
.
getWarehouseCode
())
.
example
());
try
{
AutoTurnoverJob
.
shardingContextThreadLocal
.
set
(
new
ShardingContext
(
new
ShardingContexts
(
"x"
,
null
,
1
,
"NORMAL"
,
new
HashMap
<>(
16
)),
0
));
autoTurnoverJob
.
autoTurnoverFromStock
(
DateTimeFormatter
.
ofPattern
(
CommonConstant
.
DATE_FORMAT
).
format
(
LocalDate
.
now
()),
dcBaseStock
);
AutoTurnoverJob
.
shardingContextThreadLocal
.
remove
();
AutoTurnoverJob
.
shardingContextThreadLocal
.
set
(
new
ShardingContext
(
new
ShardingContexts
(
"x"
,
null
,
1
,
Constant
.
OCEAN_HEAD
,
new
HashMap
<>(
16
)),
0
));
autoTurnoverJob
.
autoTurnoverFromStock
(
DateTimeFormatter
.
ofPattern
(
CommonConstant
.
DATE_FORMAT
).
format
(
LocalDate
.
now
()),
dcBaseStock
);
...
...
data-show/show-auto-turnover/src/test/java/AutoTurnoverTest.java
View file @
d1237a77
...
...
@@ -262,14 +262,16 @@ public class AutoTurnoverTest {
public
void
testXX2
()
{
DcBaseStock
dcBaseStock
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseStockMapper
.
class
)
.
selectOneByExample
(
DcBaseStockExample
.
newAndCreateCriteria
()
.
andBailunSkuEqualTo
(
"
N-GNS006-7ML
"
)
.
andWarehouseCodeEqualTo
(
"
BLGZ03
"
)
.
andBailunSkuEqualTo
(
"
LM-EO-007
"
)
.
andWarehouseCodeEqualTo
(
"
MMDUSFBA
"
)
.
example
());
try
{
AutoTurnoverJob
autoTurnoverJob
=
new
AutoTurnoverJob
();
long
time
=
System
.
currentTimeMillis
();
log
.
info
(
Long
.
toString
(
time
));
AutoTurnoverJob
.
shardingContextThreadLocal
.
set
(
new
ShardingContext
(
new
ShardingContexts
(
"x"
,
null
,
8
,
Constant
.
AIR_HEAD
,
new
HashMap
<>()),
0
));
// AutoTurnoverJob.shardingContextThreadLocal.set(new ShardingContext(new ShardingContexts("x", null, 8, Constant.AIR_HEAD, new HashMap<>()), 0));
AutoTurnoverJob
.
shardingContextThreadLocal
.
set
(
new
ShardingContext
(
new
ShardingContexts
(
"x"
,
null
,
1
,
"NORMAL"
,
new
HashMap
<>(
16
)),
0
));
autoTurnoverJob
.
autoTurnoverFromStock
(
DateTimeFormatter
.
ofPattern
(
CommonConstant
.
DATE_FORMAT
).
format
(
LocalDate
.
now
()),
dcBaseStock
);
log
.
info
(
String
.
valueOf
((
System
.
currentTimeMillis
()
-
time
)));
...
...
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