作者 RuoYi

optimized code

@@ -62,6 +62,7 @@ spring: @@ -62,6 +62,7 @@ spring:
62 max-file-size: 10MB 62 max-file-size: 10MB
63 # 设置总上传的文件大小 63 # 设置总上传的文件大小
64 max-request-size: 20MB 64 max-request-size: 20MB
  65 +
65 # 服务模块 66 # 服务模块
66 devtools: 67 devtools:
67 restart: 68 restart:
@@ -59,12 +59,12 @@ public @interface Excel @@ -59,12 +59,12 @@ public @interface Excel
59 public int roundingMode() default BigDecimal.ROUND_HALF_EVEN; 59 public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
60 60
61 /** 61 /**
62 - * 导出时在excel中每个列的高度 单位为字符 62 + * 导出时在excel中每个列的高度
63 */ 63 */
64 public double height() default 14; 64 public double height() default 14;
65 65
66 /** 66 /**
67 - * 导出时在excel中每个列的宽 单位为字符 67 + * 导出时在excel中每个列的宽
68 */ 68 */
69 public double width() default 16; 69 public double width() default 16;
70 70
@@ -114,7 +114,7 @@ public @interface Excel @@ -114,7 +114,7 @@ public @interface Excel
114 public ColumnType cellType() default ColumnType.STRING; 114 public ColumnType cellType() default ColumnType.STRING;
115 115
116 /** 116 /**
117 - * 导出列头背景色 117 + * 导出列头背景
118 */ 118 */
119 public IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT; 119 public IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT;
120 120
@@ -124,7 +124,7 @@ public @interface Excel @@ -124,7 +124,7 @@ public @interface Excel
124 public IndexedColors headerColor() default IndexedColors.WHITE; 124 public IndexedColors headerColor() default IndexedColors.WHITE;
125 125
126 /** 126 /**
127 - * 导出单元格背景色 127 + * 导出单元格背景
128 */ 128 */
129 public IndexedColors backgroundColor() default IndexedColors.WHITE; 129 public IndexedColors backgroundColor() default IndexedColors.WHITE;
130 130
1 package com.ruoyi.common.core.domain.model; 1 package com.ruoyi.common.core.domain.model;
2 2
3 -import java.util.Collection;  
4 -import java.util.Set;  
5 -import org.springframework.security.core.GrantedAuthority;  
6 -import org.springframework.security.core.userdetails.UserDetails;  
7 import com.alibaba.fastjson2.annotation.JSONField; 3 import com.alibaba.fastjson2.annotation.JSONField;
8 import com.ruoyi.common.core.domain.entity.SysUser; 4 import com.ruoyi.common.core.domain.entity.SysUser;
  5 +import org.springframework.security.core.GrantedAuthority;
  6 +import org.springframework.security.core.userdetails.UserDetails;
  7 +import java.util.Collection;
  8 +import java.util.Set;
9 9
10 /** 10 /**
11 * 登录用户身份权限 11 * 登录用户身份权限
@@ -71,6 +71,24 @@ public class LoginUser implements UserDetails @@ -71,6 +71,24 @@ public class LoginUser implements UserDetails
71 */ 71 */
72 private SysUser user; 72 private SysUser user;
73 73
  74 + public LoginUser()
  75 + {
  76 + }
  77 +
  78 + public LoginUser(SysUser user, Set<String> permissions)
  79 + {
  80 + this.user = user;
  81 + this.permissions = permissions;
  82 + }
  83 +
  84 + public LoginUser(Long userId, Long deptId, SysUser user, Set<String> permissions)
  85 + {
  86 + this.userId = userId;
  87 + this.deptId = deptId;
  88 + this.user = user;
  89 + this.permissions = permissions;
  90 + }
  91 +
74 public Long getUserId() 92 public Long getUserId()
75 { 93 {
76 return userId; 94 return userId;
@@ -101,24 +119,6 @@ public class LoginUser implements UserDetails @@ -101,24 +119,6 @@ public class LoginUser implements UserDetails
101 this.token = token; 119 this.token = token;
102 } 120 }
103 121
104 - public LoginUser()  
105 - {  
106 - }  
107 -  
108 - public LoginUser(SysUser user, Set<String> permissions)  
109 - {  
110 - this.user = user;  
111 - this.permissions = permissions;  
112 - }  
113 -  
114 - public LoginUser(Long userId, Long deptId, SysUser user, Set<String> permissions)  
115 - {  
116 - this.userId = userId;  
117 - this.deptId = deptId;  
118 - this.user = user;  
119 - this.permissions = permissions;  
120 - }  
121 -  
122 @JSONField(serialize = false) 122 @JSONField(serialize = false)
123 @Override 123 @Override
124 public String getPassword() 124 public String getPassword()
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 <artifactId>kaptcha</artifactId> 41 <artifactId>kaptcha</artifactId>
42 <exclusions> 42 <exclusions>
43 <exclusion> 43 <exclusion>
44 - <artifactId>javax.servlet-api</artifactId> 44 + <artifactId>servlet-api</artifactId>
45 <groupId>javax.servlet</groupId> 45 <groupId>javax.servlet</groupId>
46 </exclusion> 46 </exclusion>
47 </exclusions> 47 </exclusions>
@@ -62,7 +62,7 @@ public class PermissionService @@ -62,7 +62,7 @@ public class PermissionService
62 /** 62 /**
63 * 验证用户是否具有以下任意一个权限 63 * 验证用户是否具有以下任意一个权限
64 * 64 *
65 - * @param permissions 以 PERMISSION_NAMES_DELIMETER 为分隔符的权限列表 65 + * @param permissions 以 PERMISSION_DELIMETER 为分隔符的权限列表
66 * @return 用户是否具有以下任意一个权限 66 * @return 用户是否具有以下任意一个权限
67 */ 67 */
68 public boolean hasAnyPermi(String permissions) 68 public boolean hasAnyPermi(String permissions)