Browse Source

验证码工具栏修改

gao.qiang 2 years ago
parent
commit
2b0be06259

+ 3 - 3
base-common/src/main/java/com/ozs/common/utils/AppendUtils.java

@@ -19,7 +19,7 @@ public class AppendUtils {
             String d = divide.toString();
             String[] split = d.split("\\.");
             StringBuilder stringBuilder = new StringBuilder();
-            stringBuilder.append("K" + split[0]);
+            stringBuilder.append(split[0]+"KM");
             if (split.length>1) {
                 stringBuilder.append("+");
                 for (char c : split[1].toCharArray()) {
@@ -46,7 +46,7 @@ public class AppendUtils {
                 }
             }
             int number = Integer.parseInt(split[1]);
-            int integer = Integer.parseInt(split[0].substring(substring));
+            int integer = Integer.parseInt(split[0].substring(0,substring));
             integer=integer*1000;
             return integer + number;
         }else {
@@ -55,7 +55,7 @@ public class AppendUtils {
                     substring++;
                 }
             }
-            int integer = Integer.parseInt(miles.substring(substring));
+            int integer = Integer.parseInt(miles.substring(0,substring));
             integer=integer*1000;
             return integer;
         }

+ 1 - 1
base-framework/src/main/java/com/ozs/framework/config/CaptchaConfig.java

@@ -63,7 +63,7 @@ public class CaptchaConfig
         // KAPTCHA_SESSION_KEY
         properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCodeMath");
         // 验证码文本生成器
-        properties.setProperty(KAPTCHA_TEXTPRODUCER_IMPL, "com.hx.framework.config.KaptchaTextCreator");
+        properties.setProperty(KAPTCHA_TEXTPRODUCER_IMPL, "com.ozs.framework.config.KaptchaTextCreator");
         // 验证码文本字符间距 默认为2
         properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_SPACE, "3");
         // 验证码文本字符长度 默认为5