generatorConfig.xml 14.1 KB
<?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">

<!--有兴趣了解参考:https://blog.csdn.net/isea533/article/details/42102297-->
<!--有兴趣了解参考:MyBatis Generator使用方法-->
<generatorConfiguration>
    <context id="default" targetRuntime="MyBatis3">
        <plugin type="org.mybatis.generator.plugins.SerializablePlugin" />
        <plugin type="org.mybatis.generator.plugins.ToStringPlugin" />

        <plugin type="com.erry.imac.common.mybatis.generator.plugins.OraclePaginationPlugin" />

        <commentGenerator type="com.erry.imac.common.mybatis.generator.plugins.DefaultCommentGenerator">
            <!--默认的实现类中提供了两个可选属性-->
            <!--阻止生成的注释包含时间戳-->
            <property name="suppressDate" value="true"/>
            <!--阻止生成注释,默认为false-->
            <property name="suppressAllComments" value="false"/>
        </commentGenerator>

        <!--数据库连接-->
        <jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"
                        connectionURL="jdbc:oracle:thin:@192.168.1.250:1521:orcl"
                        userId="iclearimp"
                        password="iclearimp">
            <property name="remarksReporting" value="true"></property>
        </jdbcConnection>

        <!---可以控制是否强制DECIMAL和NUMERIC类型的字段转换为Java类型的java.math.BigDecimal-->
        <javaTypeResolver type="com.erry.imac.common.mybatis.generator.plugins.JavaTypeResolverDefaultImpl">
            <property name="forceBigDecimals" value="false"/>
        </javaTypeResolver>

        <!-- 实体类的包名和存放路径 -->
        <!--
            bi: 基础 系统基础表,例如字典表
            biz: 业务 业务相关的表,例如运单表
            sys:系统 系统相关表,例如kafka表
            log: 日志 日志记录表,例如邮件发送日志表
        -->
        <javaModelGenerator targetPackage="com.fedex.connect.common.model.log" targetProject="src/main/java">
            <!---enableSubPackages:如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性-->
            <property name="enableSubPackages" value="false"/>
            <!--该属性只对MyBatis3有效,如果true就会使用构造方法入参,如果false就会使用setter方式。默认为false-->
            <property name="constructorBased" value="false"/>
            <!--自动去掉不必要的空格-->
            <property name="trimStrings" value="true"/>
            <!--配置实体类属性是否可变 false,实体类属性就可以改变-->
            <property name="immutable" value="false"/>
        </javaModelGenerator>

        <!-- 生成映射文件*.xml的位置-->
        <sqlMapGenerator targetPackage="mapper.log" targetProject="src/main/java/com/fedex/connect/common">
            <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false-->
            <property name="enableSubPackages" value="false"/>
        </sqlMapGenerator>

        <!-- 生成DAO的包名和位置 -->
        <javaClientGenerator type="XMLMAPPER" targetPackage="com.fedex.connect.common.dao.log" targetProject="src/main/java">
            <!--如果true,MBG会根据catalog和schema来生成子包。如果false就会直接用targetPackage属性。默认为false-->
            <property name="enableSubPackages" value="false"/>
        </javaClientGenerator>

        <!--指定需要生成的表名
        domainObjectName 生成的对象名
        enableCountByExample: true 表示生成Count 方法
        enableUpdateByExample: true 表示生成Updae 方法
        enableDeleteByExample: true 表示生成Delete方法
        enableSelectByExample: true 表示生成SelectBy实体 方法
        selectByExampleQueryId: true 表示生成SelectById实体 方法
        generatedKey 指定KEY,Oracle需要指定序列。
        sqlStatement 指定序列名称
        -->
<!--        <table schema="ICLEARIMP" tableName="T_BIZ_USER_CONSIGNMENT_MAPPING" domainObjectName="UserConsignmentMapping"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_USER_CONSIGNMENT_MAPPING.NEXTVAL FROM DUAL" />-->
<!--        </table>-->


<!--        <table schema="ICLEARIMP" tableName="T_LOG_OPERATION" domainObjectName="Operation"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_LOG_OPERATION.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
        <table tableName="T_LOG_EMAIL_HISTORY" domainObjectName="EmailHistory"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_LOG_EMAIL_HISTORY.NEXTVAL FROM DUAL" />
        </table>
<!--        <table tableName="T_LOG_USER_LOGIN_INFO" domainObjectName="UserLoginInfo"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_LOG_USER_LOGIN_INFO.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table tableName="T_BIZ_ATTACHMENT" domainObjectName="Attachment"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_ATTACHMENT.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table tableName="T_BIZ_UPLOAD_RECORD" domainObjectName="UploadRecord"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_UPLOAD_RECORD.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table schema="ICLEARIMP" tableName="T_BIZ_CE_INFO" domainObjectName="CeInfo"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_CE_INFO.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table tableName="T_BIZ_CONSIGNMENT" domainObjectName="Consignment"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_CONSIGNMENT.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table tableName="T_BIZ_EMAIL" domainObjectName="Email"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_EMAIL.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table tableName="T_BIZ_PUSH_OB" domainObjectName="PushOb"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_PUSH_OB.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table tableName="T_BIZ_PUSH_OB_DETAIL" domainObjectName="PushObDetail"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BIZ_PUSH_OB_DETAIL.NEXTVAL FROM DUAL" />-->
<!--        </table>-->



<!--        <table tableName="T_BI_PORTCLEAR_EMAIL_MAPPING" domainObjectName="PortclearEmailMapping"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BI_PORTCLEAR_EMAIL_MAPPING.NEXTVAL FROM DUAL" />-->
<!--        </table>-->

<!--               <table tableName="T_SYS_REDIS_SLAB" domainObjectName="redisSlab"-->
<!--                      enableCountByExample="true" enableUpdateByExample="true"-->
<!--                      enableDeleteByExample="true" enableSelectByExample="true"-->
<!--                      selectByExampleQueryId="true">-->
<!--                   <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_REDIS_SLAB.NEXTVAL FROM DUAL" />-->
<!--               </table>-->
<!--        <table schema="ICLEARIMP" tableName="T_SYS_KAFKA_STORAGE_HISTORY" domainObjectName="KafkaStorageHistory"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_KAFKA_STORAGE_HISTORY.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table schema="ICLEARIMP" tableName="T_SYS_KAFKA_TEMPORARY_STORAGE" domainObjectName="KafkaTemporaryStorage"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table schema="ICLEARIMP" tableName="T_SYS_PARAM_CONFIG" domainObjectName="ParamConfig"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_PARAM_CONFIG.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table tableName="T_SYS_PRIVILEGE" domainObjectName="Privilege"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_PRIVILEGE.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table tableName="T_SYS_ROLE" domainObjectName="Role"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_ROLE.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table tableName="T_SYS_ROLE_PRIVILEGE" domainObjectName="RolePrivilege"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_ROLE_PRIVILEGE.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table schema="ICLEARIMP" tableName="T_SYS_USER" domainObjectName="User"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table schema="ICLEARIMP" tableName="T_SYS_USER_ROLE" domainObjectName="UserRole"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_USER_ROLE.NEXTVAL FROM DUAL" />-->
<!--        </table>-->


<!--        <table tableName="T_BI_DICTIONARY_ENTRIES" domainObjectName="DictionaryEntries"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BI_DICTIONARY_ENTRIES.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
<!--        <table tableName="T_BI_DICTIONARY" domainObjectName="Dictionary"-->
<!--               enableCountByExample="true" enableUpdateByExample="true"-->
<!--               enableDeleteByExample="true" enableSelectByExample="true"-->
<!--               selectByExampleQueryId="true">-->
<!--            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_BI_DICTIONARY.NEXTVAL FROM DUAL" />-->
<!--        </table>-->
    </context>
</generatorConfiguration>