From 63f394b0e9096b2b06004ab8b49ced7f18246486 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 30 Sep 2020 15:57:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/templates/main.html | 2 +- .../java/com/ruoyi/common/core/domain/AjaxResult.java | 9 +++++---- .../com/ruoyi/common/utils/file/FileUploadUtils.java | 9 ++++----- .../src/main/resources/vm/java/serviceImpl.java.vm | 7 ------- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/main.html b/ruoyi-admin/src/main/resources/templates/main.html index 5f6e167ba..cd423e0af 100644 --- a/ruoyi-admin/src/main/resources/templates/main.html +++ b/ruoyi-admin/src/main/resources/templates/main.html @@ -1078,7 +1078,7 @@ type: 1, closeBtn:false, shadeClose:true, - area: ['600px', 'auto'], + area: ['600px', '360px'], content: html }); }); diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java index d8e380c25..ebd301ea5 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java @@ -84,12 +84,13 @@ public class AjaxResult extends HashMap /** * 方便链式调用 * - * @param key - * @param value - * @return + * @param key 键 + * @param value 值 + * @return 数据对象 */ @Override - public AjaxResult put(String key, Object value) { + public AjaxResult put(String key, Object value) + { super.put(key, value); return this; } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java index 7c55e1e72..c448c61c3 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java @@ -131,13 +131,12 @@ public class FileUploadUtils { File desc = new File(uploadDir + File.separator + fileName); - if (!desc.getParentFile().exists()) - { - desc.getParentFile().mkdirs(); - } if (!desc.exists()) { - desc.createNewFile(); + if (!desc.getParentFile().exists()) + { + desc.getParentFile().mkdirs(); + } } return desc; } diff --git a/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm b/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm index 1304f1939..4592abce8 100644 --- a/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm +++ b/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm @@ -23,7 +23,6 @@ import ${packageName}.mapper.${ClassName}Mapper; import ${packageName}.domain.${ClassName}; import ${packageName}.service.I${ClassName}Service; import com.ruoyi.common.core.text.Convert; -import com.ruoyi.framework.util.ShiroUtils; /** * ${functionName}Service业务层处理 @@ -77,9 +76,6 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service #if($column.javaField == 'createTime') ${className}.setCreateTime(DateUtils.getNowDate()); #end -#if($column.javaField == 'createBy') - ${className}.setCreateBy(ShiroUtils.getLoginName()); -#end #end #if($table.sub) int rows = ${className}Mapper.insert${ClassName}(${className}); @@ -106,9 +102,6 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service #if($column.javaField == 'updateTime') ${className}.setUpdateTime(DateUtils.getNowDate()); #end -#if($column.javaField == 'updateBy') - ${className}.setUpdateBy(ShiroUtils.getLoginName()); -#end #end #if($table.sub) ${className}Mapper.delete${subClassName}By${subTableFkClassName}(${className}.get${pkColumn.capJavaField}());