疯狂的狮子Li
2021-07-13 83905db7170ea5981949e0f4b56695fb4ee02c83
!69 同步dev分支
Merge pull request !69 from 疯狂的狮子Li/dev
已修改30个文件
已重命名1个文件
已删除1个文件
262 ■■■■■ 文件已修改
README.md 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
docker/docker-compose.yml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/Dockerfile 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application.yml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-demo/pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-extend/pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-extend/ruoyi-monitor-admin/pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-framework/pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/CaptchaProperties.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-generator/pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-quartz/pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MetaVo.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/package.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/components/Editor/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/components/ImageUpload/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/login.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sql/ry_20210713.sql 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
README.md
@@ -4,7 +4,7 @@
[![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)
<br>
[![RuoYi-Vue-Plus](https://img.shields.io/badge/RuoYi_Vue_Plus-2.5.0-success.svg)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus)
[![RuoYi-Vue-Plus](https://img.shields.io/badge/RuoYi_Vue_Plus-2.5.1-success.svg)](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus)
[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-2.4-blue.svg)]()
[![JDK-8+](https://img.shields.io/badge/JDK-8+-green.svg)]()
[![JDK-11](https://img.shields.io/badge/JDK-11-green.svg)]()
docker/docker-compose.yml
@@ -76,12 +76,13 @@
        ipv4_address: 172.30.0.48
  ruoyi-server1:
    image: "ruoyi/ruoyi-server:2.5.0"
    image: "ruoyi/ruoyi-server:2.5.1"
    environment:
      - TZ=Asia/Shanghai
    volumes:
      # é…ç½®æ–‡ä»¶
      - /docker/server1/logs/:/ruoyi/server/logs/
      - /docker/ruoyi/uploadPath/:/ruoyi/server/ruoyi/uploadPath/
    privileged: true
    restart: always
    networks:
@@ -89,12 +90,13 @@
        ipv4_address: 172.30.0.60
  ruoyi-server2:
    image: "ruoyi/ruoyi-server:2.5.0"
    image: "ruoyi/ruoyi-server:2.5.1"
    environment:
      - TZ=Asia/Shanghai
    volumes:
      # é…ç½®æ–‡ä»¶
      - /docker/server2/logs/:/ruoyi/server/logs/
      - /docker/ruoyi/uploadPath/:/ruoyi/server/ruoyi/uploadPath/
    privileged: true
    restart: always
    networks:
@@ -102,7 +104,7 @@
        ipv4_address: 172.30.0.61
  ruoyi-monitor-admin:
    image: "ruoyi/ruoyi-monitor-admin:2.5.0"
    image: "ruoyi/ruoyi-monitor-admin:2.5.1"
    environment:
      - TZ=Asia/Shanghai
    privileged: true
pom.xml
@@ -6,14 +6,14 @@
    <groupId>com.ruoyi</groupId>
    <artifactId>ruoyi-vue-plus</artifactId>
    <version>2.5.0</version>
    <version>2.5.1</version>
    <name>RuoYi-Vue-Plus</name>
    <url>https://gitee.com/JavaLionLi/RuoYi-Vue-Plus</url>
    <description>RuoYi-Vue-Plus后台管理系统</description>
    <properties>
        <ruoyi-vue-plus.version>2.5.0</ruoyi-vue-plus.version>
        <ruoyi-vue-plus.version>2.5.1</ruoyi-vue-plus.version>
        <spring-boot.version>2.4.8</spring-boot.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
ruoyi-admin/Dockerfile
@@ -4,6 +4,7 @@
RUN mkdir -p /ruoyi/server
RUN mkdir -p /ruoyi/server/logs
RUN mkdir -p /ruoyi/server/ruoyi/uploadPath
WORKDIR /ruoyi/server
ruoyi-admin/pom.xml
@@ -5,7 +5,7 @@
    <parent>
        <artifactId>ruoyi-vue-plus</artifactId>
        <groupId>com.ruoyi</groupId>
        <version>2.5.0</version>
        <version>2.5.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <packaging>jar</packaging>
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
@@ -14,6 +14,7 @@
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.framework.captcha.UnsignedMathGenerator;
import com.ruoyi.framework.config.properties.CaptchaProperties;
import com.ruoyi.system.service.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -26,7 +27,7 @@
/**
 * éªŒè¯ç æ“ä½œå¤„理
 *
 * @author Lion Li
 * @author ruoyi
 */
@RestController
public class CaptchaController {
@@ -47,15 +48,18 @@
    @Autowired
    private CaptchaProperties captchaProperties;
    @Autowired
    private ISysConfigService configService;
    /**
     * ç”ŸæˆéªŒè¯ç 
     */
    @GetMapping("/captchaImage")
    public AjaxResult getCode() {
        Map<String, Object> ajax = new HashMap<>();
        Boolean enabled = captchaProperties.getEnabled();
        ajax.put("enabled", enabled);
        if (!enabled) {
        boolean captchaOnOff = configService.selectCaptchaOnOff();
        ajax.put("captchaOnOff", captchaOnOff);
        if (!captchaOnOff) {
            return AjaxResult.success(ajax);
        }
        // ä¿å­˜éªŒè¯ç ä¿¡æ¯
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java
@@ -1,5 +1,6 @@
package com.ruoyi.web.controller.system;
import cn.hutool.core.lang.Validator;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
@@ -9,7 +10,6 @@
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.service.ISysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -97,7 +97,7 @@
        {
            return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
        }
        else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath()))
        else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !Validator.isUrl(menu.getPath()))
        {
            return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
        }
@@ -117,7 +117,7 @@
        {
            return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
        }
        else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath()))
        else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !Validator.isUrl(menu.getPath()))
        {
            return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
        }
ruoyi-admin/src/main/resources/application.yml
@@ -14,8 +14,6 @@
  addressEnabled: true
captcha:
  # éªŒè¯ç å¼€å…³
  enabled: true
  # éªŒè¯ç ç±»åž‹ math æ•°ç»„计算 char å­—符验证
  type: math
  # line çº¿æ®µå¹²æ‰° circle åœ†åœˆå¹²æ‰° shear æ‰­æ›²å¹²æ‰°
ruoyi-common/pom.xml
@@ -5,7 +5,7 @@
    <parent>
        <artifactId>ruoyi-vue-plus</artifactId>
        <groupId>com.ruoyi</groupId>
        <version>2.5.0</version>
        <version>2.5.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java
ÎļþÒÑɾ³ý
ruoyi-demo/pom.xml
@@ -5,7 +5,7 @@
    <parent>
        <artifactId>ruoyi-vue-plus</artifactId>
        <groupId>com.ruoyi</groupId>
        <version>2.5.0</version>
        <version>2.5.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
ruoyi-extend/pom.xml
@@ -5,7 +5,7 @@
    <parent>
        <artifactId>ruoyi-vue-plus</artifactId>
        <groupId>com.ruoyi</groupId>
        <version>2.5.0</version>
        <version>2.5.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>ruoyi-extend</artifactId>
ruoyi-extend/ruoyi-monitor-admin/pom.xml
@@ -5,7 +5,7 @@
    <parent>
        <artifactId>ruoyi-extend</artifactId>
        <groupId>com.ruoyi</groupId>
        <version>2.5.0</version>
        <version>2.5.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <packaging>jar</packaging>
ruoyi-framework/pom.xml
@@ -5,7 +5,7 @@
    <parent>
        <artifactId>ruoyi-vue-plus</artifactId>
        <groupId>com.ruoyi</groupId>
        <version>2.5.0</version>
        <version>2.5.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/CaptchaProperties.java
@@ -15,11 +15,6 @@
public class CaptchaProperties {
    /**
     * éªŒè¯ç å¼€å…³
     */
    private Boolean enabled;
    /**
     * éªŒè¯ç ç±»åž‹
      */
    private String type;
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
@@ -11,7 +11,7 @@
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.MessageUtils;
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.framework.config.properties.CaptchaProperties;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationManager;
@@ -41,10 +41,10 @@
    private RedisCache redisCache;
    @Autowired
    private CaptchaProperties captchaProperties;
    private ISysUserService userService;
    @Autowired
    private ISysUserService userService;
    private ISysConfigService configService;
    @Autowired
    private AsyncService asyncService;
@@ -61,19 +61,12 @@
    public String login(String username, String password, String code, String uuid)
    {
        HttpServletRequest request = ServletUtils.getRequest();
        if(captchaProperties.getEnabled()) {
            String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
            String captcha = redisCache.getCacheObject(verifyKey);
            redisCache.deleteObject(verifyKey);
            if (captcha == null) {
                asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"), request);
                throw new CaptchaExpireException();
            }
            if (!code.equalsIgnoreCase(captcha)) {
                asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"), request);
                throw new CaptchaException();
            }
        }
        boolean captchaOnOff = configService.selectCaptchaOnOff();
        // éªŒè¯ç å¼€å…³
        if (captchaOnOff)
        {
            validateCapcha(username, code, uuid, request);
        }
        // ç”¨æˆ·éªŒè¯
        Authentication authentication = null;
        try
@@ -103,6 +96,28 @@
    }
    /**
     * æ ¡éªŒéªŒè¯ç 
     *
     * @param username ç”¨æˆ·å
     * @param code éªŒè¯ç 
     * @param uuid å”¯ä¸€æ ‡è¯†
     * @return ç»“æžœ
     */
    public void validateCapcha(String username, String code, String uuid, HttpServletRequest request) {
        String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
        String captcha = redisCache.getCacheObject(verifyKey);
        redisCache.deleteObject(verifyKey);
        if (captcha == null) {
            asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"), request);
            throw new CaptchaExpireException();
        }
        if (!code.equalsIgnoreCase(captcha)) {
            asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"), request);
            throw new CaptchaException();
        }
    }
    /**
     * è®°å½•登录信息
     */
    public void recordLoginInfo(SysUser user)
ruoyi-generator/pom.xml
@@ -5,7 +5,7 @@
    <parent>
        <artifactId>ruoyi-vue-plus</artifactId>
        <groupId>com.ruoyi</groupId>
        <version>2.5.0</version>
        <version>2.5.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java
@@ -35,10 +35,7 @@
import java.io.File;
import java.io.IOException;
import java.io.StringWriter;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@@ -137,14 +134,17 @@
            for (GenTableColumn cenTableColumn : genTable.getColumns()) {
                genTableColumnMapper.update(cenTableColumn,
                        new LambdaUpdateWrapper<GenTableColumn>()
                                .set(cenTableColumn.getIsPk() == null, GenTableColumn::getIsPk, null)
                                .set(cenTableColumn.getIsIncrement() == null, GenTableColumn::getIsIncrement, null)
                                .set(cenTableColumn.getIsInsert() == null, GenTableColumn::getIsInsert, null)
                                .set(cenTableColumn.getIsEdit() == null, GenTableColumn::getIsEdit, null)
                                .set(cenTableColumn.getIsList() == null, GenTableColumn::getIsList, null)
                                .set(cenTableColumn.getIsQuery() == null, GenTableColumn::getIsQuery, null)
                                .set(cenTableColumn.getIsRequired() == null, GenTableColumn::getIsRequired, null)
                                .eq(GenTableColumn::getColumnId,cenTableColumn.getColumnId()));
                            .set(StrUtil.isBlank(cenTableColumn.getColumnComment()), GenTableColumn::getColumnComment, null)
                            .set(StrUtil.isBlank(cenTableColumn.getIsPk()), GenTableColumn::getIsPk, null)
                            .set(StrUtil.isBlank(cenTableColumn.getIsIncrement()), GenTableColumn::getIsIncrement, null)
                            .set(StrUtil.isBlank(cenTableColumn.getIsInsert()), GenTableColumn::getIsInsert, null)
                            .set(StrUtil.isBlank(cenTableColumn.getIsEdit()), GenTableColumn::getIsEdit, null)
                            .set(StrUtil.isBlank(cenTableColumn.getIsList()), GenTableColumn::getIsList, null)
                            .set(StrUtil.isBlank(cenTableColumn.getIsQuery()), GenTableColumn::getIsQuery, null)
                            .set(StrUtil.isBlank(cenTableColumn.getIsRequired()), GenTableColumn::getIsRequired, null)
                            .set(StrUtil.isBlank(cenTableColumn.getQueryType()), GenTableColumn::getQueryType, null)
                            .set(StrUtil.isBlank(cenTableColumn.getDictType()), GenTableColumn::getDictType, null)
                            .eq(GenTableColumn::getColumnId,cenTableColumn.getColumnId()));
            }
        }
    }
@@ -180,10 +180,14 @@
                if (row > 0) {
                    // ä¿å­˜åˆ—信息
                    List<GenTableColumn> genTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName);
                    List<GenTableColumn> saveColumns = new ArrayList<>();
                    for (GenTableColumn column : genTableColumns) {
                        GenUtils.initColumnField(column, table);
                        saveColumns.add(column);
                    }
                    genTableColumnMapper.insertAll(genTableColumns);
                    if (CollUtil.isNotEmpty(saveColumns)) {
                        genTableColumnMapper.insertAll(saveColumns);
                    }
                }
            }
        } catch (Exception e) {
@@ -287,12 +291,16 @@
        }
        List<String> dbTableColumnNames = dbTableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList());
        List<GenTableColumn> saveColumns = new ArrayList<>();
        dbTableColumns.forEach(column -> {
            if (!tableColumnNames.contains(column.getColumnName())) {
                GenUtils.initColumnField(column, table);
                saveColumns.add(column);
            }
        });
        genTableColumnMapper.insertAll(tableColumns);
        if (CollUtil.isNotEmpty(saveColumns)) {
            genTableColumnMapper.insertAll(saveColumns);
        }
        List<GenTableColumn> delColumns = tableColumns.stream().filter(column -> !dbTableColumnNames.contains(column.getColumnName())).collect(Collectors.toList());
        if (CollUtil.isNotEmpty(delColumns)) {
ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
@@ -285,7 +285,7 @@
#else
#set($comment=$column.columnComment)
#end
#if(${column.dictType} != '')
#if(${column.dictType} && ${column.dictType} != '')
      // $comment字典
      ${column.javaField}Options: [],
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
@@ -327,7 +327,7 @@
  created() {
    this.getList();
#foreach ($column in $columns)
#if(${column.dictType} != '')
#if(${column.dictType} && ${column.dictType} != '')
    this.getDicts("${column.dictType}").then(response => {
      this.${column.javaField}Options = response.data;
    });
@@ -379,7 +379,7 @@
      });
    },
