• idea使用generator自动生成model、mapper、mapper.xml(转)


    原文链接:http://www.mamicode.com/info-detail-445217.html

    TEP 0.在Intellij IDEA创建maven项目(本过程比较简单,略)

    STEP 1. 在maven项目的pom.xml 添加mybatis-generator-maven-plugin 插件

      <build>
        <finalName>xxx</finalName>
        <plugins>
          <plugin>
            <groupId>org.mybatis.generator</groupId>
            <artifactId>mybatis-generator-maven-plugin</artifactId>
            <version>1.3.2</version>
            <configuration>
              <verbose>true</verbose>
              <overwrite>true</overwrite>
            </configuration>
          </plugin>
        </plugins>
      </build>

    STEP 2. 在maven项目下的src/main/resources 目录下建立名为 generatorConfig.xml的配置文件,作为mybatis-generator-maven-plugin 插件的执行目标,模板如下:


    <?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>
        <!--导入属性配置 -->
        <properties resource="generator.properties"></properties>
    
        <!--指定特定数据库的jdbc驱动jar包的位置 -->
        <classPathEntry location="${jdbc.driverLocation}"/>
    
        <context id="default" targetRuntime="MyBatis3">
    
    
            <!-- optional,旨在创建class时,对注释进行控制 -->
            <commentGenerator>
                <property name="suppressDate" value="true" />
            </commentGenerator>
    
    
            <!--jdbc的数据库连接 -->
            <jdbcConnection driverClass="${jdbc.driverClass}" connectionURL="${jdbc.connectionURL}" userId="${jdbc.userId}" password="${jdbc.password}">
            </jdbcConnection>
    
    
    
            <!-- 非必需,类型处理器,在数据库类型和java类型之间的转换控制-->
            <javaTypeResolver >
                <property name="forceBigDecimals" value="false" />
            </javaTypeResolver>
    
            <!-- Model模型生成器,用来生成含有主键key的类,记录类 以及查询Example类
                targetPackage     指定生成的model生成所在的包名
                targetProject     指定在该项目下所在的路径
            -->
            <javaModelGenerator targetPackage="org.louis.hometutor.po" targetProject="src/main/java">
                <!-- 是否对model添加 构造函数 -->
                <property name="constructorBased" value="true"/>
    
                <!-- 是否允许子包,即targetPackage.schemaName.tableName -->
                <property name="enableSubPackages" value="false"/>
    
                <!-- 建立的Model对象是否 不可改变  即生成的Model对象不会有 setter方法,只有构造方法 -->
                <property name="immutable" value="true"/>
    
                <!-- 给Model添加一个父类 -->
                <property name="rootClass" value="com.foo.louis.Hello"/>
    
                <!-- 是否对类CHAR类型的列的数据进行trim操作 -->
                <property name="trimStrings" value="true"/>
            </javaModelGenerator>
    
            <!--Mapper映射文件生成所在的目录 为每一个数据库的表生成对应的SqlMap文件 -->
            <sqlMapGenerator targetPackage="org.louis.hometutor.domain" targetProject="src/main/java">
                <property name="enableSubPackages" value="false"/>
            </sqlMapGenerator>
    
    
            <!-- 客户端代码,生成易于使用的针对Model对象和XML配置文件 的代码
                    type="ANNOTATEDMAPPER",生成Java Model 和基于注解的Mapper对象
                    type="MIXEDMAPPER",生成基于注解的Java Model 和相应的Mapper对象
                    type="XMLMAPPER",生成SQLMap XML文件和独立的Mapper接口
            -->
            <javaClientGenerator targetPackage="com.foo.tourist.dao" targetProject="src/main/java" type="MIXEDMAPPER">
                <property name="enableSubPackages" value=""/>
                <!--
                        定义Maper.java 源代码中的ByExample() 方法的可视性,可选的值有:
                        public;
                        private;
                        protected;
                        default
                        注意:如果 targetRuntime="MyBatis3",此参数被忽略
                 -->
                <property name="exampleMethodVisibility" value=""/>
                <!--
                                               方法名计数器
                  Important note: this property is ignored if the target runtime is MyBatis3.
                 -->
                <property name="methodNameCalculator" value=""/>
    
                <!--
                                                    为生成的接口添加父接口
                 -->
                <property name="rootInterface" value=""/>
    
            </javaClientGenerator>
    
    
    
            <table tableName="lession" schema="louis">
    
                <!-- optional   , only for mybatis3 runtime
                     自动生成的键值(identity,或者序列值)
                   如果指定此元素,MBG将会生成<selectKey>元素,然后将此元素插入到SQL Map的<insert> 元素之中
                   sqlStatement 的语句将会返回新的值
                   如果是一个自增主键的话,你可以使用预定义的语句,或者添加自定义的SQL语句. 预定义的值如下:
                      Cloudscape 	This will translate to: VALUES IDENTITY_VAL_LOCAL()
                      DB2: 		VALUES IDENTITY_VAL_LOCAL()
                      DB2_MF:		SELECT IDENTITY_VAL_LOCAL() FROM SYSIBM.SYSDUMMY1
                      Derby: 		VALUES IDENTITY_VAL_LOCAL()
                      HSQLDB: 	CALL IDENTITY()
                      Informix: 	select dbinfo('sqlca.sqlerrd1') from systables where tabid=1
                      MySql: 		SELECT LAST_INSERT_ID()
                      SqlServer: 	SELECT SCOPE_IDENTITY()
                      SYBASE: 	SELECT @@IDENTITY
                      JDBC:		This will configure MBG to generate code for MyBatis3 suport of JDBC standard generated keys. This is a database independent method of obtaining the value from identity columns.
                      identity: 自增主键  If true, then the column is flagged as an identity column and the generated <selectKey> element will be placed after the insert (for an identity column). If false, then the generated <selectKey> will be placed before the insert (typically for a sequence).
    
                -->
                <generatedKey column="" sqlStatement="" identity="" type=""/>
    
    
                <!-- optional.
                        列的命名规则:
                        MBG使用 <columnRenamingRule> 元素在计算列名的对应 名称之前,先对列名进行重命名,
                        作用:一般需要对BUSI_CLIENT_NO 前的BUSI_进行过滤
                        支持正在表达式
                         searchString 表示要被换掉的字符串
                         replaceString 则是要换成的字符串,默认情况下为空字符串,可选
                -->
                <columnRenamingRule searchString="" replaceString=""/>
    
    
    
                <!-- optional.告诉 MBG 忽略某一列
                        column,需要忽略的列
                        delimitedColumnName:true ,匹配column的值和数据库列的名称 大小写完全匹配,false 忽略大小写匹配
                        是否限定表的列名,即固定表列在Model中的名称
                -->
                <ignoreColumn column="PLAN_ID"  delimitedColumnName="true" />
    
    
                <!--optional.覆盖MBG对Model 的生成规则
                     column: 数据库的列名
                     javaType: 对应的Java数据类型的完全限定名
                     在必要的时候可以覆盖由JavaTypeResolver计算得到的java数据类型. For some databases, this is necessary to handle "odd" database types (e.g. MySql's unsigned bigint type should be mapped to java.lang.Object).
                     jdbcType:该列的JDBC数据类型(INTEGER, DECIMAL, NUMERIC, VARCHAR, etc.),该列可以覆盖由JavaTypeResolver计算得到的Jdbc类型,对某些数据库而言,对于处理特定的JDBC 驱动癖好 很有必要(e.g. DB2's LONGVARCHAR type should be mapped to VARCHAR for iBATIS).
                     typeHandler:
    
                -->
                <columnOverride column="" javaType=""	jdbcType=""	typeHandler=""	delimitedColumnName="" />
    
            </table>
        </context>
    </generatorConfiguration>

    这里使用了外置的配置文件generator.properties,可以将一下属性配置到properties文件之中,增加配置的灵活性:

    jdbc.driverLocation=D:\maven\com\oracle\ojdbc14\10.2.0.4.0\ojdbc14-10.2.0.4.0.jar
    jdbc.driverClass=oracle.jdbc.driver.OracleDriver
    jdbc.connectionURL=jdbc:oracle:thin:@//localhost:1521/XE
    jdbc.userId=LOUIS
    jdbc.password=123456

    项目目录如下:

    技术分享


    STEP 3. 在Intellij IDEA添加一个“Run运行”选项,使用maven运行mybatis-generator-maven-plugin插件 :

    技术分享

    技术分享

    之后弹出运行配置框,为当前配置配置一个名称,这里其名为"generator",然后在 “Command line” 选项中输入“mybatis-generator:generate  -e”

    这里加了“-e ”选项是为了让该插件输出详细信息,这样可以帮助我们定位问题。

    技术分享

    技术分享

    如果添加成功,则会在run 选项中有“generator” 选项,如下:

    技术分享

    点击运行,然后不出意外的话,会在控制台输出:

    C:Javajdk1.7.0_71injava -Dmaven.home=D:softwareapache-maven-3.0.5-bin -Dclassworlds.conf=D:softwareapache-maven-3.0.5-bininm2.conf -Didea.launcher.port=7533 "-Didea.launcher.bin.path=D:applicationsJetBrainsIntelliJ IDEA 14.0.2in" -Dfile.encoding=UTF-8 -classpath "D:softwareapache-maven-3.0.5-binootplexus-classworlds-2.4.jar;D:applicationsJetBrainsIntelliJ IDEA 14.0.2libidea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=14.0.2 -s D:softwareapache-maven-3.0.5-binconfsettings.xml mybatis-generator:generate -e
    [INFO] Error stacktraces are turned on.
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building hometutor Maven Webapp 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- mybatis-generator-maven-plugin:1.3.2:generate (default-cli) @ hometutor ---
    [INFO] Connecting to the Database
    [INFO] Introspecting table louis.lession
    log4j:WARN No appenders could be found for logger (org.mybatis.generator.internal.db.DatabaseIntrospector).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
    [INFO] Generating Example class for table LOUIS.LESSION
    [INFO] Generating Record class for table LOUIS.LESSION
    [INFO] Generating Mapper Interface for table LOUIS.LESSION
    [INFO] Generating SQL Map for table LOUIS.LESSION
    [INFO] Saving file LessionMapper.xml
    [INFO] Saving file LessionExample.java
    [INFO] Saving file Lession.java
    [INFO] Saving file LessionMapper.java
    [WARNING] Root class com.foo.louis.Hello cannot be loaded, checking for member overrides is disabled for this class 
    [WARNING] Existing file E:sources	utorsrcmainjavaorglouishometutorpoLession.java was overwritten
    [WARNING] Existing file E:sources	utorsrcmainjavacomfoo	ouristdaoLessionMapper.java was overwritten
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.334s
    [INFO] Finished at: Tue Jan 27 12:04:08 CST 2015
    [INFO] Final Memory: 8M/107M
    [INFO] ------------------------------------------------------------------------
    
    Process finished with exit code 0
    

    好,看到BUILD SUCCESS,则大功告成,如果有错误的话,由于添加了-e 选项,会把具体的详细错误信息打印出来的,根据错误信息修改即可。

    下面是我的项目中的generator.xml的配置文件内容:

    <?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>
        <classPathEntry location="E:/ahaodesktop/install/PremiumSoft/ojdbc6.jar" />
    
        <context id="DB2Tables" targetRuntime="MyBatis3">
    
            <commentGenerator>
                <property name="suppressDate" value="true" />
            </commentGenerator>
    
            <jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"
                                    connectionURL="jdbc:oracle:thin:@122.144.182.6:1521:orcl" userId="telpay"
                                     password="nK17kLnd">
            </jdbcConnection>
    
            <javaTypeResolver>
                <property name="forceBigDecimals" value="false" />
            </javaTypeResolver>
    
            <javaModelGenerator targetPackage="com.ref.mpos.dal.model"
                                targetProject="src/main/java">
                <property name="enableSubPackages" value="true" />
                <property name="trimStrings" value="true" />
            </javaModelGenerator>
    
            <sqlMapGenerator targetPackage="com.ref.mpos.dal.dao.main"
                             targetProject="src/main/resources">
                <property name="enableSubPackages" value="true" />
            </sqlMapGenerator>
    
            <javaClientGenerator type="XMLMAPPER"
                                 targetPackage="com.ref.mpos.dal.dao" targetProject="src/main/java">
                <property name="enableSubPackages" value="true" />
            </javaClientGenerator>
    
            <!--<table tableName="MPDEVMR" domainObjectName="Mpdevmr"/>-->
            <!--<table tableName="MPAGENT" domainObjectName="Mpagent"/>-->
            <!--<table tableName="MPMERDTL" domainObjectName="Mpmerdtl"/>-->
            <!--<table tableName="MPDEVDEF" domainObjectName="Mpdevdef"/>-->
            <!--<table tableName="MPTERM" domainObjectName="Mpterm"/>-->
            <!--<table tableName="MPORG" domainObjectName="Mporg"/>-->
            <!--<table tableName="MPMEMB" domainObjectName="Mpmemb"/>-->
    
            <!--<table tableName="MPTELLER" domainObjectName="Mpteller"/>-->
    
            <!--<table tableName="MPFUNC" domainObjectName="Mpfunc"/>-->
            <!--<table tableName="MPRLFUNC" domainObjectName="Mprlfunc"/>-->
            <!--<table tableName="MPROLE" domainObjectName="Mprole"/>-->
            <!--<table tableName="MPTELLERRL" domainObjectName="Mptellerrl"/>-->
            <!--<table tableName="MPSEQCTL" domainObjectName="Mpseqctl"/>-->
    
            <!-- 第一次创建完后注释掉-->
            <!--<table tableName="PM_APKVERSION" domainObjectName="Pmapkversion"></table>-->
            <!--<table tableName="FEEDBACK" domainObjectName="FeedBack"></table>-->
            <!--<table tableName="MPLUNBOTU" domainObjectName="MpLunbotu"></table>-->
            <!--<table tableName="MPOEM" domainObjectName="MpOem"></table>-->
            <!--<table tableName="NOTICE" domainObjectName="Mpnotice"></table>-->
    
            <!--<table tableName="TBL_HOP_ROUTE" domainObjectName="TblHopRoute"></table>-->
            <!--<table tableName="TBL_HOP_WRITE" domainObjectName="TblHopWrite"></table>-->
        </context>
    </generatorConfiguration>

    我的会生成model、mapper、modelDoExample,xxDoExampleMapper,以及对应的xml

    这是生成的DoExample:

    package com.ref.mpos.dal.model;
    
    import java.util.ArrayList;
    import java.util.List;
    
    public class MpImportMerDetailInfoExample {
        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        protected String orderByClause;
    
        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        protected boolean distinct;
    
        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        protected List<Criteria> oredCriteria;
    
        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        public MpImportMerDetailInfoExample() {
            oredCriteria = new ArrayList<Criteria>();
        }
    
        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        public void setOrderByClause(String orderByClause) {
            this.orderByClause = orderByClause;
        }
    
        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        public String getOrderByClause() {
            return orderByClause;
        }
    
        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        public void setDistinct(boolean distinct) {
            this.distinct = distinct;
        }
    
        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        public boolean isDistinct() {
            return distinct;
        }
    
        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        public List<Criteria> getOredCriteria() {
            return oredCriteria;
        }
    
        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        public void or(Criteria criteria) {
            oredCriteria.add(criteria);
        }
    
        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        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 MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        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 MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        protected Criteria createCriteriaInternal() {
            Criteria criteria = new Criteria();
            return criteria;
        }
    
        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        public void clear() {
            oredCriteria.clear();
            orderByClause = null;
            distinct = false;
        }
    
        /**
         * This class was generated by MyBatis Generator.
         * This class corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        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 andBatchNoIsNull() {
                addCriterion("BATCH_NO is null");
                return (Criteria) this;
            }
    
            public Criteria andBatchNoIsNotNull() {
                addCriterion("BATCH_NO is not null");
                return (Criteria) this;
            }
    
            public Criteria andBatchNoEqualTo(String value) {
                addCriterion("BATCH_NO =", value, "batchNo");
                return (Criteria) this;
            }
    
            public Criteria andBatchNoNotEqualTo(String value) {
                addCriterion("BATCH_NO <>", value, "batchNo");
                return (Criteria) this;
            }
    
            public Criteria andBatchNoGreaterThan(String value) {
                addCriterion("BATCH_NO >", value, "batchNo");
                return (Criteria) this;
            }
    
            public Criteria andBatchNoGreaterThanOrEqualTo(String value) {
                addCriterion("BATCH_NO >=", value, "batchNo");
                return (Criteria) this;
            }
    
            public Criteria andBatchNoLessThan(String value) {
                addCriterion("BATCH_NO <", value, "batchNo");
                return (Criteria) this;
            }
    
            public Criteria andBatchNoLessThanOrEqualTo(String value) {
                addCriterion("BATCH_NO <=", value, "batchNo");
                return (Criteria) this;
            }
    
            public Criteria andBatchNoLike(String value) {
                addCriterion("BATCH_NO like", value, "batchNo");
                return (Criteria) this;
            }
    
            public Criteria andBatchNoNotLike(String value) {
                addCriterion("BATCH_NO not like", value, "batchNo");
                return (Criteria) this;
            }
    
            public Criteria andBatchNoIn(List<String> values) {
                addCriterion("BATCH_NO in", values, "batchNo");
                return (Criteria) this;
            }
    
            public Criteria andBatchNoNotIn(List<String> values) {
                addCriterion("BATCH_NO not in", values, "batchNo");
                return (Criteria) this;
            }
    
            public Criteria andBatchNoBetween(String value1, String value2) {
                addCriterion("BATCH_NO between", value1, value2, "batchNo");
                return (Criteria) this;
            }
    
            public Criteria andBatchNoNotBetween(String value1, String value2) {
                addCriterion("BATCH_NO not between", value1, value2, "batchNo");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdIsNull() {
                addCriterion("ORG_ID is null");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdIsNotNull() {
                addCriterion("ORG_ID is not null");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdEqualTo(String value) {
                addCriterion("ORG_ID =", value, "orgId");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdNotEqualTo(String value) {
                addCriterion("ORG_ID <>", value, "orgId");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdGreaterThan(String value) {
                addCriterion("ORG_ID >", value, "orgId");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdGreaterThanOrEqualTo(String value) {
                addCriterion("ORG_ID >=", value, "orgId");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdLessThan(String value) {
                addCriterion("ORG_ID <", value, "orgId");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdLessThanOrEqualTo(String value) {
                addCriterion("ORG_ID <=", value, "orgId");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdLike(String value) {
                addCriterion("ORG_ID like", value, "orgId");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdNotLike(String value) {
                addCriterion("ORG_ID not like", value, "orgId");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdIn(List<String> values) {
                addCriterion("ORG_ID in", values, "orgId");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdNotIn(List<String> values) {
                addCriterion("ORG_ID not in", values, "orgId");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdBetween(String value1, String value2) {
                addCriterion("ORG_ID between", value1, value2, "orgId");
                return (Criteria) this;
            }
    
            public Criteria andOrgIdNotBetween(String value1, String value2) {
                addCriterion("ORG_ID not between", value1, value2, "orgId");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdIsNull() {
                addCriterion("LOGIN_ID is null");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdIsNotNull() {
                addCriterion("LOGIN_ID is not null");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdEqualTo(String value) {
                addCriterion("LOGIN_ID =", value, "loginId");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdNotEqualTo(String value) {
                addCriterion("LOGIN_ID <>", value, "loginId");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdGreaterThan(String value) {
                addCriterion("LOGIN_ID >", value, "loginId");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdGreaterThanOrEqualTo(String value) {
                addCriterion("LOGIN_ID >=", value, "loginId");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdLessThan(String value) {
                addCriterion("LOGIN_ID <", value, "loginId");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdLessThanOrEqualTo(String value) {
                addCriterion("LOGIN_ID <=", value, "loginId");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdLike(String value) {
                addCriterion("LOGIN_ID like", value, "loginId");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdNotLike(String value) {
                addCriterion("LOGIN_ID not like", value, "loginId");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdIn(List<String> values) {
                addCriterion("LOGIN_ID in", values, "loginId");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdNotIn(List<String> values) {
                addCriterion("LOGIN_ID not in", values, "loginId");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdBetween(String value1, String value2) {
                addCriterion("LOGIN_ID between", value1, value2, "loginId");
                return (Criteria) this;
            }
    
            public Criteria andLoginIdNotBetween(String value1, String value2) {
                addCriterion("LOGIN_ID not between", value1, value2, "loginId");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameIsNull() {
                addCriterion("MERCH_NAME is null");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameIsNotNull() {
                addCriterion("MERCH_NAME is not null");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameEqualTo(String value) {
                addCriterion("MERCH_NAME =", value, "merchName");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameNotEqualTo(String value) {
                addCriterion("MERCH_NAME <>", value, "merchName");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameGreaterThan(String value) {
                addCriterion("MERCH_NAME >", value, "merchName");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameGreaterThanOrEqualTo(String value) {
                addCriterion("MERCH_NAME >=", value, "merchName");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameLessThan(String value) {
                addCriterion("MERCH_NAME <", value, "merchName");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameLessThanOrEqualTo(String value) {
                addCriterion("MERCH_NAME <=", value, "merchName");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameLike(String value) {
                addCriterion("MERCH_NAME like", value, "merchName");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameNotLike(String value) {
                addCriterion("MERCH_NAME not like", value, "merchName");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameIn(List<String> values) {
                addCriterion("MERCH_NAME in", values, "merchName");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameNotIn(List<String> values) {
                addCriterion("MERCH_NAME not in", values, "merchName");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameBetween(String value1, String value2) {
                addCriterion("MERCH_NAME between", value1, value2, "merchName");
                return (Criteria) this;
            }
    
            public Criteria andMerchNameNotBetween(String value1, String value2) {
                addCriterion("MERCH_NAME not between", value1, value2, "merchName");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameIsNull() {
                addCriterion("LEGAL_NAME is null");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameIsNotNull() {
                addCriterion("LEGAL_NAME is not null");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameEqualTo(String value) {
                addCriterion("LEGAL_NAME =", value, "legalName");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameNotEqualTo(String value) {
                addCriterion("LEGAL_NAME <>", value, "legalName");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameGreaterThan(String value) {
                addCriterion("LEGAL_NAME >", value, "legalName");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameGreaterThanOrEqualTo(String value) {
                addCriterion("LEGAL_NAME >=", value, "legalName");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameLessThan(String value) {
                addCriterion("LEGAL_NAME <", value, "legalName");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameLessThanOrEqualTo(String value) {
                addCriterion("LEGAL_NAME <=", value, "legalName");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameLike(String value) {
                addCriterion("LEGAL_NAME like", value, "legalName");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameNotLike(String value) {
                addCriterion("LEGAL_NAME not like", value, "legalName");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameIn(List<String> values) {
                addCriterion("LEGAL_NAME in", values, "legalName");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameNotIn(List<String> values) {
                addCriterion("LEGAL_NAME not in", values, "legalName");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameBetween(String value1, String value2) {
                addCriterion("LEGAL_NAME between", value1, value2, "legalName");
                return (Criteria) this;
            }
    
            public Criteria andLegalNameNotBetween(String value1, String value2) {
                addCriterion("LEGAL_NAME not between", value1, value2, "legalName");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeIsNull() {
                addCriterion("ID_TYPE is null");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeIsNotNull() {
                addCriterion("ID_TYPE is not null");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeEqualTo(String value) {
                addCriterion("ID_TYPE =", value, "idType");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeNotEqualTo(String value) {
                addCriterion("ID_TYPE <>", value, "idType");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeGreaterThan(String value) {
                addCriterion("ID_TYPE >", value, "idType");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeGreaterThanOrEqualTo(String value) {
                addCriterion("ID_TYPE >=", value, "idType");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeLessThan(String value) {
                addCriterion("ID_TYPE <", value, "idType");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeLessThanOrEqualTo(String value) {
                addCriterion("ID_TYPE <=", value, "idType");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeLike(String value) {
                addCriterion("ID_TYPE like", value, "idType");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeNotLike(String value) {
                addCriterion("ID_TYPE not like", value, "idType");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeIn(List<String> values) {
                addCriterion("ID_TYPE in", values, "idType");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeNotIn(List<String> values) {
                addCriterion("ID_TYPE not in", values, "idType");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeBetween(String value1, String value2) {
                addCriterion("ID_TYPE between", value1, value2, "idType");
                return (Criteria) this;
            }
    
            public Criteria andIdTypeNotBetween(String value1, String value2) {
                addCriterion("ID_TYPE not between", value1, value2, "idType");
                return (Criteria) this;
            }
    
            public Criteria andIdNoIsNull() {
                addCriterion("ID_NO is null");
                return (Criteria) this;
            }
    
            public Criteria andIdNoIsNotNull() {
                addCriterion("ID_NO is not null");
                return (Criteria) this;
            }
    
            public Criteria andIdNoEqualTo(String value) {
                addCriterion("ID_NO =", value, "idNo");
                return (Criteria) this;
            }
    
            public Criteria andIdNoNotEqualTo(String value) {
                addCriterion("ID_NO <>", value, "idNo");
                return (Criteria) this;
            }
    
            public Criteria andIdNoGreaterThan(String value) {
                addCriterion("ID_NO >", value, "idNo");
                return (Criteria) this;
            }
    
            public Criteria andIdNoGreaterThanOrEqualTo(String value) {
                addCriterion("ID_NO >=", value, "idNo");
                return (Criteria) this;
            }
    
            public Criteria andIdNoLessThan(String value) {
                addCriterion("ID_NO <", value, "idNo");
                return (Criteria) this;
            }
    
            public Criteria andIdNoLessThanOrEqualTo(String value) {
                addCriterion("ID_NO <=", value, "idNo");
                return (Criteria) this;
            }
    
            public Criteria andIdNoLike(String value) {
                addCriterion("ID_NO like", value, "idNo");
                return (Criteria) this;
            }
    
            public Criteria andIdNoNotLike(String value) {
                addCriterion("ID_NO not like", value, "idNo");
                return (Criteria) this;
            }
    
            public Criteria andIdNoIn(List<String> values) {
                addCriterion("ID_NO in", values, "idNo");
                return (Criteria) this;
            }
    
            public Criteria andIdNoNotIn(List<String> values) {
                addCriterion("ID_NO not in", values, "idNo");
                return (Criteria) this;
            }
    
            public Criteria andIdNoBetween(String value1, String value2) {
                addCriterion("ID_NO between", value1, value2, "idNo");
                return (Criteria) this;
            }
    
            public Criteria andIdNoNotBetween(String value1, String value2) {
                addCriterion("ID_NO not between", value1, value2, "idNo");
                return (Criteria) this;
            }
    
            public Criteria andBankNameIsNull() {
                addCriterion("BANK_NAME is null");
                return (Criteria) this;
            }
    
            public Criteria andBankNameIsNotNull() {
                addCriterion("BANK_NAME is not null");
                return (Criteria) this;
            }
    
            public Criteria andBankNameEqualTo(String value) {
                addCriterion("BANK_NAME =", value, "bankName");
                return (Criteria) this;
            }
    
            public Criteria andBankNameNotEqualTo(String value) {
                addCriterion("BANK_NAME <>", value, "bankName");
                return (Criteria) this;
            }
    
            public Criteria andBankNameGreaterThan(String value) {
                addCriterion("BANK_NAME >", value, "bankName");
                return (Criteria) this;
            }
    
            public Criteria andBankNameGreaterThanOrEqualTo(String value) {
                addCriterion("BANK_NAME >=", value, "bankName");
                return (Criteria) this;
            }
    
            public Criteria andBankNameLessThan(String value) {
                addCriterion("BANK_NAME <", value, "bankName");
                return (Criteria) this;
            }
    
            public Criteria andBankNameLessThanOrEqualTo(String value) {
                addCriterion("BANK_NAME <=", value, "bankName");
                return (Criteria) this;
            }
    
            public Criteria andBankNameLike(String value) {
                addCriterion("BANK_NAME like", value, "bankName");
                return (Criteria) this;
            }
    
            public Criteria andBankNameNotLike(String value) {
                addCriterion("BANK_NAME not like", value, "bankName");
                return (Criteria) this;
            }
    
            public Criteria andBankNameIn(List<String> values) {
                addCriterion("BANK_NAME in", values, "bankName");
                return (Criteria) this;
            }
    
            public Criteria andBankNameNotIn(List<String> values) {
                addCriterion("BANK_NAME not in", values, "bankName");
                return (Criteria) this;
            }
    
            public Criteria andBankNameBetween(String value1, String value2) {
                addCriterion("BANK_NAME between", value1, value2, "bankName");
                return (Criteria) this;
            }
    
            public Criteria andBankNameNotBetween(String value1, String value2) {
                addCriterion("BANK_NAME not between", value1, value2, "bankName");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameIsNull() {
                addCriterion("BANK_PROV_NAME is null");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameIsNotNull() {
                addCriterion("BANK_PROV_NAME is not null");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameEqualTo(String value) {
                addCriterion("BANK_PROV_NAME =", value, "bankProvName");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameNotEqualTo(String value) {
                addCriterion("BANK_PROV_NAME <>", value, "bankProvName");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameGreaterThan(String value) {
                addCriterion("BANK_PROV_NAME >", value, "bankProvName");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameGreaterThanOrEqualTo(String value) {
                addCriterion("BANK_PROV_NAME >=", value, "bankProvName");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameLessThan(String value) {
                addCriterion("BANK_PROV_NAME <", value, "bankProvName");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameLessThanOrEqualTo(String value) {
                addCriterion("BANK_PROV_NAME <=", value, "bankProvName");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameLike(String value) {
                addCriterion("BANK_PROV_NAME like", value, "bankProvName");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameNotLike(String value) {
                addCriterion("BANK_PROV_NAME not like", value, "bankProvName");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameIn(List<String> values) {
                addCriterion("BANK_PROV_NAME in", values, "bankProvName");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameNotIn(List<String> values) {
                addCriterion("BANK_PROV_NAME not in", values, "bankProvName");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameBetween(String value1, String value2) {
                addCriterion("BANK_PROV_NAME between", value1, value2, "bankProvName");
                return (Criteria) this;
            }
    
            public Criteria andBankProvNameNotBetween(String value1, String value2) {
                addCriterion("BANK_PROV_NAME not between", value1, value2, "bankProvName");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameIsNull() {
                addCriterion("BANK_CITY_NAME is null");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameIsNotNull() {
                addCriterion("BANK_CITY_NAME is not null");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameEqualTo(String value) {
                addCriterion("BANK_CITY_NAME =", value, "bankCityName");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameNotEqualTo(String value) {
                addCriterion("BANK_CITY_NAME <>", value, "bankCityName");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameGreaterThan(String value) {
                addCriterion("BANK_CITY_NAME >", value, "bankCityName");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameGreaterThanOrEqualTo(String value) {
                addCriterion("BANK_CITY_NAME >=", value, "bankCityName");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameLessThan(String value) {
                addCriterion("BANK_CITY_NAME <", value, "bankCityName");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameLessThanOrEqualTo(String value) {
                addCriterion("BANK_CITY_NAME <=", value, "bankCityName");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameLike(String value) {
                addCriterion("BANK_CITY_NAME like", value, "bankCityName");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameNotLike(String value) {
                addCriterion("BANK_CITY_NAME not like", value, "bankCityName");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameIn(List<String> values) {
                addCriterion("BANK_CITY_NAME in", values, "bankCityName");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameNotIn(List<String> values) {
                addCriterion("BANK_CITY_NAME not in", values, "bankCityName");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameBetween(String value1, String value2) {
                addCriterion("BANK_CITY_NAME between", value1, value2, "bankCityName");
                return (Criteria) this;
            }
    
            public Criteria andBankCityNameNotBetween(String value1, String value2) {
                addCriterion("BANK_CITY_NAME not between", value1, value2, "bankCityName");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameIsNull() {
                addCriterion("BRANCH_NAME is null");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameIsNotNull() {
                addCriterion("BRANCH_NAME is not null");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameEqualTo(String value) {
                addCriterion("BRANCH_NAME =", value, "branchName");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameNotEqualTo(String value) {
                addCriterion("BRANCH_NAME <>", value, "branchName");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameGreaterThan(String value) {
                addCriterion("BRANCH_NAME >", value, "branchName");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameGreaterThanOrEqualTo(String value) {
                addCriterion("BRANCH_NAME >=", value, "branchName");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameLessThan(String value) {
                addCriterion("BRANCH_NAME <", value, "branchName");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameLessThanOrEqualTo(String value) {
                addCriterion("BRANCH_NAME <=", value, "branchName");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameLike(String value) {
                addCriterion("BRANCH_NAME like", value, "branchName");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameNotLike(String value) {
                addCriterion("BRANCH_NAME not like", value, "branchName");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameIn(List<String> values) {
                addCriterion("BRANCH_NAME in", values, "branchName");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameNotIn(List<String> values) {
                addCriterion("BRANCH_NAME not in", values, "branchName");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameBetween(String value1, String value2) {
                addCriterion("BRANCH_NAME between", value1, value2, "branchName");
                return (Criteria) this;
            }
    
            public Criteria andBranchNameNotBetween(String value1, String value2) {
                addCriterion("BRANCH_NAME not between", value1, value2, "branchName");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdIsNull() {
                addCriterion("BANK_ACCT_ID is null");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdIsNotNull() {
                addCriterion("BANK_ACCT_ID is not null");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdEqualTo(String value) {
                addCriterion("BANK_ACCT_ID =", value, "bankAcctId");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdNotEqualTo(String value) {
                addCriterion("BANK_ACCT_ID <>", value, "bankAcctId");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdGreaterThan(String value) {
                addCriterion("BANK_ACCT_ID >", value, "bankAcctId");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdGreaterThanOrEqualTo(String value) {
                addCriterion("BANK_ACCT_ID >=", value, "bankAcctId");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdLessThan(String value) {
                addCriterion("BANK_ACCT_ID <", value, "bankAcctId");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdLessThanOrEqualTo(String value) {
                addCriterion("BANK_ACCT_ID <=", value, "bankAcctId");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdLike(String value) {
                addCriterion("BANK_ACCT_ID like", value, "bankAcctId");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdNotLike(String value) {
                addCriterion("BANK_ACCT_ID not like", value, "bankAcctId");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdIn(List<String> values) {
                addCriterion("BANK_ACCT_ID in", values, "bankAcctId");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdNotIn(List<String> values) {
                addCriterion("BANK_ACCT_ID not in", values, "bankAcctId");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdBetween(String value1, String value2) {
                addCriterion("BANK_ACCT_ID between", value1, value2, "bankAcctId");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctIdNotBetween(String value1, String value2) {
                addCriterion("BANK_ACCT_ID not between", value1, value2, "bankAcctId");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameIsNull() {
                addCriterion("BANK_ACCT_NAME is null");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameIsNotNull() {
                addCriterion("BANK_ACCT_NAME is not null");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameEqualTo(String value) {
                addCriterion("BANK_ACCT_NAME =", value, "bankAcctName");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameNotEqualTo(String value) {
                addCriterion("BANK_ACCT_NAME <>", value, "bankAcctName");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameGreaterThan(String value) {
                addCriterion("BANK_ACCT_NAME >", value, "bankAcctName");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameGreaterThanOrEqualTo(String value) {
                addCriterion("BANK_ACCT_NAME >=", value, "bankAcctName");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameLessThan(String value) {
                addCriterion("BANK_ACCT_NAME <", value, "bankAcctName");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameLessThanOrEqualTo(String value) {
                addCriterion("BANK_ACCT_NAME <=", value, "bankAcctName");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameLike(String value) {
                addCriterion("BANK_ACCT_NAME like", value, "bankAcctName");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameNotLike(String value) {
                addCriterion("BANK_ACCT_NAME not like", value, "bankAcctName");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameIn(List<String> values) {
                addCriterion("BANK_ACCT_NAME in", values, "bankAcctName");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameNotIn(List<String> values) {
                addCriterion("BANK_ACCT_NAME not in", values, "bankAcctName");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameBetween(String value1, String value2) {
                addCriterion("BANK_ACCT_NAME between", value1, value2, "bankAcctName");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctNameNotBetween(String value1, String value2) {
                addCriterion("BANK_ACCT_NAME not between", value1, value2, "bankAcctName");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeIsNull() {
                addCriterion("BANK_ACCT_TYPE is null");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeIsNotNull() {
                addCriterion("BANK_ACCT_TYPE is not null");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeEqualTo(String value) {
                addCriterion("BANK_ACCT_TYPE =", value, "bankAcctType");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeNotEqualTo(String value) {
                addCriterion("BANK_ACCT_TYPE <>", value, "bankAcctType");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeGreaterThan(String value) {
                addCriterion("BANK_ACCT_TYPE >", value, "bankAcctType");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeGreaterThanOrEqualTo(String value) {
                addCriterion("BANK_ACCT_TYPE >=", value, "bankAcctType");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeLessThan(String value) {
                addCriterion("BANK_ACCT_TYPE <", value, "bankAcctType");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeLessThanOrEqualTo(String value) {
                addCriterion("BANK_ACCT_TYPE <=", value, "bankAcctType");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeLike(String value) {
                addCriterion("BANK_ACCT_TYPE like", value, "bankAcctType");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeNotLike(String value) {
                addCriterion("BANK_ACCT_TYPE not like", value, "bankAcctType");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeIn(List<String> values) {
                addCriterion("BANK_ACCT_TYPE in", values, "bankAcctType");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeNotIn(List<String> values) {
                addCriterion("BANK_ACCT_TYPE not in", values, "bankAcctType");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeBetween(String value1, String value2) {
                addCriterion("BANK_ACCT_TYPE between", value1, value2, "bankAcctType");
                return (Criteria) this;
            }
    
            public Criteria andBankAcctTypeNotBetween(String value1, String value2) {
                addCriterion("BANK_ACCT_TYPE not between", value1, value2, "bankAcctType");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdIsNull() {
                addCriterion("MEMBER_ID is null");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdIsNotNull() {
                addCriterion("MEMBER_ID is not null");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdEqualTo(String value) {
                addCriterion("MEMBER_ID =", value, "memberId");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdNotEqualTo(String value) {
                addCriterion("MEMBER_ID <>", value, "memberId");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdGreaterThan(String value) {
                addCriterion("MEMBER_ID >", value, "memberId");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdGreaterThanOrEqualTo(String value) {
                addCriterion("MEMBER_ID >=", value, "memberId");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdLessThan(String value) {
                addCriterion("MEMBER_ID <", value, "memberId");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdLessThanOrEqualTo(String value) {
                addCriterion("MEMBER_ID <=", value, "memberId");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdLike(String value) {
                addCriterion("MEMBER_ID like", value, "memberId");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdNotLike(String value) {
                addCriterion("MEMBER_ID not like", value, "memberId");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdIn(List<String> values) {
                addCriterion("MEMBER_ID in", values, "memberId");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdNotIn(List<String> values) {
                addCriterion("MEMBER_ID not in", values, "memberId");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdBetween(String value1, String value2) {
                addCriterion("MEMBER_ID between", value1, value2, "memberId");
                return (Criteria) this;
            }
    
            public Criteria andMemberIdNotBetween(String value1, String value2) {
                addCriterion("MEMBER_ID not between", value1, value2, "memberId");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdIsNull() {
                addCriterion("MP_DEV_ID is null");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdIsNotNull() {
                addCriterion("MP_DEV_ID is not null");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdEqualTo(String value) {
                addCriterion("MP_DEV_ID =", value, "mpDevId");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdNotEqualTo(String value) {
                addCriterion("MP_DEV_ID <>", value, "mpDevId");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdGreaterThan(String value) {
                addCriterion("MP_DEV_ID >", value, "mpDevId");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdGreaterThanOrEqualTo(String value) {
                addCriterion("MP_DEV_ID >=", value, "mpDevId");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdLessThan(String value) {
                addCriterion("MP_DEV_ID <", value, "mpDevId");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdLessThanOrEqualTo(String value) {
                addCriterion("MP_DEV_ID <=", value, "mpDevId");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdLike(String value) {
                addCriterion("MP_DEV_ID like", value, "mpDevId");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdNotLike(String value) {
                addCriterion("MP_DEV_ID not like", value, "mpDevId");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdIn(List<String> values) {
                addCriterion("MP_DEV_ID in", values, "mpDevId");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdNotIn(List<String> values) {
                addCriterion("MP_DEV_ID not in", values, "mpDevId");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdBetween(String value1, String value2) {
                addCriterion("MP_DEV_ID between", value1, value2, "mpDevId");
                return (Criteria) this;
            }
    
            public Criteria andMpDevIdNotBetween(String value1, String value2) {
                addCriterion("MP_DEV_ID not between", value1, value2, "mpDevId");
                return (Criteria) this;
            }
    
            public Criteria andResultIsNull() {
                addCriterion("RESULT is null");
                return (Criteria) this;
            }
    
            public Criteria andResultIsNotNull() {
                addCriterion("RESULT is not null");
                return (Criteria) this;
            }
    
            public Criteria andResultEqualTo(String value) {
                addCriterion("RESULT =", value, "result");
                return (Criteria) this;
            }
    
            public Criteria andResultNotEqualTo(String value) {
                addCriterion("RESULT <>", value, "result");
                return (Criteria) this;
            }
    
            public Criteria andResultGreaterThan(String value) {
                addCriterion("RESULT >", value, "result");
                return (Criteria) this;
            }
    
            public Criteria andResultGreaterThanOrEqualTo(String value) {
                addCriterion("RESULT >=", value, "result");
                return (Criteria) this;
            }
    
            public Criteria andResultLessThan(String value) {
                addCriterion("RESULT <", value, "result");
                return (Criteria) this;
            }
    
            public Criteria andResultLessThanOrEqualTo(String value) {
                addCriterion("RESULT <=", value, "result");
                return (Criteria) this;
            }
    
            public Criteria andResultLike(String value) {
                addCriterion("RESULT like", value, "result");
                return (Criteria) this;
            }
    
            public Criteria andResultNotLike(String value) {
                addCriterion("RESULT not like", value, "result");
                return (Criteria) this;
            }
    
            public Criteria andResultIn(List<String> values) {
                addCriterion("RESULT in", values, "result");
                return (Criteria) this;
            }
    
            public Criteria andResultNotIn(List<String> values) {
                addCriterion("RESULT not in", values, "result");
                return (Criteria) this;
            }
    
            public Criteria andResultBetween(String value1, String value2) {
                addCriterion("RESULT between", value1, value2, "result");
                return (Criteria) this;
            }
    
            public Criteria andResultNotBetween(String value1, String value2) {
                addCriterion("RESULT not between", value1, value2, "result");
                return (Criteria) this;
            }
    
            public Criteria andFailDescIsNull() {
                addCriterion("FAIL_DESC is null");
                return (Criteria) this;
            }
    
            public Criteria andFailDescIsNotNull() {
                addCriterion("FAIL_DESC is not null");
                return (Criteria) this;
            }
    
            public Criteria andFailDescEqualTo(String value) {
                addCriterion("FAIL_DESC =", value, "failDesc");
                return (Criteria) this;
            }
    
            public Criteria andFailDescNotEqualTo(String value) {
                addCriterion("FAIL_DESC <>", value, "failDesc");
                return (Criteria) this;
            }
    
            public Criteria andFailDescGreaterThan(String value) {
                addCriterion("FAIL_DESC >", value, "failDesc");
                return (Criteria) this;
            }
    
            public Criteria andFailDescGreaterThanOrEqualTo(String value) {
                addCriterion("FAIL_DESC >=", value, "failDesc");
                return (Criteria) this;
            }
    
            public Criteria andFailDescLessThan(String value) {
                addCriterion("FAIL_DESC <", value, "failDesc");
                return (Criteria) this;
            }
    
            public Criteria andFailDescLessThanOrEqualTo(String value) {
                addCriterion("FAIL_DESC <=", value, "failDesc");
                return (Criteria) this;
            }
    
            public Criteria andFailDescLike(String value) {
                addCriterion("FAIL_DESC like", value, "failDesc");
                return (Criteria) this;
            }
    
            public Criteria andFailDescNotLike(String value) {
                addCriterion("FAIL_DESC not like", value, "failDesc");
                return (Criteria) this;
            }
    
            public Criteria andFailDescIn(List<String> values) {
                addCriterion("FAIL_DESC in", values, "failDesc");
                return (Criteria) this;
            }
    
            public Criteria andFailDescNotIn(List<String> values) {
                addCriterion("FAIL_DESC not in", values, "failDesc");
                return (Criteria) this;
            }
    
            public Criteria andFailDescBetween(String value1, String value2) {
                addCriterion("FAIL_DESC between", value1, value2, "failDesc");
                return (Criteria) this;
            }
    
            public Criteria andFailDescNotBetween(String value1, String value2) {
                addCriterion("FAIL_DESC not between", value1, value2, "failDesc");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmIsNull() {
                addCriterion("REC_CRET_DTTM is null");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmIsNotNull() {
                addCriterion("REC_CRET_DTTM is not null");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmEqualTo(String value) {
                addCriterion("REC_CRET_DTTM =", value, "recCretDttm");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmNotEqualTo(String value) {
                addCriterion("REC_CRET_DTTM <>", value, "recCretDttm");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmGreaterThan(String value) {
                addCriterion("REC_CRET_DTTM >", value, "recCretDttm");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmGreaterThanOrEqualTo(String value) {
                addCriterion("REC_CRET_DTTM >=", value, "recCretDttm");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmLessThan(String value) {
                addCriterion("REC_CRET_DTTM <", value, "recCretDttm");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmLessThanOrEqualTo(String value) {
                addCriterion("REC_CRET_DTTM <=", value, "recCretDttm");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmLike(String value) {
                addCriterion("REC_CRET_DTTM like", value, "recCretDttm");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmNotLike(String value) {
                addCriterion("REC_CRET_DTTM not like", value, "recCretDttm");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmIn(List<String> values) {
                addCriterion("REC_CRET_DTTM in", values, "recCretDttm");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmNotIn(List<String> values) {
                addCriterion("REC_CRET_DTTM not in", values, "recCretDttm");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmBetween(String value1, String value2) {
                addCriterion("REC_CRET_DTTM between", value1, value2, "recCretDttm");
                return (Criteria) this;
            }
    
            public Criteria andRecCretDttmNotBetween(String value1, String value2) {
                addCriterion("REC_CRET_DTTM not between", value1, value2, "recCretDttm");
                return (Criteria) this;
            }
        }
    
        /**
         * This class was generated by MyBatis Generator.
         * This class corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated do_not_delete_during_merge
         */
        public static class Criteria extends GeneratedCriteria {
    
            protected Criteria() {
                super();
            }
        }
    
        /**
         * This class was generated by MyBatis Generator.
         * This class corresponds to the database table MP_IMPORT_MER_DETAIL_INFO
         *
         * @mbggenerated
         */
        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);
            }
        }
    }
    View Code

    这是ExampleMapper对应的xml:

    <?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.ref.mpos.dal.dao.MpImportMerDetailInfoMapper" >
      <resultMap id="BaseResultMap" type="com.ref.mpos.dal.model.MpImportMerDetailInfo" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        <id column="BATCH_NO" property="batchNo" jdbcType="VARCHAR" />
        <id column="ORG_ID" property="orgId" jdbcType="CHAR" />
        <id column="LOGIN_ID" property="loginId" jdbcType="VARCHAR" />
        <result column="MERCH_NAME" property="merchName" jdbcType="VARCHAR" />
        <result column="LEGAL_NAME" property="legalName" jdbcType="VARCHAR" />
        <result column="ID_TYPE" property="idType" jdbcType="CHAR" />
        <result column="ID_NO" property="idNo" jdbcType="VARCHAR" />
        <result column="BANK_NAME" property="bankName" jdbcType="VARCHAR" />
        <result column="BANK_PROV_NAME" property="bankProvName" jdbcType="VARCHAR" />
        <result column="BANK_CITY_NAME" property="bankCityName" jdbcType="VARCHAR" />
        <result column="BRANCH_NAME" property="branchName" jdbcType="VARCHAR" />
        <result column="BANK_ACCT_ID" property="bankAcctId" jdbcType="VARCHAR" />
        <result column="BANK_ACCT_NAME" property="bankAcctName" jdbcType="VARCHAR" />
        <result column="BANK_ACCT_TYPE" property="bankAcctType" jdbcType="VARCHAR" />
        <result column="MEMBER_ID" property="memberId" jdbcType="CHAR" />
        <result column="MP_DEV_ID" property="mpDevId" jdbcType="CHAR" />
        <result column="RESULT" property="result" jdbcType="VARCHAR" />
        <result column="FAIL_DESC" property="failDesc" jdbcType="VARCHAR" />
        <result column="REC_CRET_DTTM" property="recCretDttm" jdbcType="CHAR" />
      </resultMap>
      <sql id="Example_Where_Clause" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        <where >
          <foreach collection="oredCriteria" item="criteria" separator="or" >
            <if test="criteria.valid" >
              <trim prefix="(" suffix=")" prefixOverrides="and" >
                <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                        #{listItem}
                      </foreach>
                    </when>
                  </choose>
                </foreach>
              </trim>
            </if>
          </foreach>
        </where>
      </sql>
      <sql id="Update_By_Example_Where_Clause" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        <where >
          <foreach collection="example.oredCriteria" item="criteria" separator="or" >
            <if test="criteria.valid" >
              <trim prefix="(" suffix=")" prefixOverrides="and" >
                <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                        #{listItem}
                      </foreach>
                    </when>
                  </choose>
                </foreach>
              </trim>
            </if>
          </foreach>
        </where>
      </sql>
      <sql id="Base_Column_List" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        BATCH_NO, ORG_ID, LOGIN_ID, MERCH_NAME, LEGAL_NAME, ID_TYPE, ID_NO, BANK_NAME, BANK_PROV_NAME, 
        BANK_CITY_NAME, BRANCH_NAME, BANK_ACCT_ID, BANK_ACCT_NAME, BANK_ACCT_TYPE, MEMBER_ID, 
        MP_DEV_ID, RESULT, FAIL_DESC, REC_CRET_DTTM
      </sql>
      <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.ref.mpos.dal.model.MpImportMerDetailInfoExample" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        select
        <if test="distinct" >
          distinct
        </if>
        <include refid="Base_Column_List" />
        from MP_IMPORT_MER_DETAIL_INFO
        <if test="_parameter != null" >
          <include refid="Example_Where_Clause" />
        </if>
        <if test="orderByClause != null" >
          order by ${orderByClause}
        </if>
      </select>
      <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.ref.mpos.dal.model.MpImportMerDetailInfoKey" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        select 
        <include refid="Base_Column_List" />
        from MP_IMPORT_MER_DETAIL_INFO
        where BATCH_NO = #{batchNo,jdbcType=VARCHAR}
          and ORG_ID = #{orgId,jdbcType=CHAR}
          and LOGIN_ID = #{loginId,jdbcType=VARCHAR}
      </select>
      <delete id="deleteByPrimaryKey" parameterType="com.ref.mpos.dal.model.MpImportMerDetailInfoKey" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        delete from MP_IMPORT_MER_DETAIL_INFO
        where BATCH_NO = #{batchNo,jdbcType=VARCHAR}
          and ORG_ID = #{orgId,jdbcType=CHAR}
          and LOGIN_ID = #{loginId,jdbcType=VARCHAR}
      </delete>
      <delete id="deleteByExample" parameterType="com.ref.mpos.dal.model.MpImportMerDetailInfoExample" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        delete from MP_IMPORT_MER_DETAIL_INFO
        <if test="_parameter != null" >
          <include refid="Example_Where_Clause" />
        </if>
      </delete>
      <insert id="insert" parameterType="com.ref.mpos.dal.model.MpImportMerDetailInfo" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        insert into MP_IMPORT_MER_DETAIL_INFO (BATCH_NO, ORG_ID, LOGIN_ID, 
          MERCH_NAME, LEGAL_NAME, ID_TYPE, 
          ID_NO, BANK_NAME, BANK_PROV_NAME, 
          BANK_CITY_NAME, BRANCH_NAME, BANK_ACCT_ID, 
          BANK_ACCT_NAME, BANK_ACCT_TYPE, MEMBER_ID, 
          MP_DEV_ID, RESULT, FAIL_DESC, 
          REC_CRET_DTTM)
        values (#{batchNo,jdbcType=VARCHAR}, #{orgId,jdbcType=CHAR}, #{loginId,jdbcType=VARCHAR}, 
          #{merchName,jdbcType=VARCHAR}, #{legalName,jdbcType=VARCHAR}, #{idType,jdbcType=CHAR}, 
          #{idNo,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, #{bankProvName,jdbcType=VARCHAR}, 
          #{bankCityName,jdbcType=VARCHAR}, #{branchName,jdbcType=VARCHAR}, #{bankAcctId,jdbcType=VARCHAR}, 
          #{bankAcctName,jdbcType=VARCHAR}, #{bankAcctType,jdbcType=VARCHAR}, #{memberId,jdbcType=CHAR}, 
          #{mpDevId,jdbcType=CHAR}, #{result,jdbcType=VARCHAR}, #{failDesc,jdbcType=VARCHAR}, 
          #{recCretDttm,jdbcType=CHAR})
      </insert>
      <insert id="insertSelective" parameterType="com.ref.mpos.dal.model.MpImportMerDetailInfo" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        insert into MP_IMPORT_MER_DETAIL_INFO
        <trim prefix="(" suffix=")" suffixOverrides="," >
          <if test="batchNo != null" >
            BATCH_NO,
          </if>
          <if test="orgId != null" >
            ORG_ID,
          </if>
          <if test="loginId != null" >
            LOGIN_ID,
          </if>
          <if test="merchName != null" >
            MERCH_NAME,
          </if>
          <if test="legalName != null" >
            LEGAL_NAME,
          </if>
          <if test="idType != null" >
            ID_TYPE,
          </if>
          <if test="idNo != null" >
            ID_NO,
          </if>
          <if test="bankName != null" >
            BANK_NAME,
          </if>
          <if test="bankProvName != null" >
            BANK_PROV_NAME,
          </if>
          <if test="bankCityName != null" >
            BANK_CITY_NAME,
          </if>
          <if test="branchName != null" >
            BRANCH_NAME,
          </if>
          <if test="bankAcctId != null" >
            BANK_ACCT_ID,
          </if>
          <if test="bankAcctName != null" >
            BANK_ACCT_NAME,
          </if>
          <if test="bankAcctType != null" >
            BANK_ACCT_TYPE,
          </if>
          <if test="memberId != null" >
            MEMBER_ID,
          </if>
          <if test="mpDevId != null" >
            MP_DEV_ID,
          </if>
          <if test="result != null" >
            RESULT,
          </if>
          <if test="failDesc != null" >
            FAIL_DESC,
          </if>
          <if test="recCretDttm != null" >
            REC_CRET_DTTM,
          </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides="," >
          <if test="batchNo != null" >
            #{batchNo,jdbcType=VARCHAR},
          </if>
          <if test="orgId != null" >
            #{orgId,jdbcType=CHAR},
          </if>
          <if test="loginId != null" >
            #{loginId,jdbcType=VARCHAR},
          </if>
          <if test="merchName != null" >
            #{merchName,jdbcType=VARCHAR},
          </if>
          <if test="legalName != null" >
            #{legalName,jdbcType=VARCHAR},
          </if>
          <if test="idType != null" >
            #{idType,jdbcType=CHAR},
          </if>
          <if test="idNo != null" >
            #{idNo,jdbcType=VARCHAR},
          </if>
          <if test="bankName != null" >
            #{bankName,jdbcType=VARCHAR},
          </if>
          <if test="bankProvName != null" >
            #{bankProvName,jdbcType=VARCHAR},
          </if>
          <if test="bankCityName != null" >
            #{bankCityName,jdbcType=VARCHAR},
          </if>
          <if test="branchName != null" >
            #{branchName,jdbcType=VARCHAR},
          </if>
          <if test="bankAcctId != null" >
            #{bankAcctId,jdbcType=VARCHAR},
          </if>
          <if test="bankAcctName != null" >
            #{bankAcctName,jdbcType=VARCHAR},
          </if>
          <if test="bankAcctType != null" >
            #{bankAcctType,jdbcType=VARCHAR},
          </if>
          <if test="memberId != null" >
            #{memberId,jdbcType=CHAR},
          </if>
          <if test="mpDevId != null" >
            #{mpDevId,jdbcType=CHAR},
          </if>
          <if test="result != null" >
            #{result,jdbcType=VARCHAR},
          </if>
          <if test="failDesc != null" >
            #{failDesc,jdbcType=VARCHAR},
          </if>
          <if test="recCretDttm != null" >
            #{recCretDttm,jdbcType=CHAR},
          </if>
        </trim>
      </insert>
      <select id="countByExample" parameterType="com.ref.mpos.dal.model.MpImportMerDetailInfoExample" resultType="java.lang.Integer" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        select count(*) from MP_IMPORT_MER_DETAIL_INFO
        <if test="_parameter != null" >
          <include refid="Example_Where_Clause" />
        </if>
      </select>
      <update id="updateByExampleSelective" parameterType="map" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update MP_IMPORT_MER_DETAIL_INFO
        <set >
          <if test="record.batchNo != null" >
            BATCH_NO = #{record.batchNo,jdbcType=VARCHAR},
          </if>
          <if test="record.orgId != null" >
            ORG_ID = #{record.orgId,jdbcType=CHAR},
          </if>
          <if test="record.loginId != null" >
            LOGIN_ID = #{record.loginId,jdbcType=VARCHAR},
          </if>
          <if test="record.merchName != null" >
            MERCH_NAME = #{record.merchName,jdbcType=VARCHAR},
          </if>
          <if test="record.legalName != null" >
            LEGAL_NAME = #{record.legalName,jdbcType=VARCHAR},
          </if>
          <if test="record.idType != null" >
            ID_TYPE = #{record.idType,jdbcType=CHAR},
          </if>
          <if test="record.idNo != null" >
            ID_NO = #{record.idNo,jdbcType=VARCHAR},
          </if>
          <if test="record.bankName != null" >
            BANK_NAME = #{record.bankName,jdbcType=VARCHAR},
          </if>
          <if test="record.bankProvName != null" >
            BANK_PROV_NAME = #{record.bankProvName,jdbcType=VARCHAR},
          </if>
          <if test="record.bankCityName != null" >
            BANK_CITY_NAME = #{record.bankCityName,jdbcType=VARCHAR},
          </if>
          <if test="record.branchName != null" >
            BRANCH_NAME = #{record.branchName,jdbcType=VARCHAR},
          </if>
          <if test="record.bankAcctId != null" >
            BANK_ACCT_ID = #{record.bankAcctId,jdbcType=VARCHAR},
          </if>
          <if test="record.bankAcctName != null" >
            BANK_ACCT_NAME = #{record.bankAcctName,jdbcType=VARCHAR},
          </if>
          <if test="record.bankAcctType != null" >
            BANK_ACCT_TYPE = #{record.bankAcctType,jdbcType=VARCHAR},
          </if>
          <if test="record.memberId != null" >
            MEMBER_ID = #{record.memberId,jdbcType=CHAR},
          </if>
          <if test="record.mpDevId != null" >
            MP_DEV_ID = #{record.mpDevId,jdbcType=CHAR},
          </if>
          <if test="record.result != null" >
            RESULT = #{record.result,jdbcType=VARCHAR},
          </if>
          <if test="record.failDesc != null" >
            FAIL_DESC = #{record.failDesc,jdbcType=VARCHAR},
          </if>
          <if test="record.recCretDttm != null" >
            REC_CRET_DTTM = #{record.recCretDttm,jdbcType=CHAR},
          </if>
        </set>
        <if test="_parameter != null" >
          <include refid="Update_By_Example_Where_Clause" />
        </if>
      </update>
      <update id="updateByExample" parameterType="map" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update MP_IMPORT_MER_DETAIL_INFO
        set BATCH_NO = #{record.batchNo,jdbcType=VARCHAR},
          ORG_ID = #{record.orgId,jdbcType=CHAR},
          LOGIN_ID = #{record.loginId,jdbcType=VARCHAR},
          MERCH_NAME = #{record.merchName,jdbcType=VARCHAR},
          LEGAL_NAME = #{record.legalName,jdbcType=VARCHAR},
          ID_TYPE = #{record.idType,jdbcType=CHAR},
          ID_NO = #{record.idNo,jdbcType=VARCHAR},
          BANK_NAME = #{record.bankName,jdbcType=VARCHAR},
          BANK_PROV_NAME = #{record.bankProvName,jdbcType=VARCHAR},
          BANK_CITY_NAME = #{record.bankCityName,jdbcType=VARCHAR},
          BRANCH_NAME = #{record.branchName,jdbcType=VARCHAR},
          BANK_ACCT_ID = #{record.bankAcctId,jdbcType=VARCHAR},
          BANK_ACCT_NAME = #{record.bankAcctName,jdbcType=VARCHAR},
          BANK_ACCT_TYPE = #{record.bankAcctType,jdbcType=VARCHAR},
          MEMBER_ID = #{record.memberId,jdbcType=CHAR},
          MP_DEV_ID = #{record.mpDevId,jdbcType=CHAR},
          RESULT = #{record.result,jdbcType=VARCHAR},
          FAIL_DESC = #{record.failDesc,jdbcType=VARCHAR},
          REC_CRET_DTTM = #{record.recCretDttm,jdbcType=CHAR}
        <if test="_parameter != null" >
          <include refid="Update_By_Example_Where_Clause" />
        </if>
      </update>
      <update id="updateByPrimaryKeySelective" parameterType="com.ref.mpos.dal.model.MpImportMerDetailInfo" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update MP_IMPORT_MER_DETAIL_INFO
        <set >
          <if test="merchName != null" >
            MERCH_NAME = #{merchName,jdbcType=VARCHAR},
          </if>
          <if test="legalName != null" >
            LEGAL_NAME = #{legalName,jdbcType=VARCHAR},
          </if>
          <if test="idType != null" >
            ID_TYPE = #{idType,jdbcType=CHAR},
          </if>
          <if test="idNo != null" >
            ID_NO = #{idNo,jdbcType=VARCHAR},
          </if>
          <if test="bankName != null" >
            BANK_NAME = #{bankName,jdbcType=VARCHAR},
          </if>
          <if test="bankProvName != null" >
            BANK_PROV_NAME = #{bankProvName,jdbcType=VARCHAR},
          </if>
          <if test="bankCityName != null" >
            BANK_CITY_NAME = #{bankCityName,jdbcType=VARCHAR},
          </if>
          <if test="branchName != null" >
            BRANCH_NAME = #{branchName,jdbcType=VARCHAR},
          </if>
          <if test="bankAcctId != null" >
            BANK_ACCT_ID = #{bankAcctId,jdbcType=VARCHAR},
          </if>
          <if test="bankAcctName != null" >
            BANK_ACCT_NAME = #{bankAcctName,jdbcType=VARCHAR},
          </if>
          <if test="bankAcctType != null" >
            BANK_ACCT_TYPE = #{bankAcctType,jdbcType=VARCHAR},
          </if>
          <if test="memberId != null" >
            MEMBER_ID = #{memberId,jdbcType=CHAR},
          </if>
          <if test="mpDevId != null" >
            MP_DEV_ID = #{mpDevId,jdbcType=CHAR},
          </if>
          <if test="result != null" >
            RESULT = #{result,jdbcType=VARCHAR},
          </if>
          <if test="failDesc != null" >
            FAIL_DESC = #{failDesc,jdbcType=VARCHAR},
          </if>
          <if test="recCretDttm != null" >
            REC_CRET_DTTM = #{recCretDttm,jdbcType=CHAR},
          </if>
        </set>
        where BATCH_NO = #{batchNo,jdbcType=VARCHAR}
          and ORG_ID = #{orgId,jdbcType=CHAR}
          and LOGIN_ID = #{loginId,jdbcType=VARCHAR}
      </update>
      <update id="updateByPrimaryKey" parameterType="com.ref.mpos.dal.model.MpImportMerDetailInfo" >
        <!--
          WARNING - @mbggenerated
          This element is automatically generated by MyBatis Generator, do not modify.
        -->
        update MP_IMPORT_MER_DETAIL_INFO
        set MERCH_NAME = #{merchName,jdbcType=VARCHAR},
          LEGAL_NAME = #{legalName,jdbcType=VARCHAR},
          ID_TYPE = #{idType,jdbcType=CHAR},
          ID_NO = #{idNo,jdbcType=VARCHAR},
          BANK_NAME = #{bankName,jdbcType=VARCHAR},
          BANK_PROV_NAME = #{bankProvName,jdbcType=VARCHAR},
          BANK_CITY_NAME = #{bankCityName,jdbcType=VARCHAR},
          BRANCH_NAME = #{branchName,jdbcType=VARCHAR},
          BANK_ACCT_ID = #{bankAcctId,jdbcType=VARCHAR},
          BANK_ACCT_NAME = #{bankAcctName,jdbcType=VARCHAR},
          BANK_ACCT_TYPE = #{bankAcctType,jdbcType=VARCHAR},
          MEMBER_ID = #{memberId,jdbcType=CHAR},
          MP_DEV_ID = #{mpDevId,jdbcType=CHAR},
          RESULT = #{result,jdbcType=VARCHAR},
          FAIL_DESC = #{failDesc,jdbcType=VARCHAR},
          REC_CRET_DTTM = #{recCretDttm,jdbcType=CHAR}
        where BATCH_NO = #{batchNo,jdbcType=VARCHAR}
          and ORG_ID = #{orgId,jdbcType=CHAR}
          and LOGIN_ID = #{loginId,jdbcType=VARCHAR}
      </update>
    </mapper>
    View Code

    使用这些可以实现条件查询等。

    一点研究笔记:

    <!--查询使用的sql条件的片段,传入参数是一个Example实例-->    
    <sql id="Example_Where_Clause" >    
        <!--
        [where
            ( X and Y) or (X and Y)
        ]
        -->
        <where >
          <foreach collection="oredCriteria" item="criteria" separator="or" >
            <if test="criteria.valid" >
              <trim prefix="(" suffix=")" prefixOverrides="and" >
                <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                        #{listItem}
                      </foreach>
                    </when>
                  </choose>
                </foreach>
              </trim>
            </if>
          </foreach>
        </where>
    </sql>
    
    <!--查询使用的sql条件的片段,传入参数是一个map-->
    <if test="_parameter != null" >
          <include refid="Update_By_Example_Where_Clause" />
    </if>
    <sql id="Update_By_Example_Where_Clause" >
        <!--
          update TBL_ROUTE_CONTROL
          [setXXX]
          where
        -->
        <where >
          <foreach collection="example.oredCriteria" item="criteria" separator="or" >
            <if test="criteria.valid" >
              <trim prefix="(" suffix=")" prefixOverrides="and" >
                <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                        #{listItem}
                      </foreach>
                    </when>
                  </choose>
                </foreach>
              </trim>
            </if>
          </foreach>
        </where>
      </sql>
  • 相关阅读:
    2019.10.25 csp-s模拟测试87 反思总结
    2020.7.13
    2020.7.12 5. 最长回文子串
    全序列匹配(java)
    2020.7.10 刷题
    Matlab可视化小结
    C-means
    银行家算法(java swing)界面
    完全数——多线程 (Java)
    SIR模型实现(matlab)
  • 原文地址:https://www.cnblogs.com/aigeileshei/p/6118978.html
Copyright © 2020-2023  润新知