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
1c9cfabd
Commit
1c9cfabd
authored
Jan 13, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 周转
parent
202a5eea
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
45 deletions
+40
-45
readonly-db-dev.properties
data-common/src/main/resources/readonly-db-dev.properties
+0
-4
readonly-db-prod.properties
data-common/src/main/resources/readonly-db-prod.properties
+0
-6
pom.xml
data-show/show-auto-turnover/pom.xml
+30
-0
AutoTurnoverJob.java
...over/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
+0
-20
job.properties
...show/show-auto-turnover/src/main/resources/job.properties
+3
-9
AutoTurnoverJobTest.java
.../src/test/java/com/bailuntec/job/AutoTurnoverJobTest.java
+1
-1
pom.xml
pom.xml
+6
-5
No files found.
data-common/src/main/resources/readonly-db-dev.properties
deleted
100644 → 0
View file @
202a5eea
driver
=
com.mysql.jdbc.Driver
url
=
jdbc:mysql://gz-cdbrg-qdyec2j3.sql.tencentcdb.com:59667/bailun_datacenter?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
username
=
root
password
=
#7kfnymAM$Y9-Ntf
data-common/src/main/resources/readonly-db-prod.properties
deleted
100644 → 0
View file @
202a5eea
driver
=
com.mysql.jdbc.Driver
url
=
jdbc:mysql://10.0.8.21:3306/bailun_datacenter?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
username
=
root
password
=
#7kfnymAM$Y9-Ntf
data-show/show-auto-turnover/pom.xml
View file @
1c9cfabd
...
...
@@ -53,7 +53,35 @@
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>
maven-assembly-plugin
</artifactId>
<version>
3.1.0
</version>
<configuration>
<archive>
<manifest>
<mainClass>
com.bailuntec.Application
</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>
jar-with-dependencies
</descriptorRef>
</descriptorRefs>
<appendAssemblyId>
false
</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>
make-assembly
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- docker的maven插件,官网:https://github.com/spotify/docker-maven-plugin -->
<plugin>
<groupId>
com.spotify
</groupId>
...
...
@@ -80,6 +108,7 @@
</plugins>
<resources>
<resource>
<directory>
src/main/resources
</directory>
<includes>
...
...
@@ -89,6 +118,7 @@
<!--默认是true-->
<filtering>
true
</filtering>
</resource>
<resource>
<directory>
src/main/java
</directory>
<includes>
...
...
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
View file @
1c9cfabd
...
...
@@ -19,7 +19,6 @@ import com.bailuntec.service.impl.AutoTurnoverServiceImpl;
import
com.bailuntec.support.PointJob
;
import
com.bailuntec.utils.*
;
import
com.dangdang.ddframe.job.api.ShardingContext
;
import
com.google.common.collect.Lists
;
import
com.google.gson.Gson
;
import
lombok.extern.slf4j.Slf4j
;
import
okhttp3.OkHttpClient
;
...
...
@@ -1804,25 +1803,6 @@ public class AutoTurnoverJob extends PointJob {
return
inventoryAvailableDays
;
}
public
static
void
main
(
String
[]
args
)
{
String
str
=
" 5000, 5000, 5000, 5000, 5000, 5000, 2286, 2286, 2286, 2286, 2286, 2286, 2286, 1071, 1071, 1071, 1071, 1071, 1071, 1071, 1714, 1714, 1714, 1714, 1714, 1714, 1714, 1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429, 1429, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1000, 1000, 1000, 1000, 1000, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86.3649, 172.7298, 259.09470000000003454596, 345.4596, 431.8245, 518.1894000000000863649, 604.5543000000000863649, 690.9192, 777.2841, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490, 863.6490"
;
LocalDate
localDate
=
LocalDate
.
now
();
for
(
String
sales
:
Lists
.
newArrayList
(
str
.
split
(
","
)))
{
System
.
out
.
println
(
sales
+
"日期"
+
localDate
.
toString
());
localDate
=
localDate
.
plusDays
(
1
);
}
// Lists.newArrayList(str.split(",")).stream()
// .map(String::trim)
// .map(BigDecimal::new)
// .forEach(sales -> System.out.println(sales));
// .limit(90)
// .reduce(BigDecimal::add));
}
/**
* <p>
* jb
...
...
data-show/show-auto-turnover/src/main/resources/job.properties
View file @
1c9cfabd
...
...
@@ -9,18 +9,12 @@ EVENT_RDB_STORAGE_USERNAME=root
EVENT_RDB_STORAGE_PASSWORD
=
#7kfnymAM$Y9-Ntf
ZOOKEEPER_SERVER=172.31.255.120:2181
NAME_SPACE
=
data-center
JOB_NAME
=
show-auto-turnover31
JOB_CRON
=
0 0 3 * * ?
#JOB_CRON=0 16 8 * * ?
JOB_NAME
=
show-auto-turnover36
#JOB_CRON=0 0 3 * * ?
JOB_CRON
=
0 14 9 * * ?
SHARDING_TOTAL_COUNT
=
8
JOB_NAME_NE_NORMAL
=
show-auto-turnover-ne-normal
JOB_CRON_NE_NORMAL
=
0 0 10 ? * MON
JOB_NAME_INCREMENT
=
show-auto-turnover-increment3
JOB_CRON_INCREMENT
=
0 0 14 * * ?
SHARDING_TOTAL_COUNT_INCREMENT
=
8
data-show/show-auto-turnover/src/test/java/com/bailuntec/job/AutoTurnoverJobTest.java
View file @
1c9cfabd
...
...
@@ -57,7 +57,7 @@ public class AutoTurnoverJobTest {
jobPointLog
.
setPageSize
(
1000
);
AutoTurnoverJob
autoTurnoverJob
=
new
AutoTurnoverJob
();
autoTurnoverJob
.
executeJob
(
new
ShardingContext
(
new
ShardingContexts
(
"x"
,
null
,
1
,
"INCREMENT
"
,
new
HashMap
<>()),
0
),
autoTurnoverJob
.
executeJob
(
new
ShardingContext
(
new
ShardingContexts
(
"x"
,
null
,
8
,
"NORMAL
"
,
new
HashMap
<>()),
0
),
jobPointLog
);
}
...
...
pom.xml
View file @
1c9cfabd
...
...
@@ -5,12 +5,13 @@
<modelVersion>
4.0.0
</modelVersion>
<
parent
>
<groupId>
com.bailuntec
</groupId
>
<artifactId>
bailuntec-parent
</artifactId
>
<version>
1.0-SNAPSHOT
</version
>
<
/parent
>
<
!-- <parent>--
>
<!-- <groupId>com.bailuntec</groupId>--
>
<!-- <artifactId>bailuntec-parent</artifactId>--
>
<!-- <version>1.0-SNAPSHOT</version>--
>
<
!-- </parent>--
>
<groupId>
com.bailuntec
</groupId>
<artifactId>
dc-java
</artifactId>
<version>
1.0-SNAPSHOT
</version>
...
...
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