Skip to content

Commit 8dd006f

Browse files
committed
更新代码生成器和模板
1 parent d67a594 commit 8dd006f

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

generator/README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,12 @@
2020
- `serviceImpl.java` Service 接口实现模板
2121
- `project.yaml` 代码生成器配置文件
2222

23-
这部分内容需要下载使用,为了方便使用,提供一个压缩包直接下载使用。
23+
这部分内容需要下载使用,为了方便使用,提供一个压缩包直接下载使用(最新模板从当前项目下载)
2424

2525
> **百度网盘**
26-
> 链接: https://pan.baidu.com/s/1fzxiZaDB9zT0mUW7NKiQTA
27-
> 提取码: kgtk
28-
>
29-
> **GitHub**
30-
> https://github.com/mybatis-mapper/mapper/blob/master/generator/rui-cli.zip
31-
>
32-
> **Gitee**(需登录)
33-
> https://gitee.com/mybatis-mapper/mapper/blob/master/generator/rui-cli.zip
34-
>
26+
> 链接:https://pan.baidu.com/s/1uyROE1dgvrp8h-yGG3rR6Q
27+
> 提取码:an7g
28+
>
3529
> 数据库驱动部分提供一些链接,可以根据需要进行下载:
3630
> - [MySQL Connector/J](https://mvnrepository.com/artifact/mysql/mysql-connector-java)
3731
> - [MariaDB Java Client](https://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-client)

generator/rui-cli.zip

-4.6 MB
Binary file not shown.
634 Bytes
Binary file not shown.

generator/src/main/resources/mapper-templates/mapper.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
<id property="${column.name.fieldName}" column="${column.name}" jdbcType="${column.jdbcType}"/>
88
<#else>
99
<result property="${column.name.fieldName}" column="${column.name}" jdbcType="${column.jdbcType}"/>
10-
</#if>
10+
<#if column.comment?has_content><!-- ${column.comment} -->
11+
</#if>
12+
</#if>
1113
</#list>
1214
</resultMap>
1315
</mapper>

generator/src/main/resources/mapper-templates/model.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
</#list>
99

1010
/**
11-
* ${it.name} - ${it.comment}
11+
* ${it.name} <#if it.comment?has_content>- ${it.comment}</#if>
1212
*
1313
* @author ${SYS['user.name']}
1414
*/
15-
@Entity.Table("${it.name}" remark = "${it.comment}", autoResultMap = true)
15+
@Entity.Table(value = "${it.name}", <#if it.comment?has_content>remark = "${it.comment}", </#if>autoResultMap = true)
1616
public class ${it.name.className} {
1717
<#list it.columns as column>
1818
<#if column.pk>

0 commit comments

Comments
 (0)