Explorar el Código

Merge branch 'release/1.5.0'

tianyunperfect hace 5 años
padre
commit
0d1598a12e

+ 1 - 0
README.md

@@ -5,6 +5,7 @@ springboot-web常用功能整合,包含常用功能。
 - 自动捕获web异常
 - controller Long 类型数据自动转换
 - docker启动脚本、sh启动脚本
+- 添加mybatis-generate
 
 工具类
 - json工具类

+ 14 - 1
app/pom.xml

@@ -63,9 +63,22 @@
             <version>3.3.7</version>
         </dependency>
 
+        <!--mybatis springboot自动配置-->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>1.1.1</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>mybatis</artifactId>
+                    <groupId>org.mybatis</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <!--dao层mybatis-->
         <dependency>
             <groupId>com.alvin</groupId>
-            <artifactId>common</artifactId>
+            <artifactId>dao</artifactId>
             <version>1.0-SNAPSHOT</version>
         </dependency>
     </dependencies>

+ 4 - 0
app/src/main/java/com/alvin/Application.java

@@ -1,10 +1,12 @@
 package com.alvin;
 
+import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.CommandLineRunner;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 
 @SpringBootApplication
+@MapperScan("com.alvin.dao.mapper")
 public class Application implements CommandLineRunner {
     public static void main(String[] args) {
         //日志异步
@@ -12,6 +14,8 @@ public class Application implements CommandLineRunner {
         SpringApplication.run(Application.class, args);
     }
 
+
+
     @Override
     public void run(String... args) throws Exception {
         System.out.println("启动成功");

+ 1 - 0
app/src/main/java/com/alvin/controller/AppController.java

@@ -14,6 +14,7 @@ import java.util.Collections;
 @RestController
 @RequestMapping("/user")
 public class AppController {
+
     /**
      * 找到一个
      *

+ 42 - 1
app/src/main/resources/application-dev.yml

@@ -1,2 +1,43 @@
 server:
-  port: 8080
+  port: 8080
+
+spring:
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://ip-191:3306/biaozhu_medical_kg?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC
+    username: xxx
+    password: xxx
+    #下面为连接池补充设置
+    initialSize: 5
+    # 配置获取连接等待超时的时间
+    maxWait: 60000
+    # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+    timeBetweenEvictionRunsMillis: 60000
+    # 配置一个连接在池中最小生存的时间,单位是毫秒
+    minEvictableIdleTimeMillis: 300000
+    validationQuery: SELECT 1 FROM DUAL
+    testWhileIdle: true
+    testOnBorrow: false
+    testOnReturn: false
+    # 打开PSCache,并且指定每个连接上PSCache的大小
+    poolPreparedStatements: true
+    # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+    filters: stat,wall
+    # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+    connectionProperties: config.stat.mergeSql=true;config.stat.slowSqlMillis=5000
+    # 合并多个DruidDataSource的监控数据
+    useGlobalDataSourceStat: true
+
+
+mybatis:
+  type-aliases-package: com.alvin.dao.entity
+  mapper-locations: classpath:mapper/*Mapper.xml
+
+
+# 设置debug模式下打印mysql
+logging:
+  level:
+    com:
+      alvin:
+        mapper: debug

+ 34 - 1
app/src/main/resources/application-prod.yml

@@ -1,2 +1,35 @@
 server:
-  port: 8080
+  port: 8080
+
+spring:
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://127.0.0.1:3306/user?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC
+    username:
+    password:
+    #下面为连接池补充设置
+    initialSize: 5
+    # 配置获取连接等待超时的时间
+    maxWait: 60000
+    # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+    timeBetweenEvictionRunsMillis: 60000
+    # 配置一个连接在池中最小生存的时间,单位是毫秒
+    minEvictableIdleTimeMillis: 300000
+    validationQuery: SELECT 1 FROM DUAL
+    testWhileIdle: true
+    testOnBorrow: false
+    testOnReturn: false
+    # 打开PSCache,并且指定每个连接上PSCache的大小
+    poolPreparedStatements: true
+    # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+    filters: stat,wall
+    # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+    connectionProperties: config.stat.mergeSql=true;config.stat.slowSqlMillis=5000
+    # 合并多个DruidDataSource的监控数据
+    useGlobalDataSourceStat: true
+
+
+mybatis:
+  type-aliases-package: com.alvin.dao.entity
+  mapper-locations: classpath:mapper/*Mapper.xml

+ 18 - 0
common/pom.xml

@@ -36,5 +36,23 @@
             <artifactId>commons-lang3</artifactId>
             <version>3.8</version>
         </dependency>
+
+        <!--httpClient-->
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.5.3</version>
+        </dependency>
+        <!--email-->
+        <dependency>
+            <groupId>javax.mail</groupId>
+            <artifactId>javax.mail-api</artifactId>
+            <version>1.6.2</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.mail</groupId>
+            <artifactId>javax.mail</artifactId>
+            <version>1.6.2</version>
+        </dependency>
     </dependencies>
 </project>

+ 4 - 0
common/src/main/java/com/alvin/common/util/EmailUtil.java

@@ -0,0 +1,4 @@
+package com.alvin.common.util;
+
+public class EmailUtil {
+}

+ 78 - 0
dao/pom.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>springboot-parent</artifactId>
+        <groupId>com.alvin</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>dao</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+        <!--common-->
+        <dependency>
+            <groupId>com.alvin</groupId>
+            <artifactId>common</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+        <!--mysql-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+            <version>1.0.26</version>
+        </dependency>
+
+        <!--mybatis-generate-->
+        <dependency>
+            <groupId>org.mybatis.generator</groupId>
+            <artifactId>mybatis-generator-core</artifactId>
+            <version>1.3.7</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis</groupId>
+            <artifactId>mybatis</artifactId>
+            <version>3.5.3</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <!--mybatis.generator maven插件-->
+            <plugin>
+                <groupId>org.mybatis.generator</groupId>
+                <artifactId>mybatis-generator-maven-plugin</artifactId>
+                <version>1.3.7</version>
+
+                <configuration>
+                    <configurationFile>src/main/resources/mybatis-generator.xml</configurationFile>
+                    <overwrite>true</overwrite>
+                </configuration>
+
+                <dependencies>
+                    <dependency>
+                        <groupId>mysql</groupId>
+                        <artifactId>mysql-connector-java</artifactId>
+                        <version>8.0.12</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>com.itfsw</groupId>
+                        <artifactId>mybatis-generator-plugin</artifactId>
+                        <version>1.3.7</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 403 - 0
dao/src/main/java/com/alvin/dao/entity/Similar.java

@@ -0,0 +1,403 @@
+package com.alvin.dao.entity;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import lombok.Data;
+
+@Data
+public class Similar implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column similar.id
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    private Long id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column similar.file_name
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    private String fileName;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column similar.line_num
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    private Integer lineNum;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column similar.txt
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    private String txt;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column similar.similar_txt
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    private String similarTxt;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column similar.commit_time
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    private Date commitTime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column similar.txt_option
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    private String txtOption;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public static Similar.Builder builder() {
+        return new Similar.Builder();
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public static class Builder {
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        private Similar obj;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public Builder() {
+            this.obj = new Similar();
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column similar.id
+         *
+         * @param id the value for similar.id
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public Builder id(Long id) {
+            obj.setId(id);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column similar.file_name
+         *
+         * @param fileName the value for similar.file_name
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public Builder fileName(String fileName) {
+            obj.setFileName(fileName);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column similar.line_num
+         *
+         * @param lineNum the value for similar.line_num
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public Builder lineNum(Integer lineNum) {
+            obj.setLineNum(lineNum);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column similar.txt
+         *
+         * @param txt the value for similar.txt
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public Builder txt(String txt) {
+            obj.setTxt(txt);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column similar.txt_option
+         *
+         * @param txtOption the value for similar.txt_option
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public Builder txtOption(String txtOption) {
+            obj.setTxtOption(txtOption);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column similar.similar_txt
+         *
+         * @param similarTxt the value for similar.similar_txt
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public Builder similarTxt(String similarTxt) {
+            obj.setSimilarTxt(similarTxt);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method sets the value of the database column similar.commit_time
+         *
+         * @param commitTime the value for similar.commit_time
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public Builder commitTime(Date commitTime) {
+            obj.setCommitTime(commitTime);
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public Similar build() {
+            return this.obj;
+        }
+    }
+
+    /**
+     * This enum was generated by MyBatis Generator.
+     * This enum corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public enum Column {
+        id("id", "id", "BIGINT", false),
+        fileName("file_name", "fileName", "VARCHAR", false),
+        lineNum("line_num", "lineNum", "INTEGER", false),
+        txt("txt", "txt", "VARCHAR", false),
+        similarTxt("similar_txt", "similarTxt", "VARCHAR", false),
+        commitTime("commit_time", "commitTime", "TIMESTAMP", false),
+        txtOption("txt_option", "txtOption", "VARCHAR", false);
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        private static final String BEGINNING_DELIMITER = "\"";
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        private static final String ENDING_DELIMITER = "\"";
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        private final String column;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        private final boolean isColumnNameDelimited;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        private final String javaProperty;
+
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        private final String jdbcType;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public String value() {
+            return this.column;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public String getValue() {
+            return this.column;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public String getJavaProperty() {
+            return this.javaProperty;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public String getJdbcType() {
+            return this.jdbcType;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
+            this.column = column;
+            this.javaProperty = javaProperty;
+            this.jdbcType = jdbcType;
+            this.isColumnNameDelimited = isColumnNameDelimited;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public String desc() {
+            return this.getEscapedColumnName() + " DESC";
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public String asc() {
+            return this.getEscapedColumnName() + " ASC";
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public static Column[] excludes(Column ... excludes) {
+            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
+            if (excludes != null && excludes.length > 0) {
+                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
+            }
+            return columns.toArray(new Column[]{});
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public static Column[] all() {
+            return Column.values();
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public String getEscapedColumnName() {
+            if (this.isColumnNameDelimited) {
+                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
+            } else {
+                return this.column;
+            }
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public String getAliasedEscapedColumnName() {
+            return this.getEscapedColumnName();
+        }
+    }
+}

+ 1232 - 0
dao/src/main/java/com/alvin/dao/entity/example/SimilarExample.java

@@ -0,0 +1,1232 @@
+package com.alvin.dao.entity.example;
+
+import com.alvin.dao.entity.Similar;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class SimilarExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    protected Integer offset;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    protected Integer rows;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public SimilarExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public SimilarExample orderBy(String orderByClause) {
+        this.setOrderByClause(orderByClause);
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public SimilarExample orderBy(String ... orderByClauses) {
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < orderByClauses.length; i++) {
+            sb.append(orderByClauses[i]);
+            if (i < orderByClauses.length - 1) {
+                sb.append(" , ");
+            }
+        }
+        this.setOrderByClause(sb.toString());
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria(this);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+        rows = null;
+        offset = null;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public void setOffset(Integer offset) {
+        this.offset = offset;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public Integer getOffset() {
+        return this.offset;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public void setRows(Integer rows) {
+        this.rows = rows;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public Integer getRows() {
+        return this.rows;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public SimilarExample limit(Integer rows) {
+        this.rows = rows;
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public SimilarExample limit(Integer offset, Integer rows) {
+        this.offset = offset;
+        this.rows = rows;
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public SimilarExample page(Integer page, Integer pageSize) {
+        this.offset = page * pageSize;
+        this.rows = pageSize;
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public static Criteria newAndCreateCriteria() {
+        SimilarExample example = new SimilarExample();
+        return example.createCriteria();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public SimilarExample when(boolean condition, IExampleWhen then) {
+        if (condition) {
+            then.example(this);
+        }
+        return this;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public SimilarExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
+        if (condition) {
+            then.example(this);
+        } else {
+            otherwise.example(this);
+        }
+        return this;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameIsNull() {
+            addCriterion("file_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameIsNotNull() {
+            addCriterion("file_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameEqualTo(String value) {
+            addCriterion("file_name =", value, "fileName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("file_name = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameNotEqualTo(String value) {
+            addCriterion("file_name <>", value, "fileName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameNotEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("file_name <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameGreaterThan(String value) {
+            addCriterion("file_name >", value, "fileName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameGreaterThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("file_name > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameGreaterThanOrEqualTo(String value) {
+            addCriterion("file_name >=", value, "fileName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameGreaterThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("file_name >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameLessThan(String value) {
+            addCriterion("file_name <", value, "fileName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameLessThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("file_name < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameLessThanOrEqualTo(String value) {
+            addCriterion("file_name <=", value, "fileName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameLessThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("file_name <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameLike(String value) {
+            addCriterion("file_name like", value, "fileName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameNotLike(String value) {
+            addCriterion("file_name not like", value, "fileName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameIn(List<String> values) {
+            addCriterion("file_name in", values, "fileName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameNotIn(List<String> values) {
+            addCriterion("file_name not in", values, "fileName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameBetween(String value1, String value2) {
+            addCriterion("file_name between", value1, value2, "fileName");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileNameNotBetween(String value1, String value2) {
+            addCriterion("file_name not between", value1, value2, "fileName");
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumIsNull() {
+            addCriterion("line_num is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumIsNotNull() {
+            addCriterion("line_num is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumEqualTo(Integer value) {
+            addCriterion("line_num =", value, "lineNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("line_num = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumNotEqualTo(Integer value) {
+            addCriterion("line_num <>", value, "lineNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumNotEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("line_num <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumGreaterThan(Integer value) {
+            addCriterion("line_num >", value, "lineNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumGreaterThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("line_num > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumGreaterThanOrEqualTo(Integer value) {
+            addCriterion("line_num >=", value, "lineNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumGreaterThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("line_num >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumLessThan(Integer value) {
+            addCriterion("line_num <", value, "lineNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumLessThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("line_num < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumLessThanOrEqualTo(Integer value) {
+            addCriterion("line_num <=", value, "lineNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumLessThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("line_num <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumIn(List<Integer> values) {
+            addCriterion("line_num in", values, "lineNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumNotIn(List<Integer> values) {
+            addCriterion("line_num not in", values, "lineNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumBetween(Integer value1, Integer value2) {
+            addCriterion("line_num between", value1, value2, "lineNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andLineNumNotBetween(Integer value1, Integer value2) {
+            addCriterion("line_num not between", value1, value2, "lineNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtIsNull() {
+            addCriterion("txt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtIsNotNull() {
+            addCriterion("txt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtEqualTo(String value) {
+            addCriterion("txt =", value, "txt");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("txt = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtNotEqualTo(String value) {
+            addCriterion("txt <>", value, "txt");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtNotEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("txt <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtGreaterThan(String value) {
+            addCriterion("txt >", value, "txt");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtGreaterThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("txt > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtGreaterThanOrEqualTo(String value) {
+            addCriterion("txt >=", value, "txt");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtGreaterThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("txt >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtLessThan(String value) {
+            addCriterion("txt <", value, "txt");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtLessThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("txt < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtLessThanOrEqualTo(String value) {
+            addCriterion("txt <=", value, "txt");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtLessThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("txt <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtLike(String value) {
+            addCriterion("txt like", value, "txt");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtNotLike(String value) {
+            addCriterion("txt not like", value, "txt");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtIn(List<String> values) {
+            addCriterion("txt in", values, "txt");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtNotIn(List<String> values) {
+            addCriterion("txt not in", values, "txt");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtBetween(String value1, String value2) {
+            addCriterion("txt between", value1, value2, "txt");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtNotBetween(String value1, String value2) {
+            addCriterion("txt not between", value1, value2, "txt");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtIsNull() {
+            addCriterion("similar_txt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtIsNotNull() {
+            addCriterion("similar_txt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtEqualTo(String value) {
+            addCriterion("similar_txt =", value, "similarTxt");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("similar_txt = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtNotEqualTo(String value) {
+            addCriterion("similar_txt <>", value, "similarTxt");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtNotEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("similar_txt <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtGreaterThan(String value) {
+            addCriterion("similar_txt >", value, "similarTxt");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtGreaterThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("similar_txt > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtGreaterThanOrEqualTo(String value) {
+            addCriterion("similar_txt >=", value, "similarTxt");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtGreaterThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("similar_txt >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtLessThan(String value) {
+            addCriterion("similar_txt <", value, "similarTxt");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtLessThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("similar_txt < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtLessThanOrEqualTo(String value) {
+            addCriterion("similar_txt <=", value, "similarTxt");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtLessThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("similar_txt <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtLike(String value) {
+            addCriterion("similar_txt like", value, "similarTxt");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtNotLike(String value) {
+            addCriterion("similar_txt not like", value, "similarTxt");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtIn(List<String> values) {
+            addCriterion("similar_txt in", values, "similarTxt");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtNotIn(List<String> values) {
+            addCriterion("similar_txt not in", values, "similarTxt");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtBetween(String value1, String value2) {
+            addCriterion("similar_txt between", value1, value2, "similarTxt");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarTxtNotBetween(String value1, String value2) {
+            addCriterion("similar_txt not between", value1, value2, "similarTxt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeIsNull() {
+            addCriterion("commit_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeIsNotNull() {
+            addCriterion("commit_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeEqualTo(Date value) {
+            addCriterion("commit_time =", value, "commitTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("commit_time = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeNotEqualTo(Date value) {
+            addCriterion("commit_time <>", value, "commitTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeNotEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("commit_time <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeGreaterThan(Date value) {
+            addCriterion("commit_time >", value, "commitTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeGreaterThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("commit_time > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("commit_time >=", value, "commitTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeGreaterThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("commit_time >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeLessThan(Date value) {
+            addCriterion("commit_time <", value, "commitTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeLessThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("commit_time < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeLessThanOrEqualTo(Date value) {
+            addCriterion("commit_time <=", value, "commitTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeLessThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("commit_time <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeIn(List<Date> values) {
+            addCriterion("commit_time in", values, "commitTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeNotIn(List<Date> values) {
+            addCriterion("commit_time not in", values, "commitTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeBetween(Date value1, Date value2) {
+            addCriterion("commit_time between", value1, value2, "commitTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCommitTimeNotBetween(Date value1, Date value2) {
+            addCriterion("commit_time not between", value1, value2, "commitTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionIsNull() {
+            addCriterion("txt_option is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionIsNotNull() {
+            addCriterion("txt_option is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionEqualTo(String value) {
+            addCriterion("txt_option =", value, "txtOption");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("txt_option = ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionNotEqualTo(String value) {
+            addCriterion("txt_option <>", value, "txtOption");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionNotEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("txt_option <> ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionGreaterThan(String value) {
+            addCriterion("txt_option >", value, "txtOption");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionGreaterThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("txt_option > ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionGreaterThanOrEqualTo(String value) {
+            addCriterion("txt_option >=", value, "txtOption");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionGreaterThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("txt_option >= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionLessThan(String value) {
+            addCriterion("txt_option <", value, "txtOption");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionLessThanColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("txt_option < ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionLessThanOrEqualTo(String value) {
+            addCriterion("txt_option <=", value, "txtOption");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionLessThanOrEqualToColumn(Similar.Column column) {
+            addCriterion(new StringBuilder("txt_option <= ").append(column.getEscapedColumnName()).toString());
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionLike(String value) {
+            addCriterion("txt_option like", value, "txtOption");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionNotLike(String value) {
+            addCriterion("txt_option not like", value, "txtOption");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionIn(List<String> values) {
+            addCriterion("txt_option in", values, "txtOption");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionNotIn(List<String> values) {
+            addCriterion("txt_option not in", values, "txtOption");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionBetween(String value1, String value2) {
+            addCriterion("txt_option between", value1, value2, "txtOption");
+            return (Criteria) this;
+        }
+
+        public Criteria andTxtOptionNotBetween(String value1, String value2) {
+            addCriterion("txt_option not between", value1, value2, "txtOption");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table similar
+     *
+     * @mbg.generated do_not_delete_during_merge Wed May 27 15:17:38 CST 2020
+     */
+    public static class Criteria extends GeneratedCriteria {
+        /**
+         * This field was generated by MyBatis Generator.
+         * This field corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        private SimilarExample example;
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        protected Criteria(SimilarExample example) {
+            super();
+            this.example = example;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public SimilarExample example() {
+            return this.example;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        @Deprecated
+        public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
+            if (ifAdd) {
+                add.add(this);
+            }
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public Criteria when(boolean condition, ICriteriaWhen then) {
+            if (condition) {
+                then.criteria(this);
+            }
+            return this;
+        }
+
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
+            if (condition) {
+                then.criteria(this);
+            } else {
+                otherwise.criteria(this);
+            }
+            return this;
+        }
+
+        @Deprecated
+        public interface ICriteriaAdd {
+            /**
+             * This method was generated by MyBatis Generator.
+             * This method corresponds to the database table similar
+             *
+             * @mbg.generated Wed May 27 15:17:38 CST 2020
+             */
+            Criteria add(Criteria add);
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+
+    public interface ICriteriaWhen {
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        void criteria(Criteria criteria);
+    }
+
+    public interface IExampleWhen {
+        /**
+         * This method was generated by MyBatis Generator.
+         * This method corresponds to the database table similar
+         *
+         * @mbg.generated Wed May 27 15:17:38 CST 2020
+         */
+        void example(com.alvin.dao.entity.example.SimilarExample example);
+    }
+}

+ 125 - 0
dao/src/main/java/com/alvin/dao/mapper/SimilarMapper.java

@@ -0,0 +1,125 @@
+package com.alvin.dao.mapper;
+
+import com.alvin.dao.entity.Similar;
+import com.alvin.dao.entity.example.SimilarExample;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Mapper
+@Repository
+public interface SimilarMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    long countByExample(SimilarExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    int deleteByExample(SimilarExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    int insert(Similar record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    int insertSelective(@Param("record") Similar record, @Param("selective") Similar.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    Similar selectOneByExample(SimilarExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    Similar selectOneByExampleSelective(@Param("example") SimilarExample example, @Param("selective") Similar.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    List<Similar> selectByExampleSelective(@Param("example") SimilarExample example, @Param("selective") Similar.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    List<Similar> selectByExample(SimilarExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    int updateByExampleSelective(@Param("record") Similar record, @Param("example") SimilarExample example, @Param("selective") Similar.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    int updateByExample(@Param("record") Similar record, @Param("example") SimilarExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    int batchInsert(@Param("list") List<Similar> list);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    int batchInsertSelective(@Param("list") List<Similar> list, @Param("selective") Similar.Column ... selective);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    int upsert(Similar record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table similar
+     *
+     * @mbg.generated Wed May 27 15:17:38 CST 2020
+     */
+    int upsertSelective(@Param("record") Similar record, @Param("selective") Similar.Column ... selective);
+}

+ 554 - 0
dao/src/main/resources/mapper/SimilarMapper.xml

@@ -0,0 +1,554 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.alvin.dao.mapper.SimilarMapper">
+  <resultMap id="BaseResultMap" type="com.alvin.dao.entity.Similar">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    <result column="id" jdbcType="BIGINT" property="id" />
+    <result column="file_name" jdbcType="VARCHAR" property="fileName" />
+    <result column="line_num" jdbcType="INTEGER" property="lineNum" />
+    <result column="txt" jdbcType="VARCHAR" property="txt" />
+    <result column="similar_txt" jdbcType="VARCHAR" property="similarTxt" />
+    <result column="commit_time" jdbcType="TIMESTAMP" property="commitTime" />
+    <result column="txt_option" jdbcType="VARCHAR" property="txtOption" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    id, file_name, line_num, txt, similar_txt, commit_time, txt_option
+  </sql>
+  <select id="selectByExample" parameterType="com.alvin.dao.entity.example.SimilarExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from similar
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="rows != null">
+      <if test="offset != null">
+        limit ${offset}, ${rows}
+      </if>
+      <if test="offset == null">
+        limit ${rows}
+      </if>
+    </if>
+  </select>
+  <select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    select
+    <if test="example != null and example.distinct">
+      distinct
+    </if>
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.aliasedEscapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <include refid="Base_Column_List" />
+      </otherwise>
+    </choose>
+    from similar
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+    <if test="example != null and example.orderByClause != null">
+      order by ${example.orderByClause}
+    </if>
+    <if test="example != null and example.rows != null">
+      <if test="example.offset != null">
+        limit ${example.offset}, ${example.rows}
+      </if>
+      <if test="example.offset == null">
+        limit ${example.rows}
+      </if>
+    </if>
+  </select>
+  <delete id="deleteByExample" parameterType="com.alvin.dao.entity.example.SimilarExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    delete from similar
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.alvin.dao.entity.Similar">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    insert into similar (id, file_name, line_num, 
+      txt, similar_txt, commit_time, 
+      txt_option)
+    values (#{id,jdbcType=BIGINT}, #{fileName,jdbcType=VARCHAR}, #{lineNum,jdbcType=INTEGER}, 
+      #{txt,jdbcType=VARCHAR}, #{similarTxt,jdbcType=VARCHAR}, #{commitTime,jdbcType=TIMESTAMP}, 
+      #{txtOption,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    insert into similar
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          ${column.escapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.id != null">
+            id,
+          </if>
+          <if test="record.fileName != null">
+            file_name,
+          </if>
+          <if test="record.lineNum != null">
+            line_num,
+          </if>
+          <if test="record.txt != null">
+            txt,
+          </if>
+          <if test="record.similarTxt != null">
+            similar_txt,
+          </if>
+          <if test="record.commitTime != null">
+            commit_time,
+          </if>
+          <if test="record.txtOption != null">
+            txt_option,
+          </if>
+        </trim>
+        <trim prefix="(" suffix=")" suffixOverrides="," />
+      </otherwise>
+    </choose>
+    values
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.id != null">
+            #{record.id,jdbcType=BIGINT},
+          </if>
+          <if test="record.fileName != null">
+            #{record.fileName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.lineNum != null">
+            #{record.lineNum,jdbcType=INTEGER},
+          </if>
+          <if test="record.txt != null">
+            #{record.txt,jdbcType=VARCHAR},
+          </if>
+          <if test="record.similarTxt != null">
+            #{record.similarTxt,jdbcType=VARCHAR},
+          </if>
+          <if test="record.commitTime != null">
+            #{record.commitTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.txtOption != null">
+            #{record.txtOption,jdbcType=VARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+  </insert>
+  <select id="countByExample" parameterType="com.alvin.dao.entity.example.SimilarExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    select count(*) from similar
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    update similar
+    SET
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim suffixOverrides=",">
+          <if test="record.id != null">
+            id = #{record.id,jdbcType=BIGINT},
+          </if>
+          <if test="record.fileName != null">
+            file_name = #{record.fileName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.lineNum != null">
+            line_num = #{record.lineNum,jdbcType=INTEGER},
+          </if>
+          <if test="record.txt != null">
+            txt = #{record.txt,jdbcType=VARCHAR},
+          </if>
+          <if test="record.similarTxt != null">
+            similar_txt = #{record.similarTxt,jdbcType=VARCHAR},
+          </if>
+          <if test="record.commitTime != null">
+            commit_time = #{record.commitTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.txtOption != null">
+            txt_option = #{record.txtOption,jdbcType=VARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    update similar
+    set id = #{record.id,jdbcType=BIGINT},
+      file_name = #{record.fileName,jdbcType=VARCHAR},
+      line_num = #{record.lineNum,jdbcType=INTEGER},
+      txt = #{record.txt,jdbcType=VARCHAR},
+      similar_txt = #{record.similarTxt,jdbcType=VARCHAR},
+      commit_time = #{record.commitTime,jdbcType=TIMESTAMP},
+      txt_option = #{record.txtOption,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <select id="selectOneByExample" parameterType="com.alvin.dao.entity.example.SimilarExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    select
+    <include refid="Base_Column_List" />
+    from similar
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    limit 1
+  </select>
+  <select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    select
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.aliasedEscapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <include refid="Base_Column_List" />
+      </otherwise>
+    </choose>
+    from similar
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+    <if test="example != null and example.orderByClause != null">
+      order by ${example.orderByClause}
+    </if>
+    limit 1
+  </select>
+  <insert id="batchInsert" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    insert into similar
+    (id, file_name, line_num, txt, similar_txt, commit_time, txt_option)
+    values
+    <foreach collection="list" item="item" separator=",">
+      (#{item.id,jdbcType=BIGINT}, #{item.fileName,jdbcType=VARCHAR}, #{item.lineNum,jdbcType=INTEGER}, 
+        #{item.txt,jdbcType=VARCHAR}, #{item.similarTxt,jdbcType=VARCHAR}, #{item.commitTime,jdbcType=TIMESTAMP}, 
+        #{item.txtOption,jdbcType=VARCHAR})
+    </foreach>
+  </insert>
+  <insert id="batchInsertSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    insert into similar (
+    <foreach collection="selective" item="column" separator=",">
+      ${column.escapedColumnName}
+    </foreach>
+    )
+    values
+    <foreach collection="list" item="item" separator=",">
+      (
+      <foreach collection="selective" item="column" separator=",">
+        <if test="'id'.toString() == column.value">
+          #{item.id,jdbcType=BIGINT}
+        </if>
+        <if test="'file_name'.toString() == column.value">
+          #{item.fileName,jdbcType=VARCHAR}
+        </if>
+        <if test="'line_num'.toString() == column.value">
+          #{item.lineNum,jdbcType=INTEGER}
+        </if>
+        <if test="'txt'.toString() == column.value">
+          #{item.txt,jdbcType=VARCHAR}
+        </if>
+        <if test="'similar_txt'.toString() == column.value">
+          #{item.similarTxt,jdbcType=VARCHAR}
+        </if>
+        <if test="'commit_time'.toString() == column.value">
+          #{item.commitTime,jdbcType=TIMESTAMP}
+        </if>
+        <if test="'txt_option'.toString() == column.value">
+          #{item.txtOption,jdbcType=VARCHAR}
+        </if>
+      </foreach>
+      )
+    </foreach>
+  </insert>
+  <insert id="upsertSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    insert into similar
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          ${column.escapedColumnName}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.id != null">
+            id,
+          </if>
+          <if test="record.fileName != null">
+            file_name,
+          </if>
+          <if test="record.lineNum != null">
+            line_num,
+          </if>
+          <if test="record.txt != null">
+            txt,
+          </if>
+          <if test="record.similarTxt != null">
+            similar_txt,
+          </if>
+          <if test="record.commitTime != null">
+            commit_time,
+          </if>
+          <if test="record.txtOption != null">
+            txt_option,
+          </if>
+        </trim>
+        <trim prefix="(" suffix=")" suffixOverrides="," />
+      </otherwise>
+    </choose>
+    values
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach close=")" collection="selective" item="column" open="(" separator=",">
+          #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+          <if test="record.id != null">
+            #{record.id,jdbcType=BIGINT},
+          </if>
+          <if test="record.fileName != null">
+            #{record.fileName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.lineNum != null">
+            #{record.lineNum,jdbcType=INTEGER},
+          </if>
+          <if test="record.txt != null">
+            #{record.txt,jdbcType=VARCHAR},
+          </if>
+          <if test="record.similarTxt != null">
+            #{record.similarTxt,jdbcType=VARCHAR},
+          </if>
+          <if test="record.commitTime != null">
+            #{record.commitTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.txtOption != null">
+            #{record.txtOption,jdbcType=VARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+    on duplicate key update 
+    <choose>
+      <when test="selective != null and selective.length &gt; 0">
+        <foreach collection="selective" item="column" separator=",">
+          ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
+        </foreach>
+      </when>
+      <otherwise>
+        <trim suffixOverrides=",">
+          <if test="record.id != null">
+            id = #{record.id,jdbcType=BIGINT},
+          </if>
+          <if test="record.fileName != null">
+            file_name = #{record.fileName,jdbcType=VARCHAR},
+          </if>
+          <if test="record.lineNum != null">
+            line_num = #{record.lineNum,jdbcType=INTEGER},
+          </if>
+          <if test="record.txt != null">
+            txt = #{record.txt,jdbcType=VARCHAR},
+          </if>
+          <if test="record.similarTxt != null">
+            similar_txt = #{record.similarTxt,jdbcType=VARCHAR},
+          </if>
+          <if test="record.commitTime != null">
+            commit_time = #{record.commitTime,jdbcType=TIMESTAMP},
+          </if>
+          <if test="record.txtOption != null">
+            txt_option = #{record.txtOption,jdbcType=VARCHAR},
+          </if>
+        </trim>
+      </otherwise>
+    </choose>
+  </insert>
+  <insert id="upsert" parameterType="com.alvin.dao.entity.Similar">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed May 27 15:17:38 CST 2020.
+    -->
+    insert into similar
+    (id, file_name, line_num, txt, similar_txt, commit_time, txt_option)
+    values
+    (#{id,jdbcType=BIGINT}, #{fileName,jdbcType=VARCHAR}, #{lineNum,jdbcType=INTEGER}, 
+      #{txt,jdbcType=VARCHAR}, #{similarTxt,jdbcType=VARCHAR}, #{commitTime,jdbcType=TIMESTAMP}, 
+      #{txtOption,jdbcType=VARCHAR})
+    on duplicate key update 
+    id = #{id,jdbcType=BIGINT}, 
+    file_name = #{fileName,jdbcType=VARCHAR}, 
+    line_num = #{lineNum,jdbcType=INTEGER}, 
+    txt = #{txt,jdbcType=VARCHAR}, 
+    similar_txt = #{similarTxt,jdbcType=VARCHAR}, 
+    commit_time = #{commitTime,jdbcType=TIMESTAMP}, 
+    txt_option = #{txtOption,jdbcType=VARCHAR}
+  </insert>
+</mapper>

+ 126 - 0
dao/src/main/resources/mybatis-generator.xml

@@ -0,0 +1,126 @@
+<?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>
+
+    <context id="MySql" defaultModelType="flat">
+
+        <!--搜索:need to change-->
+
+        <!-- 查询单条数据插件 -->
+        <plugin type="com.itfsw.mybatis.generator.plugins.SelectOneByExamplePlugin"/>
+
+        <!-- MySQL分页插件 -->
+        <plugin type="com.itfsw.mybatis.generator.plugins.LimitPlugin">
+            <!-- 通过配置startPage影响Example中的page方法开始分页的页码,默认分页从0开始 -->
+            <property name="startPage" value="0"/>
+        </plugin>
+
+        <!-- Example Criteria 增强插件 -->
+        <plugin type="com.itfsw.mybatis.generator.plugins.ExampleEnhancedPlugin">
+            <!-- 是否支持已经过时的andIf方法(推荐使用when代替),默认支持 -->
+            <property name="enableAndIf" value="true"/>
+        </plugin>
+
+        <!-- Example 目标包修改插件 need to change-->
+        <plugin type="com.itfsw.mybatis.generator.plugins.ExampleTargetPlugin">
+            <!-- 修改Example类生成到目标包下 -->
+            <property name="targetPackage" value="com.alvin.dao.entity.example"/>
+        </plugin>
+
+        <!-- 数据Model属性对应Column获取插件 -->
+        <plugin type="com.itfsw.mybatis.generator.plugins.ModelColumnPlugin"/>
+
+        <!-- 数据Model链式构建插件 -->
+        <plugin type="com.itfsw.mybatis.generator.plugins.ModelBuilderPlugin"/>
+
+        <!-- 批量插入插件 -->
+        <plugin type="com.itfsw.mybatis.generator.plugins.BatchInsertPlugin">
+            <!--
+            开启后可以实现官方插件根据属性是否为空决定是否插入该字段功能
+            !需开启allowMultiQueries=true多条sql提交操作,所以不建议使用!插件默认不开启
+            -->
+            <property name="allowMultiQueries" value="false"/>
+        </plugin>
+
+        <!-- 存在即更新插件 -->
+        <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.IncrementPlugin"/>
+
+        <!--<table tableName="tb">-->
+        <!--&lt;!&ndash; 配置需要进行增量操作的列名称(英文半角逗号分隔) &ndash;&gt;-->
+        <!--<property name="incrementColumns" value="field1,field2"/>-->
+        <!--</table>-->
+
+        <!-- 查询结果选择性返回插件 -->
+        <plugin type="com.itfsw.mybatis.generator.plugins.SelectSelectivePlugin"/>
+
+        <!-- Selective选择插入更新增强插件 -->
+        <plugin type="com.itfsw.mybatis.generator.plugins.SelectiveEnhancedPlugin"/>
+
+        <!-- Lombok插件 -->
+        <plugin type="com.itfsw.mybatis.generator.plugins.LombokPlugin">
+            <!-- @Data 默认开启,同时插件会对子类自动附加@EqualsAndHashCode(callSuper = true),@ToString(callSuper = true) -->
+            <property name="@Data" value="true"/>
+            <!-- @Builder 必须在 Lombok 版本 >= 1.18.2 的情况下开启,对存在继承关系的类自动替换成@SuperBuilder -->
+            <property name="@Builder" value="false"/>
+            <!-- @NoArgsConstructor 和 @AllArgsConstructor 使用规则和Lombok一致 -->
+            <property name="@AllArgsConstructor" value="false"/>
+            <property name="@NoArgsConstructor" value="false"/>
+            <!-- @Getter、@Setter、@Accessors 等使用规则参见官方文档 -->
+            <property name="@Accessors(chain = true)" value="false"/>
+            <!-- 临时解决IDEA工具对@SuperBuilder的不支持问题,开启后(默认未开启)插件在遇到@SuperBuilder注解时会调用ModelBuilderPlugin来生成相应的builder代码 -->
+            <property name="supportSuperBuilderForIdea" value="false"/>
+        </plugin>
+
+        <plugin type="org.mybatis.generator.plugins.SerializablePlugin"/>
+
+        <!-- Mapper注解插件 -->
+        <plugin type="com.itfsw.mybatis.generator.plugins.MapperAnnotationPlugin">
+            <!-- @Mapper 默认开启 -->
+            <property name="@Mapper" value="true"/>
+            <!-- @Repository 默认关闭,开启后解决IDEA工具@Autowired报错 -->
+            <property name="@Repository" value="true"/>
+        </plugin>
+
+        <!--<plugin type="org.mybatis.generator.plugins.ToStringPlugin" />-->
+
+        <!--数据库连接配置 need to change-->
+        <jdbcConnection
+                driverClass="com.mysql.cj.jdbc.Driver"
+                connectionURL="jdbc:mysql://ip-191:3306/biaozhu_medical_kg?serverTimezone=UTC&amp;useUnicode=true&amp;characterEncoding=utf8&amp;useSSL=false"
+                userId="xxx"
+                password="xxx"/>
+
+        <!--指定自动生成的 POJO置于哪个包下 need to change -->
+        <javaModelGenerator targetPackage="com.alvin.dao.entity"
+                            targetProject="src/main/java"/>
+
+        <!--指定自动生成的 mapper.xml置于哪个包下 -->
+        <sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources"/>
+
+        <!--指定自动生成的 DAO接口置于哪个包下 need to change-->
+        <javaClientGenerator targetPackage="com.alvin.dao.mapper"
+                             targetProject="src/main/java" type="XMLMAPPER"/>
+
+        <!--指定数据表名,可以使用_和%通配符-->
+        <table tableName="similar"/>
+
+    </context>
+
+</generatorConfiguration>

+ 1 - 0
pom.xml

@@ -11,6 +11,7 @@
     <modules>
         <module>common</module>
         <module>app</module>
+        <module>dao</module>
     </modules>
 
     <parent>