diff --git a/LICENSE b/LICENSE index 8564f294..32b30711 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 RuoYi +Copyright (c) 2019 RuoYi-Vue-Plus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -17,4 +17,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 7aac0bf1..b877e68c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ ## 平台简介 +[![码云Gitee](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/badge/star.svg?theme=blue)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus) +[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/blob/master/LICENSE) +[![使用IntelliJ IDEA开发维护](https://img.shields.io/badge/IntelliJ%20IDEA-提供支持-blue.svg)](https://www.jetbrains.com/?from=RuoYi-Vue-Plus) 基于 RuoYi-Vue 集成 Mybatis-Plus Lombok Hutool 等便捷开发工具 适配重写相关业务 便于开发 定期与 RuoYi-Vue 同步 * 前端开发框架 Vue、Element UI @@ -19,7 +22,7 @@ ### 依赖改动 -* ORM框架 使用 Mybatis-Plus 3.4.2 简化CRUD (不支持主子表) +* ORM框架 使用 Mybatis-Plus 简化CRUD (不支持主子表) * Bean简化 使用 Lombok 简化 get set toString 等等 * 容器改动 Tomcat 改为 并发性能更好的 undertow * 分页移除 pagehelper 改为 Mybatis-Plus 分页 @@ -49,7 +52,7 @@ ## 关注作者(扫码请备注: "加群") -![](https://images.gitee.com/uploads/images/2021/0508/235345_5503356a_1766278.jpeg) +![作者图片](https://images.gitee.com/uploads/images/2021/0508/235345_5503356a_1766278.jpeg) ## 捐献作者 作者为兼职做开源,平时还需要工作,如果帮到了您可以请作者吃个盒饭 diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml index 71e5b6f4..eb54d9c6 100644 --- a/ruoyi-admin/src/main/resources/application-dev.yml +++ b/ruoyi-admin/src/main/resources/application-dev.yml @@ -81,7 +81,7 @@ redisson: # 单节点配置 singleServerConfig: # 客户端名称 - clientName: ${ruoyi-vue-plus.name} + clientName: ${ruoyi.name} # 最小空闲连接数 connectionMinimumIdleSize: 32 # 连接池大小 diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml index eba8a898..2ebdcbdc 100644 --- a/ruoyi-admin/src/main/resources/application-prod.yml +++ b/ruoyi-admin/src/main/resources/application-prod.yml @@ -81,7 +81,7 @@ redisson: # 单节点配置 singleServerConfig: # 客户端名称 - clientName: ${ruoyi-vue-plus.name} + clientName: ${ruoyi.name} # 最小空闲连接数 connectionMinimumIdleSize: 32 # 连接池大小 diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java index 9b379217..317b92e2 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java @@ -13,7 +13,7 @@ import java.util.Date; /** * web层通用数据处理 - * + * * @author ruoyi */ public class BaseController @@ -39,7 +39,7 @@ public class BaseController /** * 响应返回结果 - * + * * @param rows 影响行数 * @return 操作结果 */ diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java index 6c4c2393..3c8bc923 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java @@ -96,8 +96,12 @@ public class RedisCache { * @param collection 多个对象 * @return */ - public long deleteObject(final Collection collection) { - return redissonClient.getKeys().delete(Arrays.toString(collection.toArray())); + public void deleteObject(final Collection collection) { + RBatch batch = redissonClient.createBatch(); + collection.forEach(t->{ + batch.getBucket(t.toString()).deleteAsync(); + }); + batch.execute(); } /** diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java index d918a48b..94dcf456 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java @@ -95,6 +95,7 @@ public class ImageUtils } finally { + IOUtils.closeQuietly(in); IOUtils.closeQuietly(baos); } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java index 383f4b64..830dbe59 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java @@ -8,6 +8,7 @@ import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.utils.ServletUtils; +import com.ruoyi.common.utils.reflect.ReflectUtils; import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.framework.web.service.TokenService; import org.aspectj.lang.JoinPoint; @@ -159,7 +160,6 @@ public class DataScopeAspect { } } - @SuppressWarnings("unchecked") private static void putDataScope(JoinPoint joinPoint, String sql) { Object params = joinPoint.getArgs()[0]; if (Validator.isNotNull(params)) { @@ -167,13 +167,8 @@ public class DataScopeAspect { BaseEntity baseEntity = (BaseEntity) params; baseEntity.getParams().put(DATA_SCOPE, sql); } else { - try { - Method getParams = params.getClass().getDeclaredMethod("getParams"); - Map invoke = (Map) getParams.invoke(params); - invoke.put(DATA_SCOPE, sql); - } catch (Exception e) { - // 方法未找到 不处理 - } + Map invoke = ReflectUtils.invokeGetter(params, "params"); + invoke.put(DATA_SCOPE, sql); } } } diff --git a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm index 969dba85..f1247aba 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm @@ -247,7 +247,7 @@ #end @@ -302,6 +302,8 @@ export default { }, data() { return { + //按钮loading + buttonLoading: false, // 遮罩层 loading: true, // 显示搜索条件 @@ -480,12 +482,14 @@ export default { }, /** 修改按钮操作 */ handleUpdate(row) { + this.loading = true; this.reset(); this.getTreeselect(); if (row != null) { this.form.${treeParentCode} = row.${treeCode}; } get${BusinessName}(row.${pkColumn.javaField}).then(response => { + this.loading = false; this.form = response.data; #foreach ($column in $columns) #if($column.htmlType == "checkbox") @@ -500,6 +504,7 @@ export default { submitForm() { this.#[[$]]#refs["form"].validate(valid => { if (valid) { + this.buttonLoading = true; #foreach ($column in $columns) #if($column.htmlType == "checkbox") this.form.$column.javaField = this.form.${column.javaField}.join(","); @@ -507,12 +512,14 @@ export default { #end if (this.form.${pkColumn.javaField} != null) { update${BusinessName}(this.form).then(response => { + this.buttonLoading = false; this.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { add${BusinessName}(this.form).then(response => { + this.buttonLoading = false; this.msgSuccess("新增成功"); this.open = false; this.getList(); @@ -527,9 +534,11 @@ export default { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" - }).then(function() { + }).then(() => { + this.loading = true; return del${BusinessName}(row.${pkColumn.javaField}); }).then(() => { + this.loading = false; this.getList(); this.msgSuccess("删除成功"); }) diff --git a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm index b384ba5e..9f58575b 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm @@ -301,7 +301,7 @@ #end @@ -353,6 +353,8 @@ export default { }, data() { return { + //按钮loading + buttonLoading: false, // 遮罩层 loading: true, // 导出遮罩层 @@ -534,9 +536,11 @@ export default { }, /** 修改按钮操作 */ handleUpdate(row) { + this.loading = true; this.reset(); const ${pkColumn.javaField} = row.${pkColumn.javaField} || this.ids get${BusinessName}(${pkColumn.javaField}).then(response => { + this.loading = false; this.form = response.data; #foreach ($column in $columns) #if($column.htmlType == "checkbox") @@ -554,6 +558,7 @@ export default { submitForm() { this.#[[$]]#refs["form"].validate(valid => { if (valid) { + this.buttonLoading = true; #foreach ($column in $columns) #if($column.htmlType == "checkbox") this.form.$column.javaField = this.form.${column.javaField}.join(","); @@ -564,12 +569,14 @@ export default { #end if (this.form.${pkColumn.javaField} != null) { update${BusinessName}(this.form).then(response => { + this.buttonLoading = false; this.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { add${BusinessName}(this.form).then(response => { + this.buttonLoading = false; this.msgSuccess("新增成功"); this.open = false; this.getList(); @@ -585,9 +592,11 @@ export default { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" - }).then(function() { + }).then(() => { + this.loading = true; return del${BusinessName}(${pkColumn.javaField}s); }).then(() => { + this.loading = false; this.getList(); this.msgSuccess("删除成功"); }) diff --git a/ruoyi-ui/src/views/demo/demo/index.vue b/ruoyi-ui/src/views/demo/demo/index.vue index b831ad9b..48fa3681 100644 --- a/ruoyi-ui/src/views/demo/demo/index.vue +++ b/ruoyi-ui/src/views/demo/demo/index.vue @@ -152,7 +152,7 @@ @@ -168,6 +168,8 @@ export default { }, data() { return { + //按钮loading + buttonLoading: false, // 遮罩层 loading: true, // 导出遮罩层 @@ -277,9 +279,11 @@ export default { }, /** 修改按钮操作 */ handleUpdate(row) { + this.loading = true; this.reset(); const id = row.id || this.ids getDemo(id).then(response => { + this.loading = false; this.form = response.data; this.open = true; this.title = "修改测试单表"; @@ -289,14 +293,17 @@ export default { submitForm() { this.$refs["form"].validate(valid => { if (valid) { + this.buttonLoading = true; if (this.form.id != null) { updateDemo(this.form).then(response => { + this.buttonLoading = false; this.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { addDemo(this.form).then(response => { + this.buttonLoading = false; this.msgSuccess("新增成功"); this.open = false; this.getList(); @@ -312,9 +319,11 @@ export default { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" - }).then(function() { + }).then(() => { + this.loading = true; return delDemo(ids); }).then(() => { + this.loading = false; this.getList(); this.msgSuccess("删除成功"); }) diff --git a/ruoyi-ui/src/views/demo/test/index.vue b/ruoyi-ui/src/views/demo/test/index.vue deleted file mode 100644 index 897e54e8..00000000 --- a/ruoyi-ui/src/views/demo/test/index.vue +++ /dev/null @@ -1,361 +0,0 @@ - - - diff --git a/ruoyi-ui/src/views/demo/tree/index.vue b/ruoyi-ui/src/views/demo/tree/index.vue index ddf76777..afe96c4a 100644 --- a/ruoyi-ui/src/views/demo/tree/index.vue +++ b/ruoyi-ui/src/views/demo/tree/index.vue @@ -102,7 +102,7 @@ @@ -121,6 +121,8 @@ export default { }, data() { return { + //按钮loading + buttonLoading: false, // 遮罩层 loading: true, // 显示搜索条件 @@ -233,12 +235,14 @@ export default { }, /** 修改按钮操作 */ handleUpdate(row) { + this.loading = true; this.reset(); this.getTreeselect(); if (row != null) { this.form.parentId = row.id; } getTree(row.id).then(response => { + this.loading = false; this.form = response.data; this.open = true; this.title = "修改测试树表"; @@ -248,14 +252,17 @@ export default { submitForm() { this.$refs["form"].validate(valid => { if (valid) { + this.buttonLoading = true; if (this.form.id != null) { updateTree(this.form).then(response => { + this.buttonLoading = false; this.msgSuccess("修改成功"); this.open = false; this.getList(); }); } else { addTree(this.form).then(response => { + this.buttonLoading = false; this.msgSuccess("新增成功"); this.open = false; this.getList(); @@ -270,9 +277,11 @@ export default { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" - }).then(function() { + }).then(() => { + this.loading = true; return delTree(row.id); }).then(() => { + this.loading = false; this.getList(); this.msgSuccess("删除成功"); }) diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue index 094a7062..8d2137ad 100644 --- a/ruoyi-ui/src/views/system/menu/index.vue +++ b/ruoyi-ui/src/views/system/menu/index.vue @@ -163,7 +163,7 @@ - + diff --git a/ruoyi-ui/src/views/tool/build/RightPanel.vue b/ruoyi-ui/src/views/tool/build/RightPanel.vue index 1acdc579..88013a54 100644 --- a/ruoyi-ui/src/views/tool/build/RightPanel.vue +++ b/ruoyi-ui/src/views/tool/build/RightPanel.vue @@ -573,6 +573,7 @@