RuoYi 2 anni fa
parent
commit
356b451b2a

+ 4 - 4
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/annotation/Excel.java

@@ -54,12 +54,12 @@ public @interface Excel
54
     public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
54
     public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
55
 
55
 
56
     /**
56
     /**
57
-     * 导出时在excel中每个列的高度 单位为字符
57
+     * 导出时在excel中每个列的高度
58
      */
58
      */
59
     public double height() default 14;
59
     public double height() default 14;
60
 
60
 
61
     /**
61
     /**
62
-     * 导出时在excel中每个列的宽 单位为字符
62
+     * 导出时在excel中每个列的宽
63
      */
63
      */
64
     public double width() default 16;
64
     public double width() default 16;
65
 
65
 
@@ -109,7 +109,7 @@ public @interface Excel
109
     public ColumnType cellType() default ColumnType.STRING;
109
     public ColumnType cellType() default ColumnType.STRING;
110
 
110
 
111
     /**
111
     /**
112
-     * 导出列头背景色
112
+     * 导出列头背景
113
      */
113
      */
114
     public IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT;
114
     public IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT;
115
 
115
 
@@ -119,7 +119,7 @@ public @interface Excel
119
     public IndexedColors headerColor() default IndexedColors.WHITE;
119
     public IndexedColors headerColor() default IndexedColors.WHITE;
120
 
120
 
121
     /**
121
     /**
122
-     * 导出单元格背景色
122
+     * 导出单元格背景
123
      */
123
      */
124
     public IndexedColors backgroundColor() default IndexedColors.WHITE;
124
     public IndexedColors backgroundColor() default IndexedColors.WHITE;
125
 
125
 

+ 1 - 1
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<UUID>
66
     }
66
     }
67
 
67
 
68
     /**
68
     /**
69
-     * 获取类型 4(伪随机生成的)UUID 的静态工厂。 使用加密的本地线程伪随机数生成器生成该 UUID。
69
+     * 获取类型 4(伪随机生成的)UUID 的静态工厂。 
70
      * 
70
      * 
71
      * @return 随机生成的 {@code UUID}
71
      * @return 随机生成的 {@code UUID}
72
      */
72
      */

+ 11 - 1
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/AjaxResult.java

@@ -181,13 +181,23 @@ public class AjaxResult extends HashMap<String, Object>
181
     }
181
     }
182
 
182
 
183
     /**
183
     /**
184
+     * 是否为警告消息
185
+     *
186
+     * @return 结果
187
+     */
188
+    public boolean isWarn()
189
+    {
190
+        return Objects.equals(HttpStatus.WARN, this.get(CODE_TAG));
191
+    }
192
+
193
+    /**
184
      * 是否为错误消息
194
      * 是否为错误消息
185
      *
195
      *
186
      * @return 结果
196
      * @return 结果
187
      */
197
      */
188
     public boolean isError()
198
     public boolean isError()
189
     {
199
     {
190
-        return !isSuccess();
200
+        return Objects.equals(HttpStatus.ERROR, this.get(CODE_TAG));
191
     }
201
     }
192
 
202
 
193
     /**
203
     /**

+ 2 - 1
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPermissionServiceImpl.java

@@ -5,6 +5,7 @@ import java.util.List;
5
 import java.util.Set;
5
 import java.util.Set;
6
 import org.springframework.beans.factory.annotation.Autowired;
6
 import org.springframework.beans.factory.annotation.Autowired;
7
 import org.springframework.stereotype.Service;
7
 import org.springframework.stereotype.Service;
8
+import org.springframework.util.CollectionUtils;
8
 import com.ruoyi.system.api.domain.SysRole;
9
 import com.ruoyi.system.api.domain.SysRole;
9
 import com.ruoyi.system.api.domain.SysUser;
10
 import com.ruoyi.system.api.domain.SysUser;
10
 import com.ruoyi.system.service.ISysMenuService;
11
 import com.ruoyi.system.service.ISysMenuService;
@@ -65,7 +66,7 @@ public class SysPermissionServiceImpl implements ISysPermissionService
65
         else
66
         else
66
         {
67
         {
67
             List<SysRole> roles = user.getRoles();
68
             List<SysRole> roles = user.getRoles();
68
-            if (!roles.isEmpty() && roles.size() > 1)
69
+            if (!CollectionUtils.isEmpty(roles))
69
             {
70
             {
70
                 // 多角色设置permissions属性,以便数据权限匹配权限
71
                 // 多角色设置permissions属性,以便数据权限匹配权限
71
                 for (SysRole role : roles)
72
                 for (SysRole role : roles)

BIN
ruoyi-ui/src/assets/images/pay.png


+ 3 - 4
ruoyi-ui/src/utils/generator/js.js

@@ -1,4 +1,3 @@
1
-import { isArray } from 'util'
2
 import { exportDefault, titleCase } from '@/utils/index'
1
 import { exportDefault, titleCase } from '@/utils/index'
3
 import { trigger } from './config'
2
 import { trigger } from './config'
4
 
3
 
@@ -133,12 +132,12 @@ function buildRules(conf, ruleList) {
133
   const rules = []
132
   const rules = []
134
   if (trigger[conf.tag]) {
133
   if (trigger[conf.tag]) {
135
     if (conf.required) {
134
     if (conf.required) {
136
-      const type = isArray(conf.defaultValue) ? 'type: \'array\',' : ''
137
-      let message = isArray(conf.defaultValue) ? `请至少选择一个${conf.vModel}` : conf.placeholder
135
+      const type = Array.isArray(conf.defaultValue) ? 'type: \'array\',' : ''
136
+      let message = Array.isArray(conf.defaultValue) ? `请至少选择一个${conf.vModel}` : conf.placeholder
138
       if (message === undefined) message = `${conf.label}不能为空`
137
       if (message === undefined) message = `${conf.label}不能为空`
139
       rules.push(`{ required: true, ${type} message: '${message}', trigger: '${trigger[conf.tag]}' }`)
138
       rules.push(`{ required: true, ${type} message: '${message}', trigger: '${trigger[conf.tag]}' }`)
140
     }
139
     }
141
-    if (conf.regList && isArray(conf.regList)) {
140
+    if (conf.regList && Array.isArray(conf.regList)) {
142
       conf.regList.forEach(item => {
141
       conf.regList.forEach(item => {
143
         if (item.pattern) {
142
         if (item.pattern) {
144
           rules.push(`{ pattern: ${eval(item.pattern)}, message: '${item.message}', trigger: '${trigger[conf.tag]}' }`)
143
           rules.push(`{ pattern: ${eval(item.pattern)}, message: '${item.message}', trigger: '${trigger[conf.tag]}' }`)

+ 6 - 6
ruoyi-ui/src/views/index.vue

@@ -180,7 +180,7 @@
180
                 <li>升级echarts到最新版本5.4.0</li>
180
                 <li>升级echarts到最新版本5.4.0</li>
181
                 <li>升级core-js到最新版本3.25.3</li>
181
                 <li>升级core-js到最新版本3.25.3</li>
182
                 <li>升级element-ui到最新版本2.15.12</li>
182
                 <li>升级element-ui到最新版本2.15.12</li>
183
-				<li>移除commons-collections多余的依赖</li>
183
+                <li>移除commons-collections多余的依赖</li>
184
                 <li>优化弹窗内容过多展示不全问题</li>
184
                 <li>优化弹窗内容过多展示不全问题</li>
185
                 <li>优化导出对象的子列表为空会出现[]问题</li>
185
                 <li>优化导出对象的子列表为空会出现[]问题</li>
186
                 <li>优化字符未使用下划线不进行驼峰式处理</li>
186
                 <li>优化字符未使用下划线不进行驼峰式处理</li>
@@ -322,7 +322,7 @@
322
                 <li>代码生成新增Java类型Boolean</li>
322
                 <li>代码生成新增Java类型Boolean</li>
323
                 <li>定时任务目标字符串过滤特殊字符</li>
323
                 <li>定时任务目标字符串过滤特殊字符</li>
324
                 <li>定时任务目标字符串验证包名白名单</li>
324
                 <li>定时任务目标字符串验证包名白名单</li>
325
-				<li>升级nacos到最新版2.0.4</li>
325
+                <li>升级nacos到最新版2.0.4</li>
326
                 <li>升级spring-cloud到最新版2021.0.0</li>
326
                 <li>升级spring-cloud到最新版2021.0.0</li>
327
                 <li>升级spring-boot到最新版本2.6.3</li>
327
                 <li>升级spring-boot到最新版本2.6.3</li>
328
                 <li>升级spring-boot-admin到最新版2.6.1</li>
328
                 <li>升级spring-boot-admin到最新版2.6.1</li>
@@ -352,17 +352,17 @@
352
                 <li>新增tab对象简化页签操作</li>
352
                 <li>新增tab对象简化页签操作</li>
353
                 <li>修改获取缓存信息方式</li>
353
                 <li>修改获取缓存信息方式</li>
354
                 <li>修改权限认证注解实现</li>
354
                 <li>修改权限认证注解实现</li>
355
-				<li>自定义文字复制剪贴指令</li>
355
+                <li>自定义文字复制剪贴指令</li>
356
                 <li>升级axios到最新版本0.24.0</li>
356
                 <li>升级axios到最新版本0.24.0</li>
357
                 <li>升级core-js到最新版本3.19.1</li>
357
                 <li>升级core-js到最新版本3.19.1</li>
358
                 <li>升级jsencrypt到最新版本3.2.1</li>
358
                 <li>升级jsencrypt到最新版本3.2.1</li>
359
                 <li>升级js-cookie到最新版本3.0.1</li>
359
                 <li>升级js-cookie到最新版本3.0.1</li>
360
-				<li>升级clipboard到最新版本2.0.8</li>
360
+                <li>升级clipboard到最新版本2.0.8</li>
361
                 <li>升级velocity到最新版本2.3</li>
361
                 <li>升级velocity到最新版本2.3</li>
362
                 <li>升级spring-boot到最新版本2.5.6</li>
362
                 <li>升级spring-boot到最新版本2.5.6</li>
363
                 <li>升级spring-boot-admin到最新版2.5.4</li>
363
                 <li>升级spring-boot-admin到最新版2.5.4</li>
364
                 <li>升级dynamic-ds到最新版本3.5.0</li>
364
                 <li>升级dynamic-ds到最新版本3.5.0</li>
365
-				<li>代码生成预览支持复制内容</li>
365
+                <li>代码生成预览支持复制内容</li>
366
                 <li>修复五级以上菜单出现的404问题</li>
366
                 <li>修复五级以上菜单出现的404问题</li>
367
                 <li>生产环境使用路由懒加载提升页面响应速度</li>
367
                 <li>生产环境使用路由懒加载提升页面响应速度</li>
368
                 <li>任务屏蔽违规字符&参数忽略双引号中的逗号</li>
368
                 <li>任务屏蔽违规字符&参数忽略双引号中的逗号</li>
@@ -821,7 +821,7 @@
821
           </div>
821
           </div>
822
           <div class="body">
822
           <div class="body">
823
             <img
823
             <img
824
-              src="https://oscimg.oschina.net/oscnet/up-d6695f82666e5018f715c41cb7ee60d3b73.png"
824
+              src="@/assets/images/pay.png"
825
               alt="donate"
825
               alt="donate"
826
               width="100%"
826
               width="100%"
827
             />
827
             />

+ 26 - 28
ruoyi-ui/vue.config.js

@@ -90,9 +90,7 @@ module.exports = {
90
       })
90
       })
91
       .end()
91
       .end()
92
 
92
 
93
-    config
94
-      .when(process.env.NODE_ENV !== 'development',
95
-        config => {
93
+    config.when(process.env.NODE_ENV !== 'development', config => {
96
           config
94
           config
97
             .plugin('ScriptExtHtmlWebpackPlugin')
95
             .plugin('ScriptExtHtmlWebpackPlugin')
98
             .after('html')
96
             .after('html')
@@ -101,36 +99,36 @@ module.exports = {
101
               inline: /runtime\..*\.js$/
99
               inline: /runtime\..*\.js$/
102
             }])
100
             }])
103
             .end()
101
             .end()
104
-          config
105
-            .optimization.splitChunks({
106
-              chunks: 'all',
107
-              cacheGroups: {
108
-                libs: {
109
-                  name: 'chunk-libs',
110
-                  test: /[\\/]node_modules[\\/]/,
111
-                  priority: 10,
112
-                  chunks: 'initial' // only package third parties that are initially dependent
113
-                },
114
-                elementUI: {
115
-                  name: 'chunk-elementUI', // split elementUI into a single package
116
-                  priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
117
-                  test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
118
-                },
119
-                commons: {
120
-                  name: 'chunk-commons',
121
-                  test: resolve('src/components'), // can customize your rules
122
-                  minChunks: 3, //  minimum common number
123
-                  priority: 5,
124
-                  reuseExistingChunk: true
125
-                }
102
+
103
+          config.optimization.splitChunks({
104
+            chunks: 'all',
105
+            cacheGroups: {
106
+              libs: {
107
+                name: 'chunk-libs',
108
+                test: /[\\/]node_modules[\\/]/,
109
+                priority: 10,
110
+                chunks: 'initial' // only package third parties that are initially dependent
111
+              },
112
+              elementUI: {
113
+                name: 'chunk-elementUI', // split elementUI into a single package
114
+                test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
115
+                priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app
116
+              },
117
+              commons: {
118
+                name: 'chunk-commons',
119
+                test: resolve('src/components'), // can customize your rules
120
+                minChunks: 3, //  minimum common number
121
+                priority: 5,
122
+                reuseExistingChunk: true
126
               }
123
               }
127
-            })
124
+            }
125
+          })
126
+
128
           config.optimization.runtimeChunk('single'),
127
           config.optimization.runtimeChunk('single'),
129
           {
128
           {
130
              from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
129
              from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
131
              to: './' //到根目录下
130
              to: './' //到根目录下
132
           }
131
           }
133
-        }
134
-      )
132
+    })
135
   }
133
   }
136
 }
134
 }