From 1b11d1fa7483c1b2e4267b7f50f1be9ffa557c94 Mon Sep 17 00:00:00 2001 From: wangss <1063889643@qq.com> Date: Tue, 1 Jul 2025 11:27:24 +0800 Subject: [PATCH] =?UTF-8?q?refactor(continew-plugin-generator):=20?= =?UTF-8?q?=E4=B8=BA=E6=9E=9A=E4=B8=BE=E7=B1=BB=E5=9E=8B=E7=9A=84=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89=20Excel?= =?UTF-8?q?=20=E8=BD=AC=E6=8D=A2=E5=99=A8-=20=E5=9C=A8=20DetailResp.ftl=20?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=AD=E5=BC=95=E5=85=A5=E4=BA=86=20ExcelB?= =?UTF-8?q?aseEnumConverter=20-=20=E9=80=9A=E8=BF=87=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E6=98=AF=E5=90=A6=E4=BB=A5?= =?UTF-8?q?=20"Enum"=20=E7=BB=93=E5=B0=BE=EF=BC=8C=E6=9D=A5=E5=86=B3?= =?UTF-8?q?=E5=AE=9A=E6=98=AF=E5=90=A6=E4=BD=BF=E7=94=A8=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E8=BD=AC=E6=8D=A2=E5=99=A8-=20=E8=BF=99=E4=B8=AA?= =?UTF-8?q?=E6=94=B9=E5=8A=A8=E5=B0=86=E6=8F=90=E9=AB=98=20Excel=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA=E6=97=B6?= =?UTF-8?q?=E5=AF=B9=E6=9E=9A=E4=B8=BE=E7=B1=BB=E5=9E=8B=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/templates/backend/DetailResp.ftl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/continew-plugin/continew-plugin-generator/src/main/resources/templates/backend/DetailResp.ftl b/continew-plugin/continew-plugin-generator/src/main/resources/templates/backend/DetailResp.ftl index bad1d260..ab648c87 100644 --- a/continew-plugin/continew-plugin-generator/src/main/resources/templates/backend/DetailResp.ftl +++ b/continew-plugin/continew-plugin-generator/src/main/resources/templates/backend/DetailResp.ftl @@ -8,6 +8,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelProperty; import top.continew.admin.common.model.resp.BaseDetailResp; +import top.continew.starter.file.excel.converter.ExcelBaseEnumConverter; <#if imports??> <#list imports as className> import ${className}; @@ -41,7 +42,11 @@ public class ${className} extends BaseDetailResp { * ${fieldConfig.comment} */ @Schema(description = "${fieldConfig.comment}") + <#if fieldConfig.fieldType?ends_with("Enum")> + @ExcelProperty(value = "${fieldConfig.comment}", converter = ExcelBaseEnumConverter.class) + <#else> @ExcelProperty(value = "${fieldConfig.comment}") + private ${fieldConfig.fieldType} ${fieldConfig.fieldName}; -- Gitee