Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-evbusiness-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a4778b36
authored
Nov 14, 2023
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]逆向工程
1 parent
5b3410e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
57 deletions
platform-evbusiness/src/test/resources/generatorConfig.xml
pom.xml
platform-evbusiness/src/test/resources/generatorConfig.xml
View file @
a4778b3
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE generatorConfiguration PUBLIC
<?xml version="1.0" encoding="UTF-8" ?>
"-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<!-- 确保已安装mybatis generator eclipse插件 -->
<!-- 配置生成器 -->
<generatorConfiguration>
<generatorConfiguration>
<!--classPathEntry:数据库的JDBC驱动,换成你自己的驱动位置 可选 -->
<!-- <classPathEntry location="F://jdbc//mysql-connector-java-8.0.18.jar"/>-->
<!-- 一个数据库一个context -->
<context
id=
"DB2Tables"
targetRuntime=
"Mybatis3"
>
<!-- 自动识别数据库关键字,默认false,如果设置为true,根据SqlReservedWords中定义的关键字列表;一般保留默认值,遇到数据库关键字(Java关键字),使用columnOverride覆盖 -->
<property
name=
"autoDelimitKeywords"
value=
"true"
/>
<!-- 生成的Java文件的编码 -->
<property
name=
"javaFileEncoding"
value=
"utf-8"
/>
<!-- beginningDelimiter和endingDelimiter:指明数据库的用于标记数据库对象名的符号,比如ORACLE就是双引号,MYSQL默认是`反引号; -->
<property
name=
"beginningDelimiter"
value=
"`"
/>
<property
name=
"endingDelimiter"
value=
"`"
/>
<!-- 格式化java代码 -->
<property
name=
"javaFormatter"
value=
"org.mybatis.generator.api.dom.DefaultJavaFormatter"
/>
<!-- 格式化XML代码 -->
<property
name=
"xmlFormatter"
value=
"org.mybatis.generator.api.dom.DefaultXmlFormatter"
/>
<plugin
type=
"org.mybatis.generator.plugins.SerializablePlugin"
/>
<plugin
type=
"org.mybatis.generator.plugins.ToStringPlugin"
/>
<!-- 配置 tk.mybatis 插件 -->
<context
id=
"DB2Tables"
targetRuntime=
"MyBatis3"
>
<property
name=
"javaFileEncoding"
value=
"UTF-8"
/>
<plugin
type=
"tk.mybatis.mapper.generator.MapperPlugin"
>
<plugin
type=
"tk.mybatis.mapper.generator.MapperPlugin"
>
<property
name=
"mappers"
value=
"com.glsx.plat.mybatis.mapper.CommonBaseMapper"
/>
<property
name=
"mappers"
value=
"com.glsx.plat.mybatis.mapper.CommonBaseMapper"
/>
<property
name=
"caseSensitive"
value=
"true"
/>
<property
name=
"useActualColumnNames"
value=
"true"
/>
<!--<property name="beginningDelimiter" value="`"/>-->
<!--<property name="endingDelimiter" value="`"/>-->
</plugin>
</plugin>
<!--配置生成注释信息,最多配置一个 -->
<commentGenerator>
<!-- 阻止生成注释包含时间戳 默认为false -->
<property
name=
"suppressDate"
value=
"true"
/>
<!-- 注释是否添加数据库表的备注信息 默认为false -->
<property
name=
"addRemarkComments"
value=
"true"
/>
</commentGenerator>
<!-- jdbc连接-->
<jdbcConnection
driverClass=
"com.mysql.cj.jdbc.Driver"
<jdbcConnection
driverClass=
"com.mysql.cj.jdbc.Driver"
connectionURL=
"jdbc:mysql://192.168.0.39:3306/seata_storage
?serverTimeZone=Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false"
connectionURL=
"jdbc:mysql://192.168.3.227:3306/platform_charging
?serverTimeZone=Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false"
userId=
"root
"
userId=
"dev_admin
"
password=
"123456
"
>
password=
"1f7e1ed2
"
>
<!--防止生成其他库同名表-->
<!--防止生成其他库同名表-->
<property
name=
"nullCatalogMeansCurrent"
value=
"true"
/>
<property
name=
"nullCatalogMeansCurrent"
value=
"true"
/>
</jdbcConnection>
</jdbcConnection>
<!-- 类型转换 -->
<javaTypeResolver>
<javaTypeResolver>
<!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) -->
<property
name=
"forceBigDecimals"
value=
"false"
/>
<property
name=
"forceBigDecimals"
value=
"false"
/>
</javaTypeResolver>
</javaTypeResolver>
<!-- 生成实体类地址 -->
<!-- api绝对路径-->
<javaModelGenerator
targetPackage=
"cn.com.payu.modules.entity"
targetProject=
"src/main/java"
>
<javaModelGenerator
targetPackage=
"cn.com.glsx.evbusiness.modules.entity"
targetProject=
"F:\360MoveData\Users\11\Desktop\企微SAAS\2023\11\cdzyw\platform-evbusiness-server\platform-evbusiness-api\src\main\java"
>
<!-- 是否让schema作为包的后缀 -->
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"trimStrings"
value=
"true"
/>
<!-- 从数据库返回的值去掉前后空格 -->
<property
name=
"trimStrings"
value=
"true"
/>
</javaModelGenerator>
</javaModelGenerator>
<sqlMapGenerator
targetPackage=
"mapper"
targetProject=
"src\main\resources"
>
<!-- 生成mapper.xml文件存放地址 -->
<property
name=
"enableSubPackages"
value=
"false"
/>
<sqlMapGenerator
targetPackage=
"mapper"
targetProject=
"src/main/resources"
>
<property
name=
"enableSubPackages"
value=
"true"
/>
</sqlMapGenerator>
</sqlMapGenerator>
<!--
生成接口dao type="ANNOTATEDMAPPER",生成Java Model 和基于注解的Mapper对象 type="MIXEDMAPPER",生成基于注解的Java Model 和相应的Mapper对象 type="XMLMAPPER",生成SQLMap XML文件和独立的Mapper接口
-->
<!--
api绝对路径
-->
<javaClientGenerator
targetPackage=
"cn.com.
payu.modules.mapper"
targetProject=
"src/main/
java"
type=
"XMLMAPPER"
>
<javaClientGenerator
targetPackage=
"cn.com.
glsx.evbusiness.modules.mapper"
targetProject=
"F:\360MoveData\Users\11\Desktop\企微SAAS\2023\11\cdzyw\platform-evbusiness-server\platform-evbusiness-api\src\main\
java"
type=
"XMLMAPPER"
>
<property
name=
"enableSubPackages"
value=
"
false"
/>
<property
name=
"enableSubPackages"
value=
"
true"
/>
</javaClientGenerator>
</javaClientGenerator>
<!-- table可以有多个,每个数据库中的表都可以写一个table,tableName表示要匹配的数据库表,也可以在tableName属性中通过使用%通配符来匹配所有数据库表,只有匹配的表才会自动生成文件 enableSelectByPrimaryKey相应的配置表示是否生成相应的接口 -->
<table
tableName=
"charging_order"
domainObjectName=
"ChargingOrder"
enableSelectByExample=
"false"
enableCountByExample=
"false"
enableDeleteByExample=
"false"
enableUpdateByExample=
"false"
>
<table
tableName=
"t_storage"
domainObjectName=
"Storage"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
identity=
"true"
/>
</table>
<table
tableName=
"charging_order_detail"
domainObjectName=
"ChargingOrderDetail"
enableSelectByExample=
"false"
enableCountByExample=
"false"
enableDeleteByExample=
"false"
enableUpdateByExample=
"false"
>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
identity=
"true"
/>
</table>
<table
tableName=
"charging_order_monitorinfo"
domainObjectName=
"ChargingOrderMonitorinfo"
enableSelectByExample=
"false"
enableCountByExample=
"false"
enableDeleteByExample=
"false"
enableUpdateByExample=
"false"
>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
identity=
"true"
/>
</table>
</context>
</context>
</generatorConfiguration>
</generatorConfiguration>
\ No newline at end of file
\ No newline at end of file
pom.xml
View file @
a4778b3
...
@@ -56,9 +56,11 @@
...
@@ -56,9 +56,11 @@
<plugin>
<plugin>
<groupId>
org.mybatis.generator
</groupId>
<groupId>
org.mybatis.generator
</groupId>
<artifactId>
mybatis-generator-maven-plugin
</artifactId>
<artifactId>
mybatis-generator-maven-plugin
</artifactId>
<configuration>
</plugin>
<skip>
true
</skip>
<plugin>
</configuration>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-archetype-plugin
</artifactId>
<version>
3.2.0
</version>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment