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
80683738
Commit
80683738
authored
Feb 26, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 更新
parent
69eb817a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
Application.java
...uto-turnover/src/main/java/com/bailuntec/Application.java
+2
-2
QueueConsumerJobTest.java
...src/test/java/com/bailuntec/job/QueueConsumerJobTest.java
+5
-5
No files found.
data-show/show-auto-turnover/src/main/java/com/bailuntec/Application.java
View file @
80683738
...
@@ -79,8 +79,8 @@ public class Application {
...
@@ -79,8 +79,8 @@ public class Application {
private
static
LiteJobConfiguration
createQueueConsumer
()
{
private
static
LiteJobConfiguration
createQueueConsumer
()
{
JobCoreConfiguration
simpleCoreConfig
=
JobCoreConfiguration
.
newBuilder
(
JobCoreConfiguration
simpleCoreConfig
=
JobCoreConfiguration
.
newBuilder
(
"queueConsumer
2
"
,
"queueConsumer
3
"
,
"0/1 * * * * ? "
,
"0/1
0
* * * * ? "
,
8
)
8
)
.
build
();
.
build
();
SimpleJobConfiguration
simpleJobConfig
=
new
SimpleJobConfiguration
(
simpleCoreConfig
,
QueueConsumerJob
.
class
.
getCanonicalName
());
SimpleJobConfiguration
simpleJobConfig
=
new
SimpleJobConfiguration
(
simpleCoreConfig
,
QueueConsumerJob
.
class
.
getCanonicalName
());
...
...
data-show/show-auto-turnover/src/test/java/com/bailuntec/job/QueueConsumerJobTest.java
View file @
80683738
...
@@ -27,11 +27,11 @@ public class QueueConsumerJobTest {
...
@@ -27,11 +27,11 @@ public class QueueConsumerJobTest {
@Test
@Test
public
void
test
()
{
public
void
test
()
{
ShardingContext
shardingContext
=
new
ShardingContext
(
new
ShardingContexts
(
"x"
,
null
,
1
,
Constant
.
AIR_HEAD
,
new
HashMap
<>()),
0
);
//
ShardingContext shardingContext = new ShardingContext(new ShardingContexts("x", null, 1, Constant.AIR_HEAD, new HashMap<>()), 0);
AutoTurnoverJob
.
shardingContextThreadLocal
.
set
(
shardingContext
);
//
AutoTurnoverJob.shardingContextThreadLocal.set(shardingContext);
QueueConsumerJob
.
BaseQueueMessage
baseQueueMessage
=
new
QueueConsumerJob
.
BaseQueueMessage
();
QueueConsumerJob
.
BaseQueueMessage
baseQueueMessage
=
new
QueueConsumerJob
.
BaseQueueMessage
();
baseQueueMessage
.
setBailunSku
(
"
228427301
"
);
baseQueueMessage
.
setBailunSku
(
"
LM-EO-007
"
);
baseQueueMessage
.
setWarehouseCode
(
"
BLFBW01
"
);
baseQueueMessage
.
setWarehouseCode
(
"
MMDUSFBA
"
);
DcBaseStockMapper
dcBaseStockMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseStockMapper
.
class
);
DcBaseStockMapper
dcBaseStockMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseStockMapper
.
class
);
AutoTurnoverJob
autoTurnoverJob
=
new
AutoTurnoverJob
();
AutoTurnoverJob
autoTurnoverJob
=
new
AutoTurnoverJob
();
...
@@ -45,7 +45,7 @@ public class QueueConsumerJobTest {
...
@@ -45,7 +45,7 @@ public class QueueConsumerJobTest {
// AutoTurnoverJob.shardingContextThreadLocal.set(new ShardingContext(new ShardingContexts("x", null, 1, Constant.OCEAN_HEAD, new HashMap<>(16)), 0));
// 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);
// autoTurnoverJob.autoTurnoverFromStock(DateTimeFormatter.ofPattern(CommonConstant.DATE_FORMAT).format(LocalDate.now()), dcBaseStock);
// AutoTurnoverJob.shardingContextThreadLocal.remove();
// AutoTurnoverJob.shardingContextThreadLocal.remove();
AutoTurnoverJob
.
shardingContextThreadLocal
.
set
(
new
ShardingContext
(
new
ShardingContexts
(
"x"
,
null
,
1
,
Constant
.
AIR
_HEAD
,
new
HashMap
<>(
16
)),
0
));
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
);
autoTurnoverJob
.
autoTurnoverFromStock
(
DateTimeFormatter
.
ofPattern
(
CommonConstant
.
DATE_FORMAT
).
format
(
LocalDate
.
now
()),
dcBaseStock
);
AutoTurnoverJob
.
shardingContextThreadLocal
.
remove
();
AutoTurnoverJob
.
shardingContextThreadLocal
.
remove
();
...
...
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