疯狂的狮子li
2021-06-03 77a7cac830f2dd240cfd59751fd6cb7293050b65
同步 dev
已修改15个文件
已删除1个文件
460 ■■■■ 文件已修改
LICENSE 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
README.md 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-dev.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-prod.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/demo/demo/index.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/demo/test/index.vue 361 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/demo/tree/index.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/menu/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/tool/build/RightPanel.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sql/test.sql 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 @@
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.
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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)
## æçŒ®ä½œè€…
作者为兼职做开源,平时还需要工作,如果帮到了您可以请作者吃个盒饭  
ruoyi-admin/src/main/resources/application-dev.yml
@@ -81,7 +81,7 @@
  # å•节点配置
  singleServerConfig:
    # å®¢æˆ·ç«¯åç§°
    clientName: ${ruoyi-vue-plus.name}
    clientName: ${ruoyi.name}
    # æœ€å°ç©ºé—²è¿žæŽ¥æ•°
    connectionMinimumIdleSize: 32
    # è¿žæŽ¥æ± å¤§å°
ruoyi-admin/src/main/resources/application-prod.yml
@@ -81,7 +81,7 @@
  # å•节点配置
  singleServerConfig:
    # å®¢æˆ·ç«¯åç§°
    clientName: ${ruoyi-vue-plus.name}
    clientName: ${ruoyi.name}
    # æœ€å°ç©ºé—²è¿žæŽ¥æ•°
    connectionMinimumIdleSize: 32
    # è¿žæŽ¥æ± å¤§å°
ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java
@@ -13,7 +13,7 @@
/**
 * web层通用数据处理
 *
 *
 * @author ruoyi
 */
public class BaseController
@@ -39,7 +39,7 @@
    /**
     * å“åº”返回结果
     *
     *
     * @param rows å½±å“è¡Œæ•°
     * @return æ“ä½œç»“æžœ
     */
ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
@@ -96,8 +96,12 @@
     * @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();
    }
    /**
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java
@@ -95,6 +95,7 @@
        }
        finally
        {
            IOUtils.closeQuietly(in);
            IOUtils.closeQuietly(baos);
        }
    }
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
@@ -8,6 +8,7 @@
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 @@
        }
    }
    @SuppressWarnings("unchecked")
    private static void putDataScope(JoinPoint joinPoint, String sql) {
        Object params = joinPoint.getArgs()[0];
        if (Validator.isNotNull(params)) {
@@ -167,13 +167,8 @@
                BaseEntity baseEntity = (BaseEntity) params;
                baseEntity.getParams().put(DATA_SCOPE, sql);
            } else {
                try {
                    Method getParams = params.getClass().getDeclaredMethod("getParams");
                    Map<String, Object> invoke = (Map<String, Object>) getParams.invoke(params);
                    invoke.put(DATA_SCOPE, sql);
                } catch (Exception e) {
                    // æ–¹æ³•未找到 ä¸å¤„理
                }
                Map<String, Object> invoke = ReflectUtils.invokeGetter(params, "params");
                invoke.put(DATA_SCOPE, sql);
            }
        }
    }
ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
@@ -247,7 +247,7 @@
#end
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button :loading="buttonLoading" type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
@@ -302,6 +302,8 @@
  },
  data() {
    return {
      //按钮loading
      buttonLoading: false,
      // é®ç½©å±‚
      loading: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
@@ -480,12 +482,14 @@
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    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 @@
    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 @@
#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 @@
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
        }).then(() => {
          this.loading = true;
          return del${BusinessName}(row.${pkColumn.javaField});
        }).then(() => {
          this.loading = false;
          this.getList();
          this.msgSuccess("删除成功");
        })
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
@@ -301,7 +301,7 @@
#end
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button :loading="buttonLoading" type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
@@ -353,6 +353,8 @@
  },
  data() {
    return {
      //按钮loading
      buttonLoading: false,
      // é®ç½©å±‚
      loading: true,
      // å¯¼å‡ºé®ç½©å±‚
@@ -534,9 +536,11 @@
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    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 @@
    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 @@
#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 @@
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
        }).then(() => {
          this.loading = true;
          return del${BusinessName}(${pkColumn.javaField}s);
        }).then(() => {
          this.loading = false;
          this.getList();
          this.msgSuccess("删除成功");
        })
ruoyi-ui/src/views/demo/demo/index.vue
@@ -152,7 +152,7 @@
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button :loading="buttonLoading" type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
@@ -168,6 +168,8 @@
  },
  data() {
    return {
      //按钮loading
      buttonLoading: false,
      // é®ç½©å±‚
      loading: true,
      // å¯¼å‡ºé®ç½©å±‚
@@ -277,9 +279,11 @@
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    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 @@
    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 @@
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(function() {
      }).then(() => {
        this.loading = true;
        return delDemo(ids);
      }).then(() => {
        this.loading = false;
        this.getList();
        this.msgSuccess("删除成功");
      })
ruoyi-ui/src/views/demo/test/index.vue
ÎļþÒÑɾ³ý
ruoyi-ui/src/views/demo/tree/index.vue
@@ -102,7 +102,7 @@
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button :loading="buttonLoading" type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
@@ -121,6 +121,8 @@
  },
  data() {
    return {
      //按钮loading
      buttonLoading: false,
      // é®ç½©å±‚
      loading: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
@@ -233,12 +235,14 @@
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    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 @@
    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 @@
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(function() {
      }).then(() => {
        this.loading = true;
        return delTree(row.id);
      }).then(() => {
        this.loading = false;
        this.getList();
        this.msgSuccess("删除成功");
      })
ruoyi-ui/src/views/system/menu/index.vue
@@ -163,7 +163,7 @@
          </el-col>
          <el-col :span="12">
            <el-form-item v-if="form.menuType != 'M'" label="权限标识">
              <el-input v-model="form.perms" placeholder="请权限标识" maxlength="50" />
              <el-input v-model="form.perms" placeholder="请权限标识" maxlength="100" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
ruoyi-ui/src/views/tool/build/RightPanel.vue
@@ -573,6 +573,7 @@
<script>
import { isArray } from 'util'
import draggable from 'vuedraggable'
import TreeNodeDialog from './TreeNodeDialog'
import { isNumberStr } from '@/utils/index'
import IconsDialog from './IconsDialog'
@@ -595,6 +596,7 @@
export default {
  components: {
    draggable,
    TreeNodeDialog,
    IconsDialog
  },
sql/test.sql
@@ -12,7 +12,7 @@
    create_by   varchar(64) NULL DEFAULT NULL COMMENT '创建人',
    update_time datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
    update_by   varchar(64) NULL DEFAULT NULL COMMENT '更新人',
    del_flag    int(0) NULL DEFAULT NULL COMMENT '删除标志',
    del_flag    int(0) NULL DEFAULT 0 COMMENT '删除标志',
    PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB COMMENT = '测试单表';
@@ -29,7 +29,7 @@
    create_by   varchar(64) NULL DEFAULT NULL COMMENT '创建人',
    update_time datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
    update_by   varchar(64) NULL DEFAULT NULL COMMENT '更新人',
    del_flag    int(0) NULL DEFAULT NULL COMMENT '删除标志',
    del_flag    int(0) NULL DEFAULT 0 COMMENT '删除标志',
    PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB COMMENT = '测试树表';