Просмотр исходного кода

修复 发送短信内验证码5位问题

java110 лет назад: 5
Родитель
Сommit
b187bd8755

+ 1 - 1
java110-core/src/main/java/com/java110/core/factory/SendSmsFactory.java

@@ -47,7 +47,7 @@ public class SendSmsFactory {
         Random random = new Random();
         String result = "";
         for (int i = 0; i < limit; i++) {
-            result += random.nextInt(10);
+            result += (random.nextInt(9) + 1);
         }
         return result;
     }

+ 1 - 1
java110-core/src/main/java/com/java110/core/factory/TencentSendMessageFactory.java

@@ -68,7 +68,7 @@ public class TencentSendMessageFactory {
         Random random = new Random();
         String result = "";
         for (int i = 0; i < limit; i++) {
-            result += random.nextInt(10);
+            result += (random.nextInt(9) + 1);;
         }
         return result;
     }

+ 1 - 1
java110-utils/src/main/java/com/java110/utils/util/CommonUtil.java

@@ -59,7 +59,7 @@ public class CommonUtil extends LoggerEngine {
 
         String result = "";
         for (int i = 0; i < 6; i++) {
-            result += random.nextInt(10);
+            result += (random.nextInt(9) + 1);;
         }
 
         return result;

+ 1 - 1
service-api/src/main/java/com/java110/api/bmo/applicationKey/impl/ApplicationKeyBMOImpl.java

@@ -241,7 +241,7 @@ public class ApplicationKeyBMOImpl extends ApiBaseBMO implements IApplicationKey
         Random random = new Random();
         String result = "";
         for (int i = 0; i < 6; i++) {
-            result += random.nextInt(10);
+            result += (random.nextInt(9) + 1);;
         }
         return result;
     }

+ 1 - 1
service-api/src/main/java/com/java110/api/listener/applicationKey/ApplyApplicationKeyListener.java

@@ -134,7 +134,7 @@ public class ApplyApplicationKeyListener extends AbstractServiceApiPlusListener
         Random random = new Random();
         String result = "";
         for (int i = 0; i < 6; i++) {
-            result += random.nextInt(10);
+            result += (random.nextInt(9) + 1);;
         }
         return result;
     }

+ 1 - 1
service-api/src/main/java/com/java110/api/listener/applicationKey/ApplyVisitorApplicationKey.java

@@ -128,7 +128,7 @@ public class ApplyVisitorApplicationKey extends AbstractServiceApiPlusListener {
         Random random = new Random();
         String result = "";
         for (int i = 0; i < 6; i++) {
-            result += random.nextInt(10);
+            result += (random.nextInt(9) + 1);;
         }
         return result;
     }

+ 1 - 1
service-common/src/main/java/com/java110/common/thread/UpdateApplicationKeyPwd.java

@@ -119,7 +119,7 @@ public class UpdateApplicationKeyPwd implements Runnable {
         Random random = new Random();
         String result = "";
         for (int i = 0; i < 6; i++) {
-            result += random.nextInt(10);
+            result += (random.nextInt(9) + 1);;
         }
         return result;
     }