From 74b00e90b7f27ffffb1dbd15b92cd57e99b2ba6b Mon Sep 17 00:00:00 2001 From: saint15 <1179307527@qq.com> Date: Sun, 4 Sep 2022 14:23:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E4=BD=BF=E7=94=A8Random=E5=AF=BC=E8=87=B4if=20else=E8=AF=AD?= =?UTF-8?q?=E5=8F=A5=E5=87=BA=E7=8E=B0=E7=9A=84=E6=97=A0=E6=95=88=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/gateway/config/KaptchaTextCreator.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/KaptchaTextCreator.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/KaptchaTextCreator.java index ea65aef7..179c2c86 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/KaptchaTextCreator.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/KaptchaTextCreator.java @@ -45,7 +45,7 @@ public class KaptchaTextCreator extends DefaultTextCreator suChinese.append(CNUMBERS[y]); } } - else if (randomoperands == 2) + else { if (x >= y) { @@ -62,13 +62,6 @@ public class KaptchaTextCreator extends DefaultTextCreator suChinese.append(CNUMBERS[x]); } } - else - { - result = x + y; - suChinese.append(CNUMBERS[x]); - suChinese.append("+"); - suChinese.append(CNUMBERS[y]); - } suChinese.append("=?@" + result); return suChinese.toString(); }