Commit 6e9a283a authored by hewei's avatar hewei

fixed Issue #3 紧急修正逻辑删除插件引入的异常

parent 476b2783
...@@ -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>
``` ```
--------------------------------------- ---------------------------------------
......
...@@ -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 增加方法
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment