diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/exportReqVO.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/exportReqVO.vm index 10ab97afc6..afd583c28d 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/exportReqVO.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/exportReqVO.vm @@ -15,9 +15,6 @@ import static ${DateUtilsClassName}.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; #end ## 字段模板 #macro(columnTpl $prefix $prefixStr) -#if (${column.javaType} == "Date")## 时间类型 - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) -#end @ApiModelProperty(value = "${prefixStr}${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) private ${column.javaType}#if ("$!prefix" != "") ${prefix}${JavaField}#else ${column.javaField}#end; #end @@ -27,12 +24,11 @@ import static ${DateUtilsClassName}.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; public class ${sceneEnum.prefixClass}${table.className}ExportReqVO { #foreach ($column in $columns) -#set ($JavaField = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})##首字母大写 #if (${column.listOperation})##查询操作 #if (${column.listOperationCondition} == "BETWEEN")## 情况一,Between 的时候 - #columnTpl('begin', '开始') - - #columnTpl('end', '结束') + @ApiModelProperty(value = "${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private ${column.javaType}[] ${column.javaField}; #else##情况二,非 Between 的时间 #columnTpl('', '') #end diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/pageReqVO.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/pageReqVO.vm index 5f5952c59e..df2be7036b 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/pageReqVO.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/java/controller/vo/pageReqVO.vm @@ -15,9 +15,6 @@ import static ${DateUtilsClassName}.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; #end ## 字段模板 #macro(columnTpl $prefix $prefixStr) -#if (${column.javaType} == "Date")## 时间类型 - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) -#end @ApiModelProperty(value = "${prefixStr}${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) private ${column.javaType}#if ("$!prefix" != "") ${prefix}${JavaField}#else ${column.javaField}#end; #end @@ -29,12 +26,11 @@ import static ${DateUtilsClassName}.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; public class ${sceneEnum.prefixClass}${table.className}PageReqVO extends PageParam { #foreach ($column in $columns) -#set ($JavaField = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})##首字母大写 #if (${column.listOperation})##查询操作 #if (${column.listOperationCondition} == "BETWEEN")## 情况一,Between 的时候 - #columnTpl('begin', '开始') - - #columnTpl('end', '结束') + @ApiModelProperty(value = "${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private ${column.javaType}[] ${column.javaField}; #else##情况二,非 Between 的时间 #columnTpl('', '') #end diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm index d49fa93c5c..95f7d66a26 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue/views/index.vue.vm @@ -219,22 +219,16 @@ export default { title: "", // 是否显示弹出层 open: false, - #foreach ($column in $columns)## 时间范围 - #if ($column.listOperation) - #if ($column.htmlType == "datetime" && $column.listOperationCondition == "BETWEEN") - #set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - dateRange${AttrName}: [], - #end - #end - #end // 查询参数 queryParams: { pageNo: 1, pageSize: 10, #foreach ($column in $columns) - #if ($column.listOperation && $column.listOperationCondition != 'BETWEEN') + #if ($column.listOperation) + #if ($column.listOperationCondition != 'BETWEEN') $column.javaField: null, - #else if ($column.htmlType == "datetime" && $column.listOperationCondition == "BETWEEN") + #end + #if ($column.htmlType == "datetime" || $column.listOperationCondition == "BETWEEN") $column.javaField: [], #end #end diff --git a/yudao-ui-admin-vue3/src/router/modules/remaining.ts b/yudao-ui-admin-vue3/src/router/modules/remaining.ts index 92f3a367ef..7c3c524e6d 100644 --- a/yudao-ui-admin-vue3/src/router/modules/remaining.ts +++ b/yudao-ui-admin-vue3/src/router/modules/remaining.ts @@ -72,7 +72,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ children: [ { path: 'edit', - component: () => import('@/views/infra/codegen/EditTable.vue'), + component: () => import('@/views/infra/codegen/components/EditTable.vue'), name: 'EditTable', meta: { noCache: true, diff --git a/yudao-ui-admin-vue3/src/views/infra/codegen/EditTable.vue b/yudao-ui-admin-vue3/src/views/infra/codegen/components/EditTable.vue similarity index 92% rename from yudao-ui-admin-vue3/src/views/infra/codegen/EditTable.vue rename to yudao-ui-admin-vue3/src/views/infra/codegen/components/EditTable.vue index 07dfa52210..47e2c89e63 100644 --- a/yudao-ui-admin-vue3/src/views/infra/codegen/EditTable.vue +++ b/yudao-ui-admin-vue3/src/views/infra/codegen/components/EditTable.vue @@ -1,9 +1,9 @@