diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/annotation/Excel.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/annotation/Excel.java index 10f9a91..70368ab 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/annotation/Excel.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/annotation/Excel.java @@ -54,12 +54,12 @@ public @interface Excel public int roundingMode() default BigDecimal.ROUND_HALF_EVEN; /** - * 导出时在excel中每个列的高度 单位为字符 + * 导出时在excel中每个列的高度 */ public double height() default 14; /** - * 导出时在excel中每个列的宽 单位为字符 + * 导出时在excel中每个列的宽度 */ public double width() default 16; @@ -109,7 +109,7 @@ public @interface Excel public ColumnType cellType() default ColumnType.STRING; /** - * 导出列头背景色 + * 导出列头背景颜色 */ public IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT; @@ -119,7 +119,7 @@ public @interface Excel public IndexedColors headerColor() default IndexedColors.WHITE; /** - * 导出单元格背景色 + * 导出单元格背景颜色 */ public IndexedColors backgroundColor() default IndexedColors.WHITE; diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/uuid/UUID.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/uuid/UUID.java index b10955a..6e0b776 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/uuid/UUID.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/uuid/UUID.java @@ -66,7 +66,7 @@ public final class UUID implements java.io.Serializable, Comparable } /** - * 获取类型 4(伪随机生成的)UUID 的静态工厂。 使用加密的本地线程伪随机数生成器生成该 UUID。 + * 获取类型 4(伪随机生成的)UUID 的静态工厂。 * * @return 随机生成的 {@code UUID} */ diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java index 583d35e..61d00ae 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java @@ -180,6 +180,16 @@ public class AjaxResult extends HashMap return Objects.equals(HttpStatus.SUCCESS, this.get(CODE_TAG)); } + /** + * 是否为警告消息 + * + * @return 结果 + */ + public boolean isWarn() + { + return Objects.equals(HttpStatus.WARN, this.get(CODE_TAG)); + } + /** * 是否为错误消息 * @@ -187,7 +197,7 @@ public class AjaxResult extends HashMap */ public boolean isError() { - return !isSuccess(); + return Objects.equals(HttpStatus.ERROR, this.get(CODE_TAG)); } /** diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPermissionServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPermissionServiceImpl.java index d6750af..b506636 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPermissionServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPermissionServiceImpl.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import com.ruoyi.system.api.domain.SysRole; import com.ruoyi.system.api.domain.SysUser; import com.ruoyi.system.service.ISysMenuService; @@ -65,7 +66,7 @@ public class SysPermissionServiceImpl implements ISysPermissionService else { List roles = user.getRoles(); - if (!roles.isEmpty() && roles.size() > 1) + if (!CollectionUtils.isEmpty(roles)) { // 多角色设置permissions属性,以便数据权限匹配权限 for (SysRole role : roles) diff --git a/ruoyi-ui/src/assets/images/pay.png b/ruoyi-ui/src/assets/images/pay.png new file mode 100644 index 0000000..bb8b967 Binary files /dev/null and b/ruoyi-ui/src/assets/images/pay.png differ diff --git a/ruoyi-ui/src/utils/generator/js.js b/ruoyi-ui/src/utils/generator/js.js index be760aa..9241b45 100644 --- a/ruoyi-ui/src/utils/generator/js.js +++ b/ruoyi-ui/src/utils/generator/js.js @@ -1,4 +1,3 @@ -import { isArray } from 'util' import { exportDefault, titleCase } from '@/utils/index' import { trigger } from './config' @@ -133,12 +132,12 @@ function buildRules(conf, ruleList) { const rules = [] if (trigger[conf.tag]) { if (conf.required) { - const type = isArray(conf.defaultValue) ? 'type: \'array\',' : '' - let message = isArray(conf.defaultValue) ? `请至少选择一个${conf.vModel}` : conf.placeholder + const type = Array.isArray(conf.defaultValue) ? 'type: \'array\',' : '' + let message = Array.isArray(conf.defaultValue) ? `请至少选择一个${conf.vModel}` : conf.placeholder if (message === undefined) message = `${conf.label}不能为空` rules.push(`{ required: true, ${type} message: '${message}', trigger: '${trigger[conf.tag]}' }`) } - if (conf.regList && isArray(conf.regList)) { + if (conf.regList && Array.isArray(conf.regList)) { conf.regList.forEach(item => { if (item.pattern) { rules.push(`{ pattern: ${eval(item.pattern)}, message: '${item.message}', trigger: '${trigger[conf.tag]}' }`) diff --git a/ruoyi-ui/src/views/index.vue b/ruoyi-ui/src/views/index.vue index a5404ba..b1ee6f8 100644 --- a/ruoyi-ui/src/views/index.vue +++ b/ruoyi-ui/src/views/index.vue @@ -180,7 +180,7 @@
  • 升级echarts到最新版本5.4.0
  • 升级core-js到最新版本3.25.3
  • 升级element-ui到最新版本2.15.12
  • -
  • 移除commons-collections多余的依赖
  • +
  • 移除commons-collections多余的依赖
  • 优化弹窗内容过多展示不全问题
  • 优化导出对象的子列表为空会出现[]问题
  • 优化字符未使用下划线不进行驼峰式处理
  • @@ -322,7 +322,7 @@
  • 代码生成新增Java类型Boolean
  • 定时任务目标字符串过滤特殊字符
  • 定时任务目标字符串验证包名白名单
  • -
  • 升级nacos到最新版2.0.4
  • +
  • 升级nacos到最新版2.0.4
  • 升级spring-cloud到最新版2021.0.0
  • 升级spring-boot到最新版本2.6.3
  • 升级spring-boot-admin到最新版2.6.1
  • @@ -352,17 +352,17 @@
  • 新增tab对象简化页签操作
  • 修改获取缓存信息方式
  • 修改权限认证注解实现
  • -
  • 自定义文字复制剪贴指令
  • +
  • 自定义文字复制剪贴指令
  • 升级axios到最新版本0.24.0
  • 升级core-js到最新版本3.19.1
  • 升级jsencrypt到最新版本3.2.1
  • 升级js-cookie到最新版本3.0.1
  • -
  • 升级clipboard到最新版本2.0.8
  • +
  • 升级clipboard到最新版本2.0.8
  • 升级velocity到最新版本2.3
  • 升级spring-boot到最新版本2.5.6
  • 升级spring-boot-admin到最新版2.5.4
  • 升级dynamic-ds到最新版本3.5.0
  • -
  • 代码生成预览支持复制内容
  • +
  • 代码生成预览支持复制内容
  • 修复五级以上菜单出现的404问题
  • 生产环境使用路由懒加载提升页面响应速度
  • 任务屏蔽违规字符&参数忽略双引号中的逗号
  • @@ -821,7 +821,7 @@
    donate diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 2506c93..cfc179b 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -90,9 +90,7 @@ module.exports = { }) .end() - config - .when(process.env.NODE_ENV !== 'development', - config => { + config.when(process.env.NODE_ENV !== 'development', config => { config .plugin('ScriptExtHtmlWebpackPlugin') .after('html') @@ -101,36 +99,36 @@ module.exports = { inline: /runtime\..*\.js$/ }]) .end() - config - .optimization.splitChunks({ - chunks: 'all', - cacheGroups: { - libs: { - name: 'chunk-libs', - test: /[\\/]node_modules[\\/]/, - priority: 10, - chunks: 'initial' // only package third parties that are initially dependent - }, - elementUI: { - name: 'chunk-elementUI', // split elementUI into a single package - priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app - test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm - }, - commons: { - name: 'chunk-commons', - test: resolve('src/components'), // can customize your rules - minChunks: 3, // minimum common number - priority: 5, - reuseExistingChunk: true - } + + config.optimization.splitChunks({ + chunks: 'all', + cacheGroups: { + libs: { + name: 'chunk-libs', + test: /[\\/]node_modules[\\/]/, + priority: 10, + chunks: 'initial' // only package third parties that are initially dependent + }, + elementUI: { + name: 'chunk-elementUI', // split elementUI into a single package + test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm + priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app + }, + commons: { + name: 'chunk-commons', + test: resolve('src/components'), // can customize your rules + minChunks: 3, // minimum common number + priority: 5, + reuseExistingChunk: true } - }) + } + }) + config.optimization.runtimeChunk('single'), { from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件 to: './' //到根目录下 } - } - ) + }) } }