Commit 202d1425 authored by eddie.woo's avatar eddie.woo

modify

parent c36c4b45
......@@ -316,6 +316,12 @@
<artifactId>guava</artifactId>
<version>24.0-jre</version>
</dependency>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.6</version>
</dependency>
</dependencies>
<profiles>
......@@ -437,15 +443,15 @@
<version>3.4.0.905</version>
</plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</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.2</version>-->
<!--<configuration>-->
<!--<verbose>true</verbose>-->
<!--<overwrite>true</overwrite>-->
<!--</configuration>-->
<!--</plugin>-->
<!-- 资源文件拷贝插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......
package pwc.taxtech.atms.entitiy;
import java.util.Date;
public class BaseEntity {
private String createBy;
private String updateBy;
private Date createTime;
private Date updateTime;
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
......@@ -11,7 +11,7 @@ import java.util.Date;
*
* @mbg.generated do_not_delete_during_merge
*/
public class InputInvoice implements Serializable {
public class InputInvoice extends BaseEntity implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
......@@ -340,42 +340,6 @@ public class InputInvoice implements Serializable {
*/
private Integer status;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column input_invoice.create_by
*
* @mbg.generated
*/
private String createBy;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column input_invoice.update_by
*
* @mbg.generated
*/
private String updateBy;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column input_invoice.create_time
*
* @mbg.generated
*/
private Date createTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column input_invoice.update_time
*
* @mbg.generated
*/
private Date updateTime;
/**
* Database Column Remarks:
* 抵扣区间
......@@ -1208,102 +1172,6 @@ public class InputInvoice implements Serializable {
this.status = status;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_invoice.create_by
*
* @return the value of input_invoice.create_by
*
* @mbg.generated
*/
public String getCreateBy() {
return createBy;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column input_invoice.create_by
*
* @param createBy the value for input_invoice.create_by
*
* @mbg.generated
*/
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_invoice.update_by
*
* @return the value of input_invoice.update_by
*
* @mbg.generated
*/
public String getUpdateBy() {
return updateBy;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column input_invoice.update_by
*
* @param updateBy the value for input_invoice.update_by
*
* @mbg.generated
*/
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_invoice.create_time
*
* @return the value of input_invoice.create_time
*
* @mbg.generated
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column input_invoice.create_time
*
* @param createTime the value for input_invoice.create_time
*
* @mbg.generated
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_invoice.update_time
*
* @return the value of input_invoice.update_time
*
* @mbg.generated
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column input_invoice.update_time
*
* @param updateTime the value for input_invoice.update_time
*
* @mbg.generated
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_invoice.deductible_period
......@@ -1586,10 +1454,6 @@ public class InputInvoice implements Serializable {
sb.append(", staffId=").append(staffId);
sb.append(", orderIdentifier=").append(orderIdentifier);
sb.append(", status=").append(status);
sb.append(", createBy=").append(createBy);
sb.append(", updateBy=").append(updateBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", deductiblePeriod=").append(deductiblePeriod);
sb.append(", deductibleDate=").append(deductibleDate);
sb.append(", deductible=").append(deductible);
......
package pwc.taxtech.atms.common;
import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.internal.DefaultShellCallback;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class MyBatisGeneratorTest {
public void generator() throws Exception {
List<String> warnings = new ArrayList<>();
boolean overwrite = true;
//指定 逆向工程配置文件
File configFile = new File(this.getClass().getClassLoader().getResource("generatorConfig.xml").getPath());
ConfigurationParser cp = new ConfigurationParser(warnings);
Configuration config = cp.parseConfiguration(configFile);
DefaultShellCallback callback = new DefaultShellCallback(overwrite);
MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
myBatisGenerator.generate(null);
}
public static void main(String[] args) throws Exception {
try {
MyBatisGeneratorTest myBatisGeneratorTest = new MyBatisGeneratorTest();
myBatisGeneratorTest.generator();
} catch (Exception e) {
e.printStackTrace();
}
}
}
<?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>
<!-- See: http://www.mybatis.org/generator/configreference/commentGenerator.html -->
<!--<properties resource="generator.properties" />-->
<!-- <classPathEntry location="../hsqldb/hsqldb-2.3.5.jar" /> -->
<context id="contextId" targetRuntime="MyBatis3">
<!-- 考虑需要兼容DB2与ORCAL数据库, 大部份字段不需要加双引号,autoDelimitKeywords设置为false -->
<property name="autoDelimitKeywords" value="false" />
<property name="javaFileEncoding" value="UTF-8" />
<plugin type="org.mybatis.generator.plugins.MapperAnnotationPlugin" />
<plugin type="org.mybatis.generator.plugins.RowBoundsPlugin" />
<plugin type="org.mybatis.generator.plugins.ToStringPlugin" />
<plugin type="org.mybatis.generator.plugins.SerializablePlugin" />
<commentGenerator>
<property name="suppressDate" value="true" />
<property name="addRemarkComments" value="true" />
</commentGenerator>
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://10.157.107.89:3306/tax_longi?useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull&amp;allowMultiQueries=true"
userId="root" password="tax@Admin2018">
</jdbcConnection>
<javaTypeResolver>
<property name="forceBigDecimals" value="false" />
</javaTypeResolver>
<javaModelGenerator targetPackage="pwc.taxtech.atms.entitiy" targetProject="./src/main/java">
<property name="trimStrings" value="true" />
<property name="rootClass" value="pwc.taxtech.atms.entitiy.BaseEntity"/>
</javaModelGenerator>
<sqlMapGenerator targetPackage="pwc.taxtech.atms.dao" targetProject="./src/main/resources">
</sqlMapGenerator>
<javaClientGenerator type="XMLMAPPER" targetPackage="pwc.taxtech.atms.dao" targetProject="./src/main/java">
<property name="rootInterface" value="pwc.taxtech.atms.MyMapper" />
</javaClientGenerator>
<table tableName="input_invoice" domainObjectName="InputInvoice">
<property name="ignoreQualifiersAtRuntime" value="true"/>
<columnOverride column="invoice_type" javaType="java.lang.Integer"/>
<columnOverride column="upload_type" javaType="java.lang.Integer"/>
<columnOverride column="invoice_entity_type" javaType="java.lang.Integer"/>
<columnOverride column="invoice_source_type" javaType="java.lang.Integer"/>
<columnOverride column="status" javaType="java.lang.Integer"/>
<columnOverride column="deductible" javaType="java.lang.Boolean"/>
<columnOverride column="has_down_file" javaType="java.lang.Boolean"/>
<columnOverride column="verify_type" javaType="java.lang.Integer"/>
<columnOverride column="deductible_result" javaType="java.lang.Integer"/>
<columnOverride column="is_red_invoice" javaType="java.lang.Boolean"/>
</table>
</context>
</generatorConfiguration>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment