diff --git a/aucma-generator/src/main/resources/vm/java/controller.java.vm b/aucma-generator/src/main/resources/vm/java/controller.java.vm index 4ee93e9..feb94f8 100644 --- a/aucma-generator/src/main/resources/vm/java/controller.java.vm +++ b/aucma-generator/src/main/resources/vm/java/controller.java.vm @@ -83,6 +83,8 @@ public class ${ClassName}Controller extends BaseController { @Log(title = "${functionName}" , businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ${ClassName} ${className}) { + ${className}.setCreatedBy(getUsername()); + ${className}.setCreatedTime(DateUtils.getNowDate()); return toAjax(${className}Service.insert${ClassName}(${className})); } @@ -93,6 +95,8 @@ public class ${ClassName}Controller extends BaseController { @Log(title = "${functionName}" , businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ${ClassName} ${className}) { + ${className}.setUpdatedBy(getUsername()); + ${className}.setUpdatedTime(DateUtils.getNowDate()); return toAjax(${className}Service.update${ClassName}(${className})); } diff --git a/aucma-generator/src/main/resources/vm/vue/index.vue.vm b/aucma-generator/src/main/resources/vm/vue/index.vue.vm index 6296014..c949fe9 100644 --- a/aucma-generator/src/main/resources/vm/vue/index.vue.vm +++ b/aucma-generator/src/main/resources/vm/vue/index.vue.vm @@ -110,7 +110,7 @@ v-hasPermi="['${moduleName}:${businessName}:export']" >导出 - + @@ -124,21 +124,21 @@ #set($comment=$column.columnComment) #end #if($column.pk) - + #elseif($column.list && $column.htmlType == "datetime") - + #elseif($column.list && $column.htmlType == "imageUpload") - + #elseif($column.list && "" != $column.dictType) - + #elseif($column.list && "" != $javaField) - + #end #end @@ -422,7 +422,18 @@ export default { ]#if($foreach.count != $columns.size()),#end #end #end - } + }, + columns: [ +#foreach ($column in $columns) + #set($parentheseIndex=$column.columnComment.indexOf("(")) + #if($parentheseIndex != -1) + #set($comment=$column.columnComment.substring(0, $parentheseIndex)) + #else + #set($comment=$column.columnComment) + #end + { key: ${foreach.index}, label: `${comment}`, visible: true }, +#end + ] }; }, created() {