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
bltdc
dc-java
Commits
36818628
Commit
36818628
authored
Aug 15, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增销量预测公式字段
parent
39892e90
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
188 additions
and
30 deletions
+188
-30
pom.xml
data-common/pom.xml
+32
-11
DcAutoTurnover.java
...main/java/com/bailuntec/domain/entity/DcAutoTurnover.java
+0
-0
DcAutoTurnoverExample.java
...a/com/bailuntec/domain/example/DcAutoTurnoverExample.java
+0
-0
DcAutoTurnoverMapper.xml
...c/main/java/com/bailuntec/mapper/DcAutoTurnoverMapper.xml
+0
-0
generatorConfig.xml
data-common/src/main/resources/generatorConfig.xml
+137
-0
init.properties
data-common/src/main/resources/init.properties
+2
-0
AutoTurnoverJob.java
...over/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
+1
-1
job.properties
...show/show-auto-turnover/src/main/resources/job.properties
+2
-2
pom.xml
mybatis-generator/pom.xml
+10
-11
generatorConfig.xml
mybatis-generator/src/main/resources/generatorConfig.xml
+3
-4
init.properties
mybatis-generator/src/main/resources/init.properties
+1
-1
No files found.
data-common/pom.xml
View file @
36818628
...
...
@@ -73,17 +73,17 @@
<artifactId>
commons-beanutils
</artifactId>
</dependency>
<!-- <!– https://mvnrepository.com/artifact/org.slf4j/slf4j-api –>-->
<!-- <dependency>-->
<!-- <groupId>org.slf4j</groupId>-->
<!-- <artifactId>slf4j-api</artifactId>-->
<!-- </dependency>-->
<!-- <!– https://mvnrepository.com/artifact/ch.qos.logback/logback-classic –>-->
<!-- <dependency>-->
<!-- <groupId>ch.qos.logback</groupId>-->
<!-- <artifactId>logback-classic</artifactId>-->
<!-- </dependency>-->
<!-- <!– https://mvnrepository.com/artifact/org.slf4j/slf4j-api –>-->
<!-- <dependency>-->
<!-- <groupId>org.slf4j</groupId>-->
<!-- <artifactId>slf4j-api</artifactId>-->
<!-- </dependency>-->
<!-- <!– https://mvnrepository.com/artifact/ch.qos.logback/logback-classic –>-->
<!-- <dependency>-->
<!-- <groupId>ch.qos.logback</groupId>-->
<!-- <artifactId>logback-classic</artifactId>-->
<!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<dependency>
...
...
@@ -130,6 +130,27 @@
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
</plugin>
<plugin>
<groupId>
org.mybatis.generator
</groupId>
<artifactId>
mybatis-generator-maven-plugin
</artifactId>
<version>
1.3.7
</version>
<configuration>
<!-- 配置文件 -->
<configurationFile>
src/main/resources/generatorConfig.xml
</configurationFile>
<!-- 允许移动和修改 -->
<verbose>
true
</verbose>
<overwrite>
true
</overwrite>
</configuration>
<dependencies>
<dependency>
<groupId>
com.itfsw
</groupId>
<artifactId>
mybatis-generator-plugin
</artifactId>
<version>
1.2.20
</version>
</dependency>
</dependencies>
</plugin>
</plugins>
<resources>
<resource>
...
...
data-common/src/main/java/com/bailuntec/domain/entity/DcAutoTurnover.java
View file @
36818628
This diff is collapsed.
Click to expand it.
data-common/src/main/java/com/bailuntec/domain/example/DcAutoTurnoverExample.java
View file @
36818628
This diff is collapsed.
Click to expand it.
data-common/src/main/java/com/bailuntec/mapper/DcAutoTurnoverMapper.xml
View file @
36818628
This diff is collapsed.
Click to expand it.
data-common/src/main/resources/generatorConfig.xml
0 → 100644
View file @
36818628
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
<generatorConfiguration>
<!-- 引入配置文件 -->
<!-- 可以用于加载配置项或者配置文件,在整个配置文件中就可以使用${propertyKey}的方式来引用配置项
resource:配置资源加载地址,使用resource,MBG从classpath开始找,比如com/myproject/generatorConfig.properties
url:配置资源加载地质,使用URL的方式,比如file:///C:/myfolder/generatorConfig.properties.
注意,两个属性只能选址一个; -->
<properties
resource=
"init.properties"
/>
<!-- 指定数据连接驱动jar地址 -->
<classPathEntry
location=
"/Users/huluobin/Downloads/seata/lib/mysql-connector-java-5.1.30.jar"
/>
<!-- 一个数据库一个context -->
<!--targetRuntime="MyBatis3Simple" 不生成Mapper-->
<context
id=
"assetsoracle"
>
<!-- 自动生成toString方法 -->
<plugin
type=
"org.mybatis.generator.plugins.ToStringPlugin"
/>
<!-- 自动生成equals方法和hashcode方法 -->
<plugin
type=
"org.mybatis.generator.plugins.EqualsHashCodePlugin"
/>
<!-- 存在即更新插件 -->
<plugin
type=
"com.itfsw.mybatis.generator.plugins.UpsertPlugin"
>
<!--
支持upsertByExample,upsertByExampleSelective操作
!需开启allowMultiQueries=true多条sql提交操作,所以不建议使用!插件默认不开启
-->
<property
name=
"allowMultiQueries"
value=
"false"
/>
<!--
开启批量功能,支持batchUpsert,batchUpsertWithBLOBs,batchUpserSelective
!这几个方法中无法支持IncrementsPlugin的方法!插件默认不开启
-->
<property
name=
"allowBatchUpsert"
value=
"fasle"
/>
</plugin>
<!-- 批量插入插件 -->
<plugin
type=
"com.itfsw.mybatis.generator.plugins.BatchInsertPlugin"
>
<!--
开启后可以实现官方插件根据属性是否为空决定是否插入该字段功能
!需开启allowMultiQueries=true多条sql提交操作,所以不建议使用!插件默认不开启
-->
<property
name=
"allowMultiQueries"
value=
"false"
/>
</plugin>
<!-- Lombok插件 -->
<plugin
type=
"com.itfsw.mybatis.generator.plugins.LombokPlugin"
>
<!-- @Builder 必须在 Lombok 版本 >= 1.18.2 的情况下 -->
<property
name=
"@Builder"
value=
"false"
/>
<!-- @NoArgsConstructor 和 @AllArgsConstructor 使用规则和Lombok一致 -->
<property
name=
"@AllArgsConstructor"
value=
"false"
/>
<property
name=
"@NoArgsConstructor"
value=
"false"
/>
</plugin>
<!-- 查询结果选择性返回插件 -->
<plugin
type=
"com.itfsw.mybatis.generator.plugins.SelectSelectivePlugin"
/>
<!-- Selective选择插入更新增强插件 -->
<plugin
type=
"com.itfsw.mybatis.generator.plugins.SelectiveEnhancedPlugin"
/>
<!-- 批量插入插件 -->
<plugin
type=
"com.itfsw.mybatis.generator.plugins.BatchInsertPlugin"
>
<!--
开启后可以实现官方插件根据属性是否为空决定是否插入该字段功能
!需开启allowMultiQueries=true多条sql提交操作,所以不建议使用!插件默认不开启
-->
<property
name=
"allowMultiQueries"
value=
"false"
/>
</plugin>
<!-- Example 目标包修改插件 -->
<plugin
type=
"com.itfsw.mybatis.generator.plugins.ExampleTargetPlugin"
>
<!-- 修改Example类生成到目标包下 -->
<property
name=
"targetPackage"
value=
"com.bailuntec.domain.example"
/>
</plugin>
<!-- Example Criteria 增强插件 -->
<plugin
type=
"com.itfsw.mybatis.generator.plugins.ExampleEnhancedPlugin"
>
<!-- 是否支持已经过时的andIf方法(推荐使用when代替),默认支持 -->
<property
name=
"enableAndIf"
value=
"true"
/>
</plugin>
<!-- MySQL分页插件 -->
<plugin
type=
"com.itfsw.mybatis.generator.plugins.LimitPlugin"
/>
<!-- 查询单条数据插件 -->
<plugin
type=
"com.itfsw.mybatis.generator.plugins.SelectOneByExamplePlugin"
/>
<!-- 注释 -->
<commentGenerator
>
<property
name=
"suppressAllComments"
value=
"false"
/>
<!-- 是否取消注释 -->
<property
name=
"suppressDate"
value=
"true"
/>
<!-- 是否生成注释代时间戳-->
</commentGenerator>
<!-- jdbc连接 -->
<jdbcConnection
driverClass=
"com.mysql.jdbc.Driver"
connectionURL=
"jdbc:mysql://gz-cdb-kp7s5i79.sql.tencentcdb.com:61691/bailun_datacenter?useUnicode=true&characterEncoding=utf-8"
userId=
"root"
password=
"#7kfnymAM$Y9-Ntf"
/>
<!-- 类型转换 -->
<javaTypeResolver
type=
"org.mybatis.generator.internal.types.JavaTypeResolverDefaultImpl"
>
<!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) -->
<property
name=
"forceBigDecimals"
value=
"true"
/>
<property
name=
"useJSR310Types"
value=
"true"
/>
</javaTypeResolver>
<!-- 生成实体类地址 -->
<javaModelGenerator
targetPackage=
"com.bailuntec.domain.entity"
targetProject=
"src/main/java"
>
<!-- 是否在当前路径下新加一层schema,eg:fase路径com.oop.eksp.user.model, true:com.oop.eksp.user.model.[schemaName] -->
<property
name=
"enableSubPackages"
value=
"false"
/>
<!-- 是否针对string类型的字段在set的时候进行trim调用 -->
<property
name=
"trimStrings"
value=
"true"
/>
</javaModelGenerator>
<!-- 生成mapxml文件 -->
<sqlMapGenerator
targetPackage=
"com.bailuntec.mapper"
targetProject=
"src/main/java"
>
<!-- 是否在当前路径下新加一层schema,eg:fase路径com.oop.eksp.user.model, true:com.oop.eksp.user.model.[schemaName] -->
<property
name=
"enableSubPackages"
value=
"false"
/>
</sqlMapGenerator>
<!-- 生成mapxml对应client,也就是接口dao -->
<javaClientGenerator
targetPackage=
"com.bailuntec.mapper"
targetProject=
"src/main/java"
type=
"XMLMAPPER"
>
<!-- 是否在当前路径下新加一层schema,eg:fase路径com.oop.eksp.user.model, true:com.oop.eksp.user.model.[schemaName] -->
<property
name=
"enableSubPackages"
value=
"false"
/>
</javaClientGenerator>
<!-- 配置表信息 domainObjectName="${}"-->
<table
schema=
"bailun_datacenter"
tableName=
"${table-name}"
enableCountByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
enableUpdateByExample=
"true"
>
<!-- schema即为数据库名 tableName为对应的数据库表 domainObjectName是要生成的实体类 enable*ByExample
是否生成 example类 -->
<!-- 忽略列,不生成bean 字段 -->
<!-- <ignoreColumn column="FRED" /> -->
<!-- 指定列的java数据类型 -->
<!-- <columnOverride column="LONG_VARCHAR_FIELD" jdbcType="VARCHAR" /> -->
<property
name=
"useActualColumnNames"
value=
"false"
/>
</table>
</context>
</generatorConfiguration>
data-common/src/main/resources/init.properties
0 → 100644
View file @
36818628
table-name
=
dc_auto_turnover
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
View file @
36818628
...
...
@@ -697,7 +697,7 @@ public class AutoTurnoverJob extends PointJob {
* Add by Allan at 2020-07-22 15:47
* 断货=前一天还有库存,但是今天库存为0了则是已经断货
* */
dcAutoTurnover
.
setIs
_out_s
tock
(
0
);
dcAutoTurnover
.
setIs
OutS
tock
(
0
);
dcAutoTurnover
.
setGmtModified
(
LocalDateTime
.
now
());
autoTurnoverService
.
setAutoTurnoverSaleDetails
(
dcAutoTurnover
);
...
...
data-show/show-auto-turnover/src/main/resources/job.properties
View file @
36818628
...
...
@@ -2,12 +2,12 @@
EVENT_RDB_STORAGE_URL
=
jdbc:mysql://gz-cdb-kp7s5i79.sql.tencentcdb.com:61691/bailun_datacenter?serverTimezone=GMT%2B8&characterEncoding=utf-8
#EVENT_RDB_STORAGE_USERNAME=root
#EVENT_RDB_STORAGE_PASSWORD=123456
ZOOKEEPER_SERVER
=
127.0.0.1:2181
#
ZOOKEEPER_SERVER=127.0.0.1:2181
EVENT_RDB_STORAGE_DRIVER
=
com.mysql.jdbc.Driver
#EVENT_RDB_STORAGE_URL=jdbc:mysql://10.0.8.15:3306/bailun_datacenter?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
EVENT_RDB_STORAGE_USERNAME
=
root
EVENT_RDB_STORAGE_PASSWORD
=
#7kfnymAM$Y9-Ntf
#
ZOOKEEPER_SERVER=172.31.255.120:2181
ZOOKEEPER_SERVER=172.31.255.120:2181
NAME_SPACE
=
data-center
JOB_NAME
=
show-auto-turnover
...
...
mybatis-generator/pom.xml
View file @
36818628
...
...
@@ -57,15 +57,15 @@
<encoding>
UTF-8
</encoding>
</configuration>
</plugin>
<plugin
>
<groupId>
org.mybatis.generator
</groupId
>
<artifactId>
mybatis-generator-maven-plugin
</artifactId
>
<version>
1.3.7
</version
>
<configuration
>
<verbose>
true
</verbose
>
<overwrite>
true
</overwrite
>
</configuration
>
</plugin
>
<!-- <plugin>--
>
<!-- <groupId>org.mybatis.generator</groupId>--
>
<!-- <artifactId>mybatis-generator-maven-plugin</artifactId>--
>
<!-- <version>1.3.7</version>--
>
<!-- <configuration>--
>
<!-- <verbose>true</verbose>--
>
<!-- <overwrite>true</overwrite>--
>
<!-- </configuration>--
>
<!-- </plugin>--
>
<!-- mybatis-generator 自动代码插件 -->
<plugin>
<groupId>
org.mybatis.generator
</groupId>
...
...
@@ -88,4 +88,4 @@
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
</project>
mybatis-generator/src/main/resources/generatorConfig.xml
View file @
36818628
...
...
@@ -11,7 +11,7 @@
<properties
resource=
"init.properties"
/>
<!-- 指定数据连接驱动jar地址 -->
<classPathEntry
location=
"
C:\Users\Worker\.m2\repository\mysql\mysql-connector-java\5.1.47\mysql-connector-java-5.1.47
.jar"
/>
<classPathEntry
location=
"
/Users/huluobin/Downloads/seata/lib/mysql-connector-java-5.1.30
.jar"
/>
<!-- 一个数据库一个context -->
<!--targetRuntime="MyBatis3Simple" 不生成Mapper-->
...
...
@@ -90,7 +90,7 @@
password=
"#7kfnymAM$Y9-Ntf"
/>
<!-- 类型转换 -->
<javaTypeResolver
type=
"org.mybatis.generator.internal.types.
My
JavaTypeResolverDefaultImpl"
>
<javaTypeResolver
type=
"org.mybatis.generator.internal.types.JavaTypeResolverDefaultImpl"
>
<!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) -->
<property
name=
"forceBigDecimals"
value=
"true"
/>
<property
name=
"useJSR310Types"
value=
"true"
/>
...
...
@@ -134,4 +134,4 @@
<property
name=
"useActualColumnNames"
value=
"false"
/>
</table>
</context>
</generatorConfiguration>
\ No newline at end of file
</generatorConfiguration>
mybatis-generator/src/main/resources/init.properties
View file @
36818628
table-name
=
dc_
base_stock_config_fba
table-name
=
dc_
auto_turnover
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