Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d99a99edd | ||
|
|
6e9a283ad2 | ||
|
|
476b27832d |
@@ -21,7 +21,7 @@ Maven引用:
|
||||
<dependency>
|
||||
<groupId>com.itfsw</groupId>
|
||||
<artifactId>mybatis-generator-plugin</artifactId>
|
||||
<version>1.0.7</version>
|
||||
<version>1.0.8</version>
|
||||
</dependency>
|
||||
```
|
||||
---------------------------------------
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<groupId>com.itfsw</groupId>
|
||||
<artifactId>mybatis-generator-plugin</artifactId>
|
||||
<version>1.0.7</version>
|
||||
<version>1.0.8</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
@@ -175,7 +175,7 @@
|
||||
<connection>scm:git:https://github.com/itfsw/mybatis-generator-plugin.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/itfsw/mybatis-generator-plugin.git</developerConnection>
|
||||
<url>https://github.com/itfsw/mybatis-generator-plugin</url>
|
||||
<tag>V1.0.7</tag>
|
||||
<tag>V1.0.8</tag>
|
||||
</scm>
|
||||
|
||||
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++distribution++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
||||
|
||||
@@ -133,12 +133,13 @@ public class LogicalDeletePlugin extends BasePlugin {
|
||||
public boolean clientGenerated(Interface interfaze, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
|
||||
if (this.logicalDeleteColumn != null){
|
||||
// 1. 逻辑删除ByExample
|
||||
Method mLogicalDeleteByExample = new Method(METHOD_LOGICAL_DELETE_BY_EXAMPLE);
|
||||
// 返回值类型
|
||||
mLogicalDeleteByExample.setReturnType(FullyQualifiedJavaType.getIntInstance());
|
||||
// 添加参数
|
||||
FullyQualifiedJavaType type = new FullyQualifiedJavaType(introspectedTable.getExampleType());
|
||||
mLogicalDeleteByExample.addParameter(new Parameter(type, "example"));
|
||||
Method mLogicalDeleteByExample = JavaElementGeneratorTools.generateMethod(
|
||||
METHOD_LOGICAL_DELETE_BY_EXAMPLE,
|
||||
JavaVisibility.DEFAULT,
|
||||
FullyQualifiedJavaType.getIntInstance(),
|
||||
new Parameter(new FullyQualifiedJavaType(introspectedTable.getExampleType()), "example", "@Param(\"example\")")
|
||||
);
|
||||
|
||||
// 添加方法说明
|
||||
commentGenerator.addGeneralMethodComment(mLogicalDeleteByExample, introspectedTable);
|
||||
// interface 增加方法
|
||||
|
||||
Reference in New Issue
Block a user