原文链接:http://www.mamicode.com/info-detail-445217.html
TEP 0.在Intellij IDEA创建maven项目(本过程比较简单,略)
STEP 1. 在maven项目的pom.xml 添加mybatis-generator-maven-plugin 插件
xxx org.mybatis.generator mybatis-generator-maven-plugin 1.3.2 true true
STEP 2. 在maven项目下的src/main/resources 目录下建立名为 generatorConfig.xml的配置文件,作为mybatis-generator-maven-plugin 插件的执行目标,模板如下:
这里使用了外置的配置文件generator.properties,可以将一下属性配置到properties文件之中,增加配置的灵活性:
jdbc.driverLocation=D:\\maven\\com\\oracle\\ojdbc14\\10.2.0.4.0\\ojdbc14-10.2.0.4.0.jarjdbc.driverClass=oracle.jdbc.driver.OracleDriverjdbc.connectionURL=jdbc:oracle:thin:@//localhost:1521/XEjdbc.userId=LOUISjdbc.password=123456项目目录如下:
STEP 3. 在Intellij IDEA添加一个“Run运行”选项,使用maven运行mybatis-generator-maven-plugin插件 :
之后弹出运行配置框,为当前配置配置一个名称,这里其名为"generator",然后在 “Command line” 选项中输入“mybatis-generator:generate -e”
这里加了“-e ”选项是为了让该插件输出详细信息,这样可以帮助我们定位问题。
如果添加成功,则会在run 选项中有“generator” 选项,如下:
点击运行,然后不出意外的话,会在控制台输出:
C:\Java\jdk1.7.0_71\bin\java -Dmaven.home=D:\software\apache-maven-3.0.5-bin -Dclassworlds.conf=D:\software\apache-maven-3.0.5-bin\bin\m2.conf -Didea.launcher.port=7533 "-Didea.launcher.bin.path=D:\applications\JetBrains\IntelliJ IDEA 14.0.2\bin" -Dfile.encoding=UTF-8 -classpath "D:\software\apache-maven-3.0.5-bin\boot\plexus-classworlds-2.4.jar;D:\applications\JetBrains\IntelliJ IDEA 14.0.2\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=14.0.2 -s D:\software\apache-maven-3.0.5-bin\conf\settings.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.lessionlog4j: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\tutor\src\main\java\org\louis\hometutor\po\Lession.java was overwritten[WARNING] Existing file E:\sources\tutor\src\main\java\com\foo\tourist\dao\LessionMapper.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的配置文件内容:
我的会生成model、mapper、modelDoExample,xxDoExampleMapper,以及对应的xml
这是生成的DoExample:
View Codepackage 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 ListoredCriteria; /** * 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 (); } /** * 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 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 criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList (); } public boolean isValid() { return criteria.size() > 0; } public List getAllCriteria() { return criteria; } public List 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 values) { addCriterion("BATCH_NO in", values, "batchNo"); return (Criteria) this; } public Criteria andBatchNoNotIn(List 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 values) { addCriterion("ORG_ID in", values, "orgId"); return (Criteria) this; } public Criteria andOrgIdNotIn(List 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 values) { addCriterion("LOGIN_ID in", values, "loginId"); return (Criteria) this; } public Criteria andLoginIdNotIn(List 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 values) { addCriterion("MERCH_NAME in", values, "merchName"); return (Criteria) this; } public Criteria andMerchNameNotIn(List 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 values) { addCriterion("LEGAL_NAME in", values, "legalName"); return (Criteria) this; } public Criteria andLegalNameNotIn(List 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 values) { addCriterion("ID_TYPE in", values, "idType"); return (Criteria) this; } public Criteria andIdTypeNotIn(List 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 values) { addCriterion("ID_NO in", values, "idNo"); return (Criteria) this; } public Criteria andIdNoNotIn(List 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 values) { addCriterion("BANK_NAME in", values, "bankName"); return (Criteria) this; } public Criteria andBankNameNotIn(List 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 values) { addCriterion("BANK_PROV_NAME in", values, "bankProvName"); return (Criteria) this; } public Criteria andBankProvNameNotIn(List 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 values) { addCriterion("BANK_CITY_NAME in", values, "bankCityName"); return (Criteria) this; } public Criteria andBankCityNameNotIn(List 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 values) { addCriterion("BRANCH_NAME in", values, "branchName"); return (Criteria) this; } public Criteria andBranchNameNotIn(List 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 values) { addCriterion("BANK_ACCT_ID in", values, "bankAcctId"); return (Criteria) this; } public Criteria andBankAcctIdNotIn(List 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 values) { addCriterion("BANK_ACCT_NAME in", values, "bankAcctName"); return (Criteria) this; } public Criteria andBankAcctNameNotIn(List 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 values) { addCriterion("BANK_ACCT_TYPE in", values, "bankAcctType"); return (Criteria) this; } public Criteria andBankAcctTypeNotIn(List 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 values) { addCriterion("MEMBER_ID in", values, "memberId"); return (Criteria) this; } public Criteria andMemberIdNotIn(List 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 values) { addCriterion("MP_DEV_ID in", values, "mpDevId"); return (Criteria) this; } public Criteria andMpDevIdNotIn(List 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 values) { addCriterion("RESULT in", values, "result"); return (Criteria) this; } public Criteria andResultNotIn(List 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 values) { addCriterion("FAIL_DESC in", values, "failDesc"); return (Criteria) this; } public Criteria andFailDescNotIn(List 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 values) { addCriterion("REC_CRET_DTTM in", values, "recCretDttm"); return (Criteria) this; } public Criteria andRecCretDttmNotIn(List 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); } }} 这是ExampleMapper对应的xml:
View Codeand ${criterion.condition} and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{listItem} and ${criterion.condition} and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{listItem} 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 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 from MP_IMPORT_MER_DETAIL_INFO 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 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, #{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}, update MP_IMPORT_MER_DETAIL_INFO 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}, 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} update MP_IMPORT_MER_DETAIL_INFO where BATCH_NO = #{batchNo,jdbcType=VARCHAR} and ORG_ID = #{orgId,jdbcType=CHAR} and LOGIN_ID = #{loginId,jdbcType=VARCHAR} 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}, 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}
使用这些可以实现条件查询等。
一点研究笔记:
<!-- [where ( X and Y) or (X and Y) ] --> and ${criterion.condition} and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{listItem} and ${criterion.condition} and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{listItem}