RuoYi hace 3 años
padre
commit
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 903
     public static String toSBC(String input, Set<Character> notConvertSet)
904 904
     {
905
-        char c[] = input.toCharArray();
905
+        char[] c = input.toCharArray();
906 906
         for (int i = 0; i < c.length; i++)
907 907
         {
908 908
             if (null != notConvertSet && notConvertSet.contains(c[i]))
@@ -944,7 +944,7 @@ public class Convert
944 944
      */
945 945
     public static String toDBC(String text, Set<Character> notConvertSet)
946 946
     {
947
-        char c[] = text.toCharArray();
947
+        char[] c = text.toCharArray();
948 948
         for (int i = 0; i < c.length; i++)
949 949
         {
950 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 20
         int x = random.nextInt(10);
21 21
         int y = random.nextInt(10);
22 22
         StringBuilder suChinese = new StringBuilder();
23
-        int randomoperands = (int) Math.round(Math.random() * 2);
23
+        int randomoperands = random.nextInt(3);
24 24
         if (randomoperands == 0)
25 25
         {
26 26
             result = x * y;
@@ -30,7 +30,7 @@ public class KaptchaTextCreator extends DefaultTextCreator
30 30
         }
31 31
         else if (randomoperands == 1)
32 32
         {
33
-            if (!(x == 0) && y % x == 0)
33
+            if ((x != 0) && y % x == 0)
34 34
             {
35 35
                 result = y / x;
36 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 47
 		order by d.parent_id, d.order_num
48 48
     </select>
49 49
     
50
-    <select id="selectDeptListByRoleId" resultType="Integer">
50
+    <select id="selectDeptListByRoleId" resultType="Long">
51 51
 		select d.dept_id
52 52
 		from sys_dept d
53 53
             left join sys_role_dept rd on d.dept_id = rd.dept_id