123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE generatorConfiguration
- PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
- "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
- <generatorConfiguration>
- <context id="mysqlgenerator" targetRuntime="MyBatis3">
- <property name="autoDelimitKeywords" value="true"/>
- <!--可以使用``包括字段名,避免字段名与sql保留字冲突报错-->
- <property name="beginningDelimiter" value="`"/>
- <property name="endingDelimiter" value="`"/>
- <!-- 自动生成toString方法 -->
- <plugin type="org.mybatis.generator.plugins.ToStringPlugin"/>
- <!-- 自动生成equals方法和hashcode方法 -->
- <plugin type="org.mybatis.generator.plugins.EqualsHashCodePlugin"/>
- <!-- 非官方插件 https://github.com/itfsw/mybatis-generator-plugin -->
- <!-- 查询单条数据插件 -->
- <plugin type="com.itfsw.mybatis.generator.plugins.SelectOneByExamplePlugin"/>
- <!-- 查询结果选择性返回插件 -->
- <plugin type="com.itfsw.mybatis.generator.plugins.SelectSelectivePlugin"/>
- <!-- Example Criteria 增强插件 -->
- <plugin type="com.itfsw.mybatis.generator.plugins.ExampleEnhancedPlugin"/>
- <!-- 数据Model属性对应Column获取插件 -->
- <plugin type="com.itfsw.mybatis.generator.plugins.ModelColumnPlugin"/>
- <!-- 逻辑删除插件 -->
- <plugin type="com.itfsw.mybatis.generator.plugins.LogicalDeletePlugin">
- <!-- 这里配置的是全局逻辑删除列和逻辑删除值,当然在table中配置的值会覆盖该全局配置 -->
- <!-- 逻辑删除列类型只能为数字、字符串或者布尔类型 -->
- <property name="logicalDeleteColumn" value="deleted"/>
- <!-- 逻辑删除-已删除值 -->
- <property name="logicalDeleteValue" value="1"/>
- <!-- 逻辑删除-未删除值 -->
- <property name="logicalUnDeleteValue" value="0"/>
- </plugin>
- <commentGenerator>
- <property name="suppressDate" value="true"/>
- <!--<property name="suppressAllComments" value="true"/>-->
- </commentGenerator>
- <!--数据库连接信息-->
- <jdbcConnection driverClass="com.mysql.jdbc.Driver"
- connectionURL="jdbc:mysql://127.0.0.1:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&verifyServerCertificate=false&useSSL=false&nullCatalogMeansCurrent=true"
- userId="litemall"
- password="litemall123456"/>
- <javaTypeResolver>
- <property name="useJSR310Types" value="true"/>
- </javaTypeResolver>
- <javaModelGenerator targetPackage="org.linlinjava.litemall.db.domain" targetProject="src/main/java"/>
- <sqlMapGenerator targetPackage="org.linlinjava.litemall.db.dao" targetProject="src/main/resources"/>
- <javaClientGenerator type="XMLMAPPER" targetPackage="org.linlinjava.litemall.db.dao"
- targetProject="src/main/java"/>
- <!--表名-->
- <table tableName="litemall_ad">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_address">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_admin">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- <columnOverride column="role_ids" javaType="java.lang.Integer[]"
- typeHandler="org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler"/>
- </table>
- <table tableName="litemall_brand">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_cart">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- <columnOverride column="specifications" javaType="java.lang.String[]"
- typeHandler="org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"/>
- </table>
- <table tableName="litemall_category">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_collect">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_comment">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- <columnOverride column="pic_urls" javaType="java.lang.String[]"
- typeHandler="org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"/>
- </table>
- <table tableName="litemall_feedback">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- <columnOverride column="pic_urls" javaType="java.lang.String[]"
- typeHandler="org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"/>
- </table>
- <table tableName="litemall_footprint">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_goods">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- <columnOverride column="gallery" javaType="java.lang.String[]"
- typeHandler="org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"/>
- </table>
- <table tableName="litemall_goods_attribute">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_goods_specification">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_goods_product">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- <columnOverride column="specifications" javaType="java.lang.String[]"
- typeHandler="org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"/>
- </table>
- <table tableName="litemall_issue">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_keyword">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_order">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_order_goods">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- <columnOverride column="specifications" javaType="java.lang.String[]"
- typeHandler="org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"/>
- <columnOverride column="comments" javaType="java.lang.Integer[]"
- typeHandler="org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler"/>
- </table>
- <table tableName="litemall_region">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_search_history">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_storage">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_topic">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- <columnOverride column="goods" javaType="java.lang.Integer[]"
- typeHandler="org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler"/>
- </table>
- <table tableName="litemall_user">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_system">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_groupon_rules">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_groupon">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_coupon">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- <columnOverride column="goods_value" javaType="java.lang.Integer[]"
- typeHandler="org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler"/>
- </table>
- <table tableName="litemall_coupon_user">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_role">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_permission">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_log">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_notice">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_notice_admin">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- </table>
- <table tableName="litemall_aftersale">
- <generatedKey column="id" sqlStatement="MySql" identity="true"/>
- <columnOverride column="pictures" javaType="java.lang.String[]"
- typeHandler="org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"/>
- </table>
- </context>
- </generatorConfiguration>
|