Skip to content

Commit 32ac708

Browse files
OneTaroCharles7c
authored andcommitted
refactor(generator): 优化代码生成模板中的枚举类导入语句
1 parent 943d640 commit 32ac708

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

continew-plugin/continew-plugin-generator/src/main/resources/templates/backend/DetailResp.ftl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
88
import com.alibaba.excel.annotation.ExcelProperty;
99

1010
import top.continew.admin.common.model.resp.BaseDetailResp;
11-
11+
<#if imports??>
12+
<#list imports as className>
13+
import ${className};
14+
</#list>
15+
</#if>
1216
import java.io.Serial;
1317
<#if hasTimeField>
1418
import java.time.*;

continew-plugin/continew-plugin-generator/src/main/resources/templates/backend/Query.ftl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ import io.swagger.v3.oas.annotations.media.Schema;
66

77
import top.continew.starter.data.core.annotation.Query;
88
import top.continew.starter.data.core.enums.QueryType;
9-
9+
<#if imports??>
10+
<#list imports as className>
11+
import ${className};
12+
</#list>
13+
</#if>
1014
import java.io.Serial;
1115
import java.io.Serializable;
1216
<#if hasTimeField>

continew-plugin/continew-plugin-generator/src/main/resources/templates/backend/Req.ftl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ import lombok.Data;
99
import io.swagger.v3.oas.annotations.media.Schema;
1010

1111
import org.hibernate.validator.constraints.Length;
12-
12+
<#if imports??>
13+
<#list imports as className>
14+
import ${className};
15+
</#list>
16+
</#if>
1317
import java.io.Serial;
1418
import java.io.Serializable;
1519
<#if hasTimeField>

continew-plugin/continew-plugin-generator/src/main/resources/templates/backend/Resp.ftl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ import lombok.Data;
55
import io.swagger.v3.oas.annotations.media.Schema;
66

77
import top.continew.admin.common.model.resp.BaseResp;
8-
8+
<#if imports??>
9+
<#list imports as className>
10+
import ${className};
11+
</#list>
12+
</#if>
913
import java.io.Serial;
1014
<#if hasTimeField>
1115
import java.time.*;

0 commit comments

Comments
 (0)