Parcourir la source

优化编码生成的长度

hurugang il y a 3 ans
Parent
commit
9adddccadc
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  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;
     }
 }