Skip to content

Commit 093a918

Browse files
committed
修复id错位问题
1 parent e71aa0d commit 093a918

File tree

1 file changed

+1
-1
lines changed
  • generator-web/src/main/resources/templates/code-generator/mybatis-plus

1 file changed

+1
-1
lines changed

generator-web/src/main/resources/templates/code-generator/mybatis-plus/plusentity.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ public class ${classInfo.className} implements Serializable {
1919

2020
private static final long serialVersionUID = 1L;
2121

22+
@TableId(type = IdType.AUTO)
2223
<#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0>
2324
<#list classInfo.fieldList as fieldItem >
2425
<#if isComment?exists && isComment==true>/**
2526
* ${fieldItem.fieldComment}
2627
*/</#if><#if isSwagger?exists && isSwagger==true>
2728
@ApiModelProperty("${fieldItem.fieldComment}")</#if>
28-
@TableId(type = IdType.AUTO)
2929
private ${fieldItem.fieldClass} ${fieldItem.fieldName};
3030

3131
<#if isLombok?exists && isLombok==false>

0 commit comments

Comments
 (0)