Commit 0a805483a998815493c5a65df684eade32552b2c
1 parent
623f7124
代码生成 localDateTime 处理
Showing
2 changed files
with
6 additions
and
2 deletions
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/createReqVO.vm
| ... | ... | @@ -9,7 +9,7 @@ import javax.validation.constraints.*; |
| 9 | 9 | #if (${column.createOperation} && (!${column.updateOperation} || !${column.listOperationResult}) |
| 10 | 10 | && ${column.javaType} == "LocalDateTime")## 时间类型 |
| 11 | 11 | import org.springframework.format.annotation.DateTimeFormat; |
| 12 | - | |
| 12 | +import java.time.LocalDateTime; | |
| 13 | 13 | import static ${DateUtilsClassName}.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 14 | 14 | #break |
| 15 | 15 | #end | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/respVO.vm
| 1 | 1 | package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo; |
| 2 | 2 | |
| 3 | 3 | import lombok.*; |
| 4 | -import java.util.*; | |
| 4 | +#foreach ($column in $columns) | |
| 5 | +#if (${column.javaType} == "LocalDateTime") | |
| 6 | +import java.time.LocalDateTime; | |
| 7 | +#end | |
| 8 | +#end | |
| 5 | 9 | import io.swagger.annotations.*; |
| 6 | 10 | |
| 7 | 11 | @ApiModel("${sceneEnum.name} - ${table.classComment} Response VO") | ... | ... |