Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mybatis-generator-plugin
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mybatis-generator-plugin
Commits
6fbcc110
Commit
6fbcc110
authored
May 04, 2018
by
hewei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
乐观锁插件测试用例
parent
01f5e51b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
src/main/java/com/itfsw/mybatis/generator/plugins/OptimisticLockerPlugin.java
...fsw/mybatis/generator/plugins/OptimisticLockerPlugin.java
+6
-3
No files found.
src/main/java/com/itfsw/mybatis/generator/plugins/OptimisticLockerPlugin.java
View file @
6fbcc110
...
@@ -570,15 +570,18 @@ public class OptimisticLockerPlugin extends BasePlugin {
...
@@ -570,15 +570,18 @@ public class OptimisticLockerPlugin extends BasePlugin {
if
(
selective
)
{
if
(
selective
)
{
XmlElement
setEle
=
new
XmlElement
(
"set"
);
XmlElement
setEle
=
new
XmlElement
(
"set"
);
updateEle
.
addElement
(
setEle
);
updateEle
.
addElement
(
setEle
);
// set 节点
XmlElement
trimEle
=
XmlElementGeneratorTools
.
generateSetsSelective
(
columns
,
"record."
);
setEle
.
addElement
(
trimEle
);
// 版本自增
// 版本自增
setEle
.
addElement
(
new
TextElement
(
trimEle
.
addElement
(
0
,
new
TextElement
(
MyBatis3FormattingUtilities
.
getEscapedColumnName
(
this
.
versionColumn
)
MyBatis3FormattingUtilities
.
getEscapedColumnName
(
this
.
versionColumn
)
+
" = "
+
" = "
+
MyBatis3FormattingUtilities
.
getEscapedColumnName
(
this
.
versionColumn
)
+
MyBatis3FormattingUtilities
.
getEscapedColumnName
(
this
.
versionColumn
)
+
" + 1,"
+
" + 1,"
));
));
// set 节点
setEle
.
addElement
(
XmlElementGeneratorTools
.
generateSetsSelective
(
columns
,
"record."
));
}
else
{
}
else
{
// 版本自增
// 版本自增
updateEle
.
addElement
(
new
TextElement
(
updateEle
.
addElement
(
new
TextElement
(
...
...
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