generatorConfig.xml 15.7 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>

        <!-- 实体类的包名和存放路径 -->
        <!--
            base: 基础 系统基础表,例如字典表
            biz: 业务 业务相关的表,例如运单表
            sys:系统 系统相关表,例如kafka表
            log: 日志 日志记录表,例如邮件发送日志表
        -->
        <javaModelGenerator targetPackage="com.fedex.connect.common.model.sys" 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.sys" 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.sys" 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 tableName="T_SYS_USER" domainObjectName="SysUser"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_USER.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_SYS_ROLE_INFO" domainObjectName="SysRoleInfo"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_ROLE_INFO.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_SYS_USER_ROLE" domainObjectName="SysUserRole"
               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_TASK_MANAGEMENT" domainObjectName="TaskManagement"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_TASK_MANAGEMENT.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_SYS_MENU_INFO" domainObjectName="SysMenuInfo"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_MENU_INFO.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_SYS_DICTIONARY" domainObjectName="SysDictionary"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_SYS_DICTIONARY.NEXTVAL FROM DUAL" />
        </table>

        <table tableName="T_LOG_LOGIN" domainObjectName="LogLogin"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_LOG_LOGIN.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_LOG_OPERATION" domainObjectName="LogOperation"
               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_MAIL" domainObjectName="LogMail"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_LOG_MAIL.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_LOG_UPLOAD" domainObjectName="LogUpload"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_LOG_UPLOAD.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_DECLARE_TEMPLATE" domainObjectName="DeclareTemplate"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_DECLARE_TEMPLATE.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_DECLARE" domainObjectName="Declare"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_DECLARE.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_DECLARE_INFO" domainObjectName="DeclareInfo"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_DECLARE_INFO.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_DECLARE_CHECK_INFO" domainObjectName="DeclareCheckInfo"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_DECLARE_CHECK_INFO.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_DECLARE_CUSTOMS_FILE" domainObjectName="DeclareCustomsFile"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_DECLARE_CUSTOMS_FILE.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_TASK_MANAGEMENT" domainObjectName="TaskManagement"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_TASK_MANAGEMENT.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_UPLOAD_FILE" domainObjectName="UploadFile"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_UPLOAD_FILE.NEXTVAL FROM DUAL" />
        </table>
         <table tableName="T_MAIL_HTML_RECEIPT_LIST" domainObjectName="MailHtmlReceiptList"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_DECLARE_TEMPLATE.NEXTVAL FROM DUAL" />
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_MAIL_HTML_RECEIPT_LIST.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_MAIL_HTML_RECEIPT_INFO" domainObjectName="MailHtmlReceiptInfo"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_MAIL_HTML_RECEIPT_INFO.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_RECEIPT_SYNC_TASK" domainObjectName="ReceiptSyncTask"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_RECEIPT_SYNC_TASK.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_SYS_PARAM_CONFIG" domainObjectName="SysParamConfig"
               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_CUSTOMS_CLEARANCE_VIP_INFO" domainObjectName="CustomsClearanceVipInfo"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_CC_VIP_INFO.NEXTVAL FROM DUAL" />
        </table>
        -->
        <!--
        <table tableName="T_KAFKA_TEMPORARY_STORAGE" domainObjectName="KafkaTemporaryStorage"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_KAFKA_TEMPORARY_STORAGE.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_KAFKA_STORAGE_HISTORY" domainObjectName="KafkaStorageHistory"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_KAFKA_STORAGE_HISTORY.NEXTVAL FROM DUAL" />
        </table>
        <table tableName="T_BIZ_CE_INFO" domainObjectName="BizCeInfo"
               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_LOG_EMAIL_SEND" domainObjectName="LogEmailSend"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_LOG_EMAIL_SEND.NEXTVAL FROM DUAL" />
        </table>
        -->

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

        <table tableName="T_PUSH_OB_LOG" domainObjectName="PushObLog"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_PUSH_OB_LOG.NEXTVAL FROM DUAL" />
        </table>

        <table tableName="T_PUSH_OB_DETAIL" domainObjectName="PushObDetail"
               enableCountByExample="true" enableUpdateByExample="true"
               enableDeleteByExample="true" enableSelectByExample="true"
               selectByExampleQueryId="true">
            <generatedKey column="ID" sqlStatement="SELECT SEQ_T_PUSH_OB_DETAIL.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>