From b7288c3f66e62c4920826943f219b5ad2feac205 Mon Sep 17 00:00:00 2001 From: yinq Date: Thu, 9 May 2024 08:41:41 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/vm/java/controller.java.vm | 7 +- .../main/resources/vm/vue/index-tree.vue.vm | 148 ++--- .../src/main/resources/vm/vue/index.vue.vm | 524 ++++++------------ 3 files changed, 221 insertions(+), 458 deletions(-) diff --git a/os-generator/src/main/resources/vm/java/controller.java.vm b/os-generator/src/main/resources/vm/java/controller.java.vm index 76ed82a..203a6db 100644 --- a/os-generator/src/main/resources/vm/java/controller.java.vm +++ b/os-generator/src/main/resources/vm/java/controller.java.vm @@ -16,7 +16,6 @@ import com.os.common.annotation.Log; import com.os.common.core.controller.BaseController; import com.os.common.core.domain.AjaxResult; import com.os.common.enums.BusinessType; -import com.os.common.utils.DateUtils; import ${packageName}.domain.${ClassName}; import ${packageName}.service.I${ClassName}Service; import com.os.common.utils.poi.ExcelUtil; @@ -89,8 +88,7 @@ public class ${ClassName}Controller extends BaseController @PostMapping public AjaxResult add(@RequestBody ${ClassName} ${className}) { - ${className}.setCreatedBy(getUsername()); - ${className}.setCreatedTime(DateUtils.getNowDate()); + ${className}.setCreateBy(getUsername()); return toAjax(${className}Service.insert${ClassName}(${className})); } @@ -102,8 +100,7 @@ public class ${ClassName}Controller extends BaseController @PutMapping public AjaxResult edit(@RequestBody ${ClassName} ${className}) { - ${className}.setUpdatedBy(getUsername()); - ${className}.setUpdatedTime(DateUtils.getNowDate()); + ${className}.setUpdateBy(getUsername()); return toAjax(${className}Service.update${ClassName}(${className})); } diff --git a/os-generator/src/main/resources/vm/vue/index-tree.vue.vm b/os-generator/src/main/resources/vm/vue/index-tree.vue.vm index 1f89a50..ce0ac05 100644 --- a/os-generator/src/main/resources/vm/vue/index-tree.vue.vm +++ b/os-generator/src/main/resources/vm/vue/index-tree.vue.vm @@ -1,7 +1,6 @@ \ No newline at end of file + diff --git a/os-generator/src/main/resources/vm/vue/index.vue.vm b/os-generator/src/main/resources/vm/vue/index.vue.vm index a9215c9..e2551ca 100644 --- a/os-generator/src/main/resources/vm/vue/index.vue.vm +++ b/os-generator/src/main/resources/vm/vue/index.vue.vm @@ -1,7 +1,6 @@ @@ -208,7 +195,7 @@ #set($dictType=$column.dictType) #if($column.htmlType == "input") - + #elseif($column.htmlType == "imageUpload") @@ -240,7 +227,7 @@ #elseif($column.htmlType == "select" && $dictType) - + #elseif($column.htmlType == "checkbox" && "" != $dictType) @@ -271,8 +258,7 @@ #else :label="dict.value" #end - >{{dict.label}} - + >{{dict.label}} #elseif($column.htmlType == "radio" && $dictType) @@ -292,7 +278,7 @@ #elseif($column.htmlType == "textarea") - + #end #end @@ -302,19 +288,14 @@ ${subTable.functionName}信息 - - 添加 - + 添加 - 删除 - + 删除 - - + + #foreach($column in $subTable.columns) #set($javaField=$column.javaField) @@ -328,18 +309,16 @@ #elseif($column.list && $column.htmlType == "input") #elseif($column.list && $column.htmlType == "datetime") - #elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && - "" != $column.dictType) + #elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" != $column.dictType) - #elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && - "" == $column.dictType) + #elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" == $column.dictType) @@ -375,13 +353,7 @@ \ No newline at end of file + }; +