#foreach ($column in $columns)
#if(${column.dictType} != '')
#if(${column.dictType} && ${column.dictType} != '')
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
@@ -350,7 +350,7 @@
#else
#set($comment=$column.columnComment)
#end
#if(${column.dictType} != '')
#if(${column.dictType} && ${column.dictType} != '')
      // $comment字典
      ${column.javaField}Options: [],
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
@@ -394,7 +394,7 @@
  created() {
    this.getList();
#foreach ($column in $columns)
#if(${column.dictType} != '')
#if(${column.dictType} && ${column.dictType} != '')
    this.getDicts("${column.dictType}").then(response => {
      this.${column.javaField}Options = response.data;
    });
@@ -427,7 +427,7 @@
      });
    },
#foreach ($column in $columns)
#if(${column.dictType} != '')
#if(${column.dictType} && ${column.dictType} != '')
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
ruoyi-quartz/pom.xml
@@ -5,7 +5,7 @@
    <parent>
        <artifactId>ruoyi-vue-plus</artifactId>
        <groupId>com.ruoyi</groupId>
        <version>2.5.0</version>
        <version>2.5.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
ruoyi-system/pom.xml
@@ -5,7 +5,7 @@
    <parent>
        <artifactId>ruoyi-vue-plus</artifactId>
        <groupId>com.ruoyi</groupId>
        <version>2.5.0</version>
        <version>2.5.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MetaVo.java
@@ -1,6 +1,6 @@
package com.ruoyi.system.domain.vo;
import com.ruoyi.common.utils.StringUtils;
import cn.hutool.core.lang.Validator;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@@ -56,7 +56,7 @@
        this.title = title;
        this.icon = icon;
        this.noCache = noCache;
        if (StringUtils.ishttp(link)) {
        if (Validator.isUrl(link)) {
            this.link = link;
        }
    }
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java
@@ -33,6 +33,13 @@
    public String selectConfigByKey(String configKey);
    /**
     * èŽ·å–éªŒè¯ç å¼€å…³
     *
     * @return true开启,false关闭
     */
    public boolean selectCaptchaOnOff();
    /**
     * æŸ¥è¯¢å‚数配置列表
     *
     * @param config å‚数配置信息
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
@@ -94,6 +94,19 @@
    }
    /**
     * èŽ·å–éªŒè¯ç å¼€å…³
     *
     * @return true开启,false关闭
     */
    public boolean selectCaptchaOnOff() {
        String captchaOnOff = selectConfigByKey("sys.account.captchaOnOff");
        if (StrUtil.isEmpty(captchaOnOff)) {
            return true;
        }
        return Convert.toBool(captchaOnOff);
    }
    /**
     * æŸ¥è¯¢å‚数配置列表
     *
     * @param config å‚数配置信息
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
@@ -11,7 +11,6 @@
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.SysRoleMenu;
import com.ruoyi.system.domain.vo.MetaVo;
import com.ruoyi.system.domain.vo.RouterVo;
@@ -19,6 +18,7 @@
import com.ruoyi.system.mapper.SysRoleMapper;
import com.ruoyi.system.mapper.SysRoleMenuMapper;
import com.ruoyi.system.service.ISysMenuService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -371,7 +371,7 @@
     * @return ç»“æžœ
     */
    public boolean isInnerLink(SysMenu menu) {
        return menu.getIsFrame().equals(UserConstants.NO_FRAME) && StringUtils.ishttp(menu.getPath());
        return menu.getIsFrame().equals(UserConstants.NO_FRAME) && Validator.isUrl(menu.getPath());
    }
    /**
ruoyi-ui/package.json
@@ -1,6 +1,6 @@
{
  "name": "ruoyi-vue-plus",
  "version": "2.5.0",
  "version": "2.5.1",
  "description": "RuoYi-Vue-Plus后台管理系统",
  "author": "LionLi",
  "license": "MIT",
ruoyi-ui/src/components/Editor/index.vue
@@ -130,14 +130,14 @@
            this.quill.format("image", false);
          }
        });
        toolbar.addHandler("video", (value) => {
          this.uploadType = "video";
          if (value) {
            this.$refs.upload.$children[0].$refs.input.click();
          } else {
            this.quill.format("video", false);
          }
        });
        // toolbar.addHandler("video", (value) => {
        //   this.uploadType = "video";
        //   if (value) {
        //     this.$refs.upload.$children[0].$refs.input.click();
        //   } else {
        //     this.quill.format("video", false);
        //   }
        // });
      }
      this.Quill.pasteHTML(this.currentValue);
      this.Quill.on("text-change", (delta, oldDelta, source) => {
ruoyi-ui/src/components/ImageUpload/index.vue
@@ -116,7 +116,7 @@
  methods: {
    // åˆ é™¤å›¾ç‰‡
    handleRemove(file, fileList) {
      const findex = this.fileList.indexOf(file.name);
      const findex = this.fileList.map(f => f.name).indexOf(file.name);
      this.fileList.splice(findex, 1);
      this.$emit("input", this.listToString(this.fileList));
    },
ruoyi-ui/src/views/index.vue
@@ -91,6 +91,18 @@
            <span>更新日志</span>
          </div>
          <el-collapse accordion>
            <el-collapse-item title="v2.5.1 - 2021-7-13">
              <ol>
                <li>update éªŒè¯ç å¼€å…³ è½¬ç§»åˆ°è¡¨ å‚数管理 å†…</li>
                <li>update ä½¿ç”¨hutool重构 åˆ¤æ–­æ˜¯å¦url</li>
                <li>fix ä¿®å¤ docker业务集群部署与文件上传的问题</li>
                <li>fix ä¿®å¤ä»£ç ç”ŸæˆåŒæ­¥è¡¨ç»“æž„id冲突问题</li>
                <li>fix ä¿®å¤ä»£ç ç”Ÿæˆé€‰æ‹©å­—å…¸ æ— æ³•取消问题</li>
                <li>fix ä¿®å¤ä»£ç ç”Ÿæˆå­—典为null问题</li>
                <li>fix å›¾ç‰‡ä¸Šä¼  å¤šå›¾æ—¶æ— æ³•删除相应图片修复</li>
                <li>remove åˆ é™¤å¯Œæ–‡æœ¬video事件</li>
              </ol>
            </el-collapse-item>
            <el-collapse-item title="v2.5.0 - 2021-7-12">
              <ol>
                <li>update springboot 2.4.7 => 2.4.8</li>
ruoyi-ui/src/views/login.vue
@@ -18,7 +18,7 @@
          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
        </el-input>
      </el-form-item>
      <el-form-item prop="code" v-if="captchaEnabled">
      <el-form-item prop="code" v-if="captchaOnOff">
        <el-input
          v-model="loginForm.code"
          auto-complete="off"
@@ -81,8 +81,8 @@
        code: [{ required: true, trigger: "change", message: "验证码不能为空" }]
      },
      loading: false,
      redirect: undefined,
      captchaEnabled:false
      captchaOnOff: true,
      redirect: undefined
    };
  },
  watch: {
@@ -100,8 +100,8 @@
  methods: {
    getCode() {
      getCodeImg().then(res => {
        this.captchaEnabled = res.data.enabled;
        if(res.data.enabled){
        this.captchaOnOff = res.data.captchaOnOff === undefined ? true : res.data.captchaOnOff;
        if (this.captchaOnOff) {
          this.codeUrl = "data:image/gif;base64," + res.data.img;
          this.loginForm.uuid = res.data.uuid;
        }
@@ -134,7 +134,9 @@
            this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
          }).catch(() => {
            this.loading = false;
            this.getCode();
            if (this.captchaOnOff) {
              this.getCode();
            }
          });
        }
      });
sql/ry_20210713.sql
ÎļþÃû´Ó sql/ry_20210210.sql ÐÞ¸Ä
@@ -537,9 +537,10 @@
  primary key (config_id)
) engine=innodb auto_increment=100 comment = '参数配置表';
insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName',     'skin-blue',     'Y', 'admin', sysdate(), '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' );
insert into sys_config values(2, '用户管理-账号初始密码',     'sys.user.initPassword',  '123456',        'Y', 'admin', sysdate(), '', null, '初始化密码 123456' );
insert into sys_config values(3, '主框架页-侧边栏主题',       'sys.index.sideTheme',    'theme-dark',    'Y', 'admin', sysdate(), '', null, '深色主题theme-dark,浅色主题theme-light' );
insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName',            'skin-blue',     'Y', 'admin', sysdate(), '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' );
insert into sys_config values(2, '用户管理-账号初始密码',     'sys.user.initPassword',         '123456',        'Y', 'admin', sysdate(), '', null, '初始化密码 123456' );
insert into sys_config values(3, '主框架页-侧边栏主题',       'sys.index.sideTheme',           'theme-dark',    'Y', 'admin', sysdate(), '', null, '深色主题theme-dark,浅色主题theme-light' );
insert into sys_config values(4, '账号自助-验证码开关',       'sys.account.captchaOnOff',      'true',          'Y', 'admin', sysdate(), '', null, '是否开启登录验证码功能(true开启,false关闭)');
-- ----------------------------