提交 | 用户 | 时间
|
e7c126
|
1 |
package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo; |
H |
2 |
|
|
3 |
import lombok.*; |
|
4 |
import java.util.*; |
|
5 |
import io.swagger.v3.oas.annotations.media.Schema; |
|
6 |
import ${PageParamClassName}; |
|
7 |
#foreach ($column in $columns) |
|
8 |
#if (${column.javaType} == "BigDecimal") |
|
9 |
import java.math.BigDecimal; |
|
10 |
#break |
|
11 |
#end |
|
12 |
#end |
|
13 |
## 处理 LocalDateTime 字段的引入 |
|
14 |
#foreach ($column in $columns) |
|
15 |
#if (${column.listOperationCondition} && ${column.javaType} == "LocalDateTime") |
|
16 |
import org.springframework.format.annotation.DateTimeFormat; |
|
17 |
import java.time.LocalDateTime; |
|
18 |
|
|
19 |
import static ${DateUtilsClassName}.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|
20 |
#break |
|
21 |
#end |
|
22 |
#end |
|
23 |
## 字段模板 |
|
24 |
#macro(columnTpl $prefix $prefixStr) |
|
25 |
@Schema(description = "${prefixStr}${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) |
|
26 |
private ${column.javaType}#if ("$!prefix" != "") ${prefix}${JavaField}#else ${column.javaField}#end; |
|
27 |
#end |
|
28 |
|
|
29 |
@Schema(description = "${sceneEnum.name} - ${table.classComment}分页 Request VO") |
|
30 |
@Data |
|
31 |
@EqualsAndHashCode(callSuper = true) |
|
32 |
@ToString(callSuper = true) |
|
33 |
public class ${sceneEnum.prefixClass}${table.className}PageReqVO extends PageParam { |
|
34 |
|
|
35 |
#foreach ($column in $columns) |
|
36 |
#if (${column.listOperation})##查询操作 |
|
37 |
#if (${column.listOperationCondition} == "BETWEEN")## 情况一,Between 的时候 |
|
38 |
@Schema(description = "${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) |
|
39 |
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|
40 |
private ${column.javaType}[] ${column.javaField}; |
|
41 |
#else##情况二,非 Between 的时间 |
|
42 |
#columnTpl('', '') |
|
43 |
#end |
|
44 |
|
|
45 |
#end |
|
46 |
#end |
|
47 |
} |