From 801f7cd8f7b322de1f6a5a633d081504ecf8a6ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Fri, 4 Jun 2021 16:20:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=202.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 4 +- README.md | 8 +- ruoyi-ui/package.json | 2 +- ruoyi-ui/src/views/demo/demo/index.vue | 13 +- ruoyi-ui/src/views/demo/tree/index.vue | 13 +- ruoyi-ui/src/views/index.vue | 16 +- ruoyi-ui/src/views/system/menu/index.vue | 2 +- ruoyi-ui/src/views/tool/build/RightPanel.vue | 2 + .../ruoyi/common/annotation/RedisLock.java | 27 +++ .../core/controller/BaseController.java | 4 +- .../ruoyi/common/core/redis/RedisCache.java | 8 +- .../com/ruoyi/common/utils/PageUtils.java | 4 +- .../ruoyi/common/utils/file/ImageUtils.java | 1 + .../demo/controller/RedisLockController.java | 35 ++++ .../framework/aspectj/DataScopeAspect.java | 10 +- .../framework/aspectj/RedisLockAspect.java | 167 ++++++++++++++++++ .../ruoyi/framework/config/RedisConfig.java | 3 +- ruoyi/src/main/resources/application-dev.yml | 2 +- ruoyi/src/main/resources/application-prod.yml | 2 +- ruoyi/src/main/resources/application.yml | 4 +- ruoyi/src/main/resources/vm/java/vo.java.vm | 2 +- .../main/resources/vm/vue/index-tree.vue.vm | 13 +- ruoyi/src/main/resources/vm/vue/index.vue.vm | 13 +- ry.sh | 12 +- sql/test.sql | 4 +- 25 files changed, 331 insertions(+), 40 deletions(-) create mode 100644 ruoyi/src/main/java/com/ruoyi/common/annotation/RedisLock.java create mode 100644 ruoyi/src/main/java/com/ruoyi/demo/controller/RedisLockController.java create mode 100644 ruoyi/src/main/java/com/ruoyi/framework/aspectj/RedisLockAspect.java diff --git a/LICENSE b/LICENSE index 8564f294c..32b307112 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 ce17def9d..b877e68c4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ ## 平台简介 +[](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus) +[](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/blob/master/LICENSE) +[](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 分页 @@ -45,10 +48,11 @@ * 同步升级 RuoYi-Vue 3.5.0 * 单模块 fast 分支 [RuoYi-Vue-Plus-fast](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/tree/fast/) +* Oracle 模块 oracle 分支 [RuoYi-Vue-Plus-oracle](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/tree/oracle/) ## 关注作者(扫码请备注: "加群") - + ## 捐献作者 作者为兼职做开源,平时还需要工作,如果帮到了您可以请作者吃个盒饭 diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 2fc1921b9..52551a4cc 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi-vue-plus", - "version": "2.3.0", + "version": "2.3.1", "description": "RuoYi-Vue-Plus后台管理系统", "author": "LionLi", "license": "MIT", diff --git a/ruoyi-ui/src/views/demo/demo/index.vue b/ruoyi-ui/src/views/demo/demo/index.vue index b831ad9b3..48fa36819 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/tree/index.vue b/ruoyi-ui/src/views/demo/tree/index.vue index ddf767777..afe96c4ae 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/index.vue b/ruoyi-ui/src/views/index.vue index 29d4dbb5c..d904f3098 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -80,6 +80,18 @@ 更新日志