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
6e9a283a
Commit
6e9a283a
authored
May 10, 2017
by
hewei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed Issue #3 紧急修正逻辑删除插件引入的异常
parent
476b2783
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
README.md
README.md
+1
-1
src/main/java/com/itfsw/mybatis/generator/plugins/LogicalDeletePlugin.java
.../itfsw/mybatis/generator/plugins/LogicalDeletePlugin.java
+7
-6
No files found.
README.md
View file @
6e9a283a
...
@@ -21,7 +21,7 @@ Maven引用:
...
@@ -21,7 +21,7 @@ Maven引用:
<dependency>
<dependency>
<groupId>
com.itfsw
</groupId>
<groupId>
com.itfsw
</groupId>
<artifactId>
mybatis-generator-plugin
</artifactId>
<artifactId>
mybatis-generator-plugin
</artifactId>
<version>
1.0.
7
</version>
<version>
1.0.
8
</version>
</dependency>
</dependency>
```
```
---------------------------------------
---------------------------------------
...
...
src/main/java/com/itfsw/mybatis/generator/plugins/LogicalDeletePlugin.java
View file @
6e9a283a
...
@@ -133,12 +133,13 @@ public class LogicalDeletePlugin extends BasePlugin {
...
@@ -133,12 +133,13 @@ public class LogicalDeletePlugin extends BasePlugin {
public
boolean
clientGenerated
(
Interface
interfaze
,
TopLevelClass
topLevelClass
,
IntrospectedTable
introspectedTable
)
{
public
boolean
clientGenerated
(
Interface
interfaze
,
TopLevelClass
topLevelClass
,
IntrospectedTable
introspectedTable
)
{
if
(
this
.
logicalDeleteColumn
!=
null
){
if
(
this
.
logicalDeleteColumn
!=
null
){
// 1. 逻辑删除ByExample
// 1. 逻辑删除ByExample
Method
mLogicalDeleteByExample
=
new
Method
(
METHOD_LOGICAL_DELETE_BY_EXAMPLE
);
Method
mLogicalDeleteByExample
=
JavaElementGeneratorTools
.
generateMethod
(
// 返回值类型
METHOD_LOGICAL_DELETE_BY_EXAMPLE
,
mLogicalDeleteByExample
.
setReturnType
(
FullyQualifiedJavaType
.
getIntInstance
());
JavaVisibility
.
DEFAULT
,
// 添加参数
FullyQualifiedJavaType
.
getIntInstance
(),
FullyQualifiedJavaType
type
=
new
FullyQualifiedJavaType
(
introspectedTable
.
getExampleType
());
new
Parameter
(
new
FullyQualifiedJavaType
(
introspectedTable
.
getExampleType
()),
"example"
,
"@Param(\"example\")"
)
mLogicalDeleteByExample
.
addParameter
(
new
Parameter
(
type
,
"example"
));
);
// 添加方法说明
// 添加方法说明
commentGenerator
.
addGeneralMethodComment
(
mLogicalDeleteByExample
,
introspectedTable
);
commentGenerator
.
addGeneralMethodComment
(
mLogicalDeleteByExample
,
introspectedTable
);
// interface 增加方法
// interface 增加方法
...
...
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