Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv-springboot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bsoft
sv-springboot
Commits
8d2963a6
Commit
8d2963a6
authored
Oct 21, 2019
by
whl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mybatis逆向工程配置
parent
db240044
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
373 additions
and
79 deletions
+373
-79
bsoft-api/pom.xml
+8
-0
bsoft-api/src/main/java/com/bsoft/api/mapper/SysUserMapper.java
+33
-5
bsoft-api/src/main/java/com/bsoft/api/model/SysUser.java
+259
-27
bsoft-api/src/main/resources/mapper/SysUserMapper.xml
+64
-41
bsoft-api/src/test/resources/generatorConfig.xml
+9
-6
No files found.
bsoft-api/pom.xml
View file @
8d2963a6
...
@@ -91,6 +91,14 @@
...
@@ -91,6 +91,14 @@
</dependency>
</dependency>
<!--endregion-->
<!--endregion-->
<!--region Oracle-->
<dependency>
<groupId>
org.oracle
</groupId>
<artifactId>
ojdbc6
</artifactId>
<version>
6.0
</version>
</dependency>
<!--endregion-->
<!--region mssql-->
<!--region mssql-->
<dependency>
<dependency>
<groupId>
com.microsoft.sqlserver
</groupId>
<groupId>
com.microsoft.sqlserver
</groupId>
...
...
bsoft-api/src/main/java/com/bsoft/api/mapper/SysUserMapper.java
View file @
8d2963a6
package
com
.
bsoft
.
api
.
mapper
;
package
com
.
bsoft
.
api
.
mapper
;
import
com.bsoft.api.model.SysUser
;
import
com.bsoft.api.model.SysUser
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.List
;
public
interface
SysUserMapper
{
public
interface
SysUserMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table LL.SYS_USER
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
int
deleteByPrimaryKey
(
BigDecimal
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table LL.SYS_USER
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
int
insert
(
SysUser
record
);
int
insert
(
SysUser
record
);
SysUser
selectByPrimaryKey
(
Integer
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table LL.SYS_USER
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
SysUser
selectByPrimaryKey
(
BigDecimal
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table LL.SYS_USER
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
List
<
SysUser
>
selectAll
();
List
<
SysUser
>
selectAll
();
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table LL.SYS_USER
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
int
updateByPrimaryKey
(
SysUser
record
);
int
updateByPrimaryKey
(
SysUser
record
);
SysUser
selectByCode
(
String
code
);
}
}
\ No newline at end of file
bsoft-api/src/main/java/com/bsoft/api/model/SysUser.java
View file @
8d2963a6
package
com
.
bsoft
.
api
.
model
;
package
com
.
bsoft
.
api
.
model
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
public
class
SysUser
{
public
class
SysUser
{
private
Integer
id
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.ID
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
private
BigDecimal
id
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.CREATE_DATE
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
private
Date
createDate
;
private
Date
createDate
;
private
Integer
createUserid
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.CREATE_USERID
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
private
BigDecimal
createUserid
;
private
Integer
state
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.STATE
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
private
BigDecimal
state
;
private
String
userCode
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.USER_CODE
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
private
Object
userCode
;
private
String
userName
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.USER_NAME
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
private
Object
userName
;
private
String
password
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.PASSWORD
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
private
Object
password
;
private
String
idcard
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.IDCARD
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
private
Object
idcard
;
private
String
sex
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.SEX
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
private
Object
sex
;
private
String
mobile
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.MOBILE
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
private
Object
mobile
;
public
Integer
getId
()
{
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.ID
*
* @return the value of LL.SYS_USER.ID
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
BigDecimal
getId
()
{
return
id
;
return
id
;
}
}
public
void
setId
(
Integer
id
)
{
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.ID
*
* @param id the value for LL.SYS_USER.ID
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
void
setId
(
BigDecimal
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.CREATE_DATE
*
* @return the value of LL.SYS_USER.CREATE_DATE
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
Date
getCreateDate
()
{
public
Date
getCreateDate
()
{
return
createDate
;
return
createDate
;
}
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.CREATE_DATE
*
* @param createDate the value for LL.SYS_USER.CREATE_DATE
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
void
setCreateDate
(
Date
createDate
)
{
public
void
setCreateDate
(
Date
createDate
)
{
this
.
createDate
=
createDate
;
this
.
createDate
=
createDate
;
}
}
public
Integer
getCreateUserid
()
{
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.CREATE_USERID
*
* @return the value of LL.SYS_USER.CREATE_USERID
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
BigDecimal
getCreateUserid
()
{
return
createUserid
;
return
createUserid
;
}
}
public
void
setCreateUserid
(
Integer
createUserid
)
{
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.CREATE_USERID
*
* @param createUserid the value for LL.SYS_USER.CREATE_USERID
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
void
setCreateUserid
(
BigDecimal
createUserid
)
{
this
.
createUserid
=
createUserid
;
this
.
createUserid
=
createUserid
;
}
}
public
Integer
getState
()
{
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.STATE
*
* @return the value of LL.SYS_USER.STATE
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
BigDecimal
getState
()
{
return
state
;
return
state
;
}
}
public
void
setState
(
Integer
state
)
{
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.STATE
*
* @param state the value for LL.SYS_USER.STATE
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
void
setState
(
BigDecimal
state
)
{
this
.
state
=
state
;
this
.
state
=
state
;
}
}
public
String
getUserCode
()
{
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.USER_CODE
*
* @return the value of LL.SYS_USER.USER_CODE
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
Object
getUserCode
()
{
return
userCode
;
return
userCode
;
}
}
public
void
setUserCode
(
String
userCode
)
{
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.USER_CODE
*
* @param userCode the value for LL.SYS_USER.USER_CODE
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
void
setUserCode
(
Object
userCode
)
{
this
.
userCode
=
userCode
;
this
.
userCode
=
userCode
;
}
}
public
String
getUserName
()
{
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.USER_NAME
*
* @return the value of LL.SYS_USER.USER_NAME
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
Object
getUserName
()
{
return
userName
;
return
userName
;
}
}
public
void
setUserName
(
String
userName
)
{
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.USER_NAME
*
* @param userName the value for LL.SYS_USER.USER_NAME
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
void
setUserName
(
Object
userName
)
{
this
.
userName
=
userName
;
this
.
userName
=
userName
;
}
}
public
String
getPassword
()
{
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.PASSWORD
*
* @return the value of LL.SYS_USER.PASSWORD
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
Object
getPassword
()
{
return
password
;
return
password
;
}
}
public
void
setPassword
(
String
password
)
{
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.PASSWORD
*
* @param password the value for LL.SYS_USER.PASSWORD
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
void
setPassword
(
Object
password
)
{
this
.
password
=
password
;
this
.
password
=
password
;
}
}
public
String
getIdcard
()
{
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.IDCARD
*
* @return the value of LL.SYS_USER.IDCARD
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
Object
getIdcard
()
{
return
idcard
;
return
idcard
;
}
}
public
void
setIdcard
(
String
idcard
)
{
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.IDCARD
*
* @param idcard the value for LL.SYS_USER.IDCARD
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
void
setIdcard
(
Object
idcard
)
{
this
.
idcard
=
idcard
;
this
.
idcard
=
idcard
;
}
}
public
String
getSex
()
{
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.SEX
*
* @return the value of LL.SYS_USER.SEX
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
Object
getSex
()
{
return
sex
;
return
sex
;
}
}
public
void
setSex
(
String
sex
)
{
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.SEX
*
* @param sex the value for LL.SYS_USER.SEX
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
void
setSex
(
Object
sex
)
{
this
.
sex
=
sex
;
this
.
sex
=
sex
;
}
}
public
String
getMobile
()
{
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.MOBILE
*
* @return the value of LL.SYS_USER.MOBILE
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
Object
getMobile
()
{
return
mobile
;
return
mobile
;
}
}
public
void
setMobile
(
String
mobile
)
{
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.MOBILE
*
* @param mobile the value for LL.SYS_USER.MOBILE
*
* @mbg.generated Mon Oct 21 11:03:43 CST 2019
*/
public
void
setMobile
(
Object
mobile
)
{
this
.
mobile
=
mobile
;
this
.
mobile
=
mobile
;
}
}
}
}
\ No newline at end of file
bsoft-api/src/main/resources/mapper/SysUserMapper.xml
View file @
8d2963a6
...
@@ -2,62 +2,84 @@
...
@@ -2,62 +2,84 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.bsoft.api.mapper.SysUserMapper"
>
<mapper
namespace=
"com.bsoft.api.mapper.SysUserMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysUser"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SysUser"
>
<id
column=
"ID"
jdbcType=
"INTEGER"
property=
"id"
/>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon Oct 21 11:03:43 CST 2019.
-->
<id
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"
INTEGER
"
property=
"createUserid"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"
DECIMAL
"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"
INTEGER
"
property=
"state"
/>
<result
column=
"STATE"
jdbcType=
"
DECIMAL
"
property=
"state"
/>
<result
column=
"USER_CODE"
jdbcType=
"
VARCHA
R"
property=
"userCode"
/>
<result
column=
"USER_CODE"
jdbcType=
"
OTHE
R"
property=
"userCode"
/>
<result
column=
"USER_NAME"
jdbcType=
"
VARCHA
R"
property=
"userName"
/>
<result
column=
"USER_NAME"
jdbcType=
"
OTHE
R"
property=
"userName"
/>
<result
column=
"PASSWORD"
jdbcType=
"
VARCHA
R"
property=
"password"
/>
<result
column=
"PASSWORD"
jdbcType=
"
OTHE
R"
property=
"password"
/>
<result
column=
"IDCARD"
jdbcType=
"
VARCHA
R"
property=
"idcard"
/>
<result
column=
"IDCARD"
jdbcType=
"
OTHE
R"
property=
"idcard"
/>
<result
column=
"SEX"
jdbcType=
"
VARCHA
R"
property=
"sex"
/>
<result
column=
"SEX"
jdbcType=
"
OTHE
R"
property=
"sex"
/>
<result
column=
"MOBILE"
jdbcType=
"
VARCHA
R"
property=
"mobile"
/>
<result
column=
"MOBILE"
jdbcType=
"
OTHE
R"
property=
"mobile"
/>
</resultMap>
</resultMap>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.math.BigDecimal"
>
delete from sys_user
<!--
where ID = #{id,jdbcType=INTEGER}
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon Oct 21 11:03:43 CST 2019.
-->
delete from LL.SYS_USER
where ID = #{id,jdbcType=DECIMAL}
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysUser"
>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SysUser"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
<!--
SELECT LAST_INSERT_ID()
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon Oct 21 11:03:43 CST 2019.
-->
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
select SEQ_SYS_USER_ID.nextval from dual
</selectKey>
</selectKey>
insert into
sys_user
(CREATE_DATE, CREATE_USERID, STATE,
insert into
LL.SYS_USER
(CREATE_DATE, CREATE_USERID, STATE,
USER_CODE, USER_NAME, PASSWORD,
USER_CODE, USER_NAME, PASSWORD,
IDCARD, SEX, MOBILE
IDCARD, SEX, MOBILE)
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=INTEGER}, #{state,jdbcType=INTEGER},
#{userCode,jdbcType=OTHER}, #{userName,jdbcType=OTHER}, #{password,jdbcType=OTHER},
#{userCode,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{idcard,jdbcType=OTHER}, #{sex,jdbcType=OTHER}, #{mobile,jdbcType=OTHER})
#{idcard,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}
)
</insert>
</insert>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysUser"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.bsoft.api.model.SysUser"
>
update sys_user
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon Oct 21 11:03:43 CST 2019.
-->
update LL.SYS_USER
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=
INTEGER
},
CREATE_USERID = #{createUserid,jdbcType=
DECIMAL
},
STATE = #{state,jdbcType=
INTEGER
},
STATE = #{state,jdbcType=
DECIMAL
},
USER_CODE = #{userCode,jdbcType=
VARCHA
R},
USER_CODE = #{userCode,jdbcType=
OTHE
R},
USER_NAME = #{userName,jdbcType=
VARCHA
R},
USER_NAME = #{userName,jdbcType=
OTHE
R},
PASSWORD = #{password,jdbcType=
VARCHA
R},
PASSWORD = #{password,jdbcType=
OTHE
R},
IDCARD = #{idcard,jdbcType=
VARCHA
R},
IDCARD = #{idcard,jdbcType=
OTHE
R},
SEX = #{sex,jdbcType=
VARCHA
R},
SEX = #{sex,jdbcType=
OTHE
R},
MOBILE = #{mobile,jdbcType=
VARCHA
R}
MOBILE = #{mobile,jdbcType=
OTHE
R}
where ID = #{id,jdbcType=
INTEGER
}
where ID = #{id,jdbcType=
DECIMAL
}
</update>
</update>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.math.BigDecimal"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon Oct 21 11:03:43 CST 2019.
-->
select ID, CREATE_DATE, CREATE_USERID, STATE, USER_CODE, USER_NAME, PASSWORD, IDCARD,
select ID, CREATE_DATE, CREATE_USERID, STATE, USER_CODE, USER_NAME, PASSWORD, IDCARD,
SEX, MOBILE
SEX, MOBILE
from
sys_user
from
LL.SYS_USER
where ID = #{id,jdbcType=
INTEGER
}
where ID = #{id,jdbcType=
DECIMAL
}
</select>
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon Oct 21 11:03:43 CST 2019.
-->
select ID, CREATE_DATE, CREATE_USERID, STATE, USER_CODE, USER_NAME, PASSWORD, IDCARD,
select ID, CREATE_DATE, CREATE_USERID, STATE, USER_CODE, USER_NAME, PASSWORD, IDCARD,
SEX, MOBILE
SEX, MOBILE
from sys_user
from LL.SYS_USER
</select>
<select
id=
"selectByCode"
resultMap=
"BaseResultMap"
>
select ID, CREATE_DATE, CREATE_USERID, STATE, USER_CODE, USER_NAME, PASSWORD, IDCARD,
SEX, MOBILE
from sys_user
where USER_CODE=#{code,jdbcType=VARCHAR}
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
bsoft-api/src/test/resources/generatorConfig.xml
View file @
8d2963a6
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<!-- 引入配置文件 -->
<!-- 引入配置文件 -->
<properties
resource=
"./application-dev.properties"
/>
<properties
resource=
"./application-dev.properties"
/>
<context
id=
"
Mysql
"
targetRuntime=
"MyBatis3Simple"
defaultModelType=
"flat"
>
<context
id=
"
Oracle
"
targetRuntime=
"MyBatis3Simple"
defaultModelType=
"flat"
>
<property
name=
"beginningDelimiter"
value=
"`"
/>
<property
name=
"beginningDelimiter"
value=
"`"
/>
<property
name=
"endingDelimiter"
value=
"`"
/>
<property
name=
"endingDelimiter"
value=
"`"
/>
<!-- 生成的文件编码 -->
<!-- 生成的文件编码 -->
...
@@ -16,7 +16,9 @@
...
@@ -16,7 +16,9 @@
<!--<property enName="mappers" value="com.suvalue.demo.mapper.BaseMapper"/>-->
<!--<property enName="mappers" value="com.suvalue.demo.mapper.BaseMapper"/>-->
<!--</plugin>-->
<!--</plugin>-->
<commentGenerator>
<commentGenerator>
<property
name=
"suppressAllComments"
value=
"true"
/>
<property
name=
"suppressAllComments"
value=
"false"
/>
<!-- 数据库注释支持 -->
<!-- <property name="addRemarkComments" value="true"/>-->
</commentGenerator>
</commentGenerator>
<!-- 数据库连接属性 -->
<!-- 数据库连接属性 -->
<jdbcConnection
driverClass=
"${spring.datasource.driver-class-name}"
<jdbcConnection
driverClass=
"${spring.datasource.driver-class-name}"
...
@@ -24,9 +26,9 @@
...
@@ -24,9 +26,9 @@
userId=
"${spring.datasource.username}"
userId=
"${spring.datasource.username}"
password=
"${spring.datasource.password}"
>
password=
"${spring.datasource.password}"
>
<!-- 针对oracle数据库 获取字段注释 -->
<!-- 针对oracle数据库 获取字段注释 -->
<
!--<property enName="remarksReporting" value="true"></property>--
>
<
property
name=
"remarksReporting"
value=
"true"
></property
>
<!-- 针对mysql数据库 获取字段注释 -->
<!-- 针对mysql数据库 获取字段注释 -->
<property
name=
"useInformationSchema"
value=
"true"
></property
>
<!-- <property name="useInformationSchema" value="true"></property>--
>
</jdbcConnection>
</jdbcConnection>
<!-- 生成实体类配置 -->
<!-- 生成实体类配置 -->
<javaModelGenerator
targetPackage=
"com.bsoft.api.model"
targetProject=
"src/main/java"
/>
<javaModelGenerator
targetPackage=
"com.bsoft.api.model"
targetProject=
"src/main/java"
/>
...
@@ -35,8 +37,9 @@
...
@@ -35,8 +37,9 @@
<!-- 生成映射接口配置 -->
<!-- 生成映射接口配置 -->
<javaClientGenerator
targetPackage=
"com.bsoft.api.mapper"
targetProject=
"src/main/java"
type=
"XMLMAPPER"
/>
<javaClientGenerator
targetPackage=
"com.bsoft.api.mapper"
targetProject=
"src/main/java"
type=
"XMLMAPPER"
/>
<table
tableName=
"sys_user"
>
<table
tableName=
"sys_user"
schema=
"ll"
>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
<!-- 主键生成方式 -->
<generatedKey
column=
"id"
sqlStatement=
"select SEQ_SYS_USER_ID.nextval from dual"
identity=
"true"
/>
</table>
</table>
</context>
</context>
<!--<context id="sqlserver" targetRuntime="MyBatis3Simple" defaultModelType="flat">-->
<!--<context id="sqlserver" targetRuntime="MyBatis3Simple" defaultModelType="flat">-->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment