RuoYi лет назад: 3
Родитель
Сommit
f12baad00c

+ 2 - 2
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/Convert.java

@@ -902,7 +902,7 @@ public class Convert
902
      */
902
      */
903
     public static String toSBC(String input, Set<Character> notConvertSet)
903
     public static String toSBC(String input, Set<Character> notConvertSet)
904
     {
904
     {
905
-        char c[] = input.toCharArray();
905
+        char[] c = input.toCharArray();
906
         for (int i = 0; i < c.length; i++)
906
         for (int i = 0; i < c.length; i++)
907
         {
907
         {
908
             if (null != notConvertSet && notConvertSet.contains(c[i]))
908
             if (null != notConvertSet && notConvertSet.contains(c[i]))
@@ -944,7 +944,7 @@ public class Convert
944
      */
944
      */
945
     public static String toDBC(String text, Set<Character> notConvertSet)
945
     public static String toDBC(String text, Set<Character> notConvertSet)
946
     {
946
     {
947
-        char c[] = text.toCharArray();
947
+        char[] c = text.toCharArray();
948
         for (int i = 0; i < c.length; i++)
948
         for (int i = 0; i < c.length; i++)
949
         {
949
         {
950
             if (null != notConvertSet && notConvertSet.contains(c[i]))
950
             if (null != notConvertSet && notConvertSet.contains(c[i]))

+ 2 - 2
ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/KaptchaTextCreator.java

@@ -20,7 +20,7 @@ public class KaptchaTextCreator extends DefaultTextCreator
20
         int x = random.nextInt(10);
20
         int x = random.nextInt(10);
21
         int y = random.nextInt(10);
21
         int y = random.nextInt(10);
22
         StringBuilder suChinese = new StringBuilder();
22
         StringBuilder suChinese = new StringBuilder();
23
-        int randomoperands = (int) Math.round(Math.random() * 2);
23
+        int randomoperands = random.nextInt(3);
24
         if (randomoperands == 0)
24
         if (randomoperands == 0)
25
         {
25
         {
26
             result = x * y;
26
             result = x * y;
@@ -30,7 +30,7 @@ public class KaptchaTextCreator extends DefaultTextCreator
30
         }
30
         }
31
         else if (randomoperands == 1)
31
         else if (randomoperands == 1)
32
         {
32
         {
33
-            if (!(x == 0) && y % x == 0)
33
+            if ((x != 0) && y % x == 0)
34
             {
34
             {
35
                 result = y / x;
35
                 result = y / x;
36
                 suChinese.append(CNUMBERS[y]);
36
                 suChinese.append(CNUMBERS[y]);

+ 1 - 1
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
47
 		order by d.parent_id, d.order_num
47
 		order by d.parent_id, d.order_num
48
     </select>
48
     </select>
49
     
49
     
50
-    <select id="selectDeptListByRoleId" resultType="Integer">
50
+    <select id="selectDeptListByRoleId" resultType="Long">
51
 		select d.dept_id
51
 		select d.dept_id
52
 		from sys_dept d
52
 		from sys_dept d
53
             left join sys_role_dept rd on d.dept_id = rd.dept_id
53
             left join sys_role_dept rd on d.dept_id = rd.dept_id