From 930b1d461ba83caa7e9c0fc9ce796b0d4fcf9ca3 Mon Sep 17 00:00:00 2001 From: Pluto <1063889643@qq.com> Date: Wed, 2 Jul 2025 03:02:38 +0000 Subject: [PATCH] =?UTF-8?q?refactor(generator):=20=E4=B8=BA=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=E7=B1=BB=E5=9E=8B=E7=9A=84=E5=AD=97=E6=AE=B5=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89=20Excel=20=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E5=99=A8?= 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};