From 541a5083f0388aed9200ef259c38535e3313902e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E6=B2=90?= Date: Tue, 27 Aug 2024 19:13:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=E6=A8=A1=E6=9D=BF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/template/java/Excel.java.ftl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Excel.java.ftl b/maku-boot-module/maku-module-generator/src/main/resources/template/java/Excel.java.ftl index 1df7939..2eee3b8 100644 --- a/maku-boot-module/maku-module-generator/src/main/resources/template/java/Excel.java.ftl +++ b/maku-boot-module/maku-module-generator/src/main/resources/template/java/Excel.java.ftl @@ -4,6 +4,8 @@ import lombok.Data; import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelProperty; import com.fhs.core.trans.vo.TransPojo; +import com.fhs.core.trans.anno.Trans; +import com.fhs.core.trans.constant.TransType; <#list importList as i> import ${i!}; @@ -16,9 +18,16 @@ import ${i!}; */ @Data public class ${ClassName}ExcelVO implements TransPojo { +<#list gridList as field> + <#if field.attrName == 'id'> + <#assign isPrimaryKey = 'true'> + + +<#if !isPrimaryKey??> @ExcelIgnore private ${primaryType} ${primaryName}; + <#list gridList as field> <#if field.fieldComment!?length gt 0> @ExcelProperty("${field.fieldComment}")