diff --git a/README.md b/README.md index 8a36ccc6..2a108d8b 100644 --- a/README.md +++ b/README.md @@ -38,31 +38,31 @@ http://webapplayers.com/inspinia_admin-v2.7.1 - + - - + + - - + + - - + + - - + + - - + + - - + +
diff --git a/src/main/java/com/ruoyi/common/utils/FileUploadUtils.java b/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java similarity index 95% rename from src/main/java/com/ruoyi/common/utils/FileUploadUtils.java rename to src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java index a74efa00..523873ba 100644 --- a/src/main/java/com/ruoyi/common/utils/FileUploadUtils.java +++ b/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java @@ -1,4 +1,4 @@ -package com.ruoyi.common.utils; +package com.ruoyi.common.utils.file; import java.io.File; import java.io.IOException; diff --git a/src/main/java/com/ruoyi/common/utils/FileUtils.java b/src/main/java/com/ruoyi/common/utils/file/FileUtils.java similarity index 96% rename from src/main/java/com/ruoyi/common/utils/FileUtils.java rename to src/main/java/com/ruoyi/common/utils/file/FileUtils.java index e9e85987..ef4a225a 100644 --- a/src/main/java/com/ruoyi/common/utils/FileUtils.java +++ b/src/main/java/com/ruoyi/common/utils/file/FileUtils.java @@ -1,4 +1,4 @@ -package com.ruoyi.common.utils; +package com.ruoyi.common.utils.file; import java.io.File; import java.io.FileInputStream; @@ -70,7 +70,8 @@ public class FileUtils } /** - * @Desc 删除文件 + * 删除文件 + * * @param filePath 文件 * @return */ diff --git a/src/main/java/com/ruoyi/project/common/CommonController.java b/src/main/java/com/ruoyi/project/common/CommonController.java index b0e1f3f4..932c27ce 100644 --- a/src/main/java/com/ruoyi/project/common/CommonController.java +++ b/src/main/java/com/ruoyi/project/common/CommonController.java @@ -9,7 +9,7 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.util.ResourceUtils; import org.springframework.web.bind.annotation.RequestMapping; -import com.ruoyi.common.utils.FileUtils; +import com.ruoyi.common.utils.file.FileUtils; /** * 通用请求处理 diff --git a/src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java b/src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java index b88d7140..c1dd2ac5 100644 --- a/src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java +++ b/src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java @@ -97,7 +97,7 @@ public class ConfigController extends BaseController @GetMapping("/edit/{configId}") public String edit(@PathVariable("configId") Long configId, ModelMap mmap) { - mmap.addAttribute("config", configService.selectConfigById(configId)); + mmap.put("config", configService.selectConfigById(configId)); return prefix + "/edit"; } diff --git a/src/main/java/com/ruoyi/project/system/user/controller/ProfileController.java b/src/main/java/com/ruoyi/project/system/user/controller/ProfileController.java index c98df9a6..2aa0b781 100644 --- a/src/main/java/com/ruoyi/project/system/user/controller/ProfileController.java +++ b/src/main/java/com/ruoyi/project/system/user/controller/ProfileController.java @@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; -import com.ruoyi.common.utils.FileUploadUtils; +import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.constant.BusinessType; import com.ruoyi.framework.web.controller.BaseController; diff --git a/src/main/resources/templates/vm/java/domain.java.vm b/src/main/resources/templates/vm/java/domain.java.vm index 3adac75d..b5cb541e 100644 --- a/src/main/resources/templates/vm/java/domain.java.vm +++ b/src/main/resources/templates/vm/java/domain.java.vm @@ -1,5 +1,7 @@ package ${package}.domain; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.framework.web.domain.BaseEntity; #foreach ($column in $columns) #if($column.attrType == 'Date') @@ -24,21 +26,22 @@ public class ${className} extends BaseEntity #end #foreach ($column in $columns) - /** - * 设置:${column.columnComment} - */ public void set${column.attrName}($column.attrType $column.attrname) { this.$column.attrname = $column.attrname; } - - /** - * 获取:${column.columnComment} - */ + public $column.attrType get${column.attrName}() { return $column.attrname; } - #end + + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) +#foreach ($column in $columns) + .append("${column.attrname}", get${column.attrName}()) +#end + .toString(); + } }