Selaa lähdekoodia

优化编码生成的长度

hurugang 3 vuotta sitten
vanhempi
commit
9adddccadc
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      src/main/java/cn/hnthyy/thmz/Utils/SignUtil.java

+ 3 - 0
src/main/java/cn/hnthyy/thmz/Utils/SignUtil.java

@@ -64,6 +64,9 @@ public class SignUtil {
                 newCode=""+codeI;
             }
         }
+        while (newCode.length()<6){
+            newCode="0"+newCode;
+        }
         return newCode;
     }
 }