From dac7b3a7bdc60f7b742c73b2b12df757d4cc2e19 Mon Sep 17 00:00:00 2001 From: Suomm <1474983351@qq.com> Date: Sun, 17 Mar 2024 12:48:45 +0800 Subject: [PATCH] fix: https://gitee.com/mybatis-flex/mybatis-flex/issues/I994N9 --- .../src/main/resources/templates/enjoy/entityOrBase.tpl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mybatis-flex-codegen/src/main/resources/templates/enjoy/entityOrBase.tpl b/mybatis-flex-codegen/src/main/resources/templates/enjoy/entityOrBase.tpl index ba4c7b78..86e0a348 100644 --- a/mybatis-flex-codegen/src/main/resources/templates/enjoy/entityOrBase.tpl +++ b/mybatis-flex-codegen/src/main/resources/templates/enjoy/entityOrBase.tpl @@ -30,6 +30,9 @@ import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +#if(entityConfig.getSuperClass()) +import lombok.EqualsAndHashCode; +#end #end #end #if(jdkVersion >= 14) @@ -52,6 +55,9 @@ import java.io.Serial; @Builder @NoArgsConstructor @AllArgsConstructor +#if(entityConfig.getSuperClass()) +@EqualsAndHashCode(callSuper = true) +#end #end #end #if(withSwagger && swaggerVersion.getName() == "FOX")