注册获取手机号验证码(6位)
This commit is contained in:
parent
acdd7da542
commit
8ebc320e25
@ -98,12 +98,25 @@ public class XhpcSmsServiceImpl implements IXhpcSmsService{
|
||||
|
||||
private Long getRandom(){
|
||||
Random rnd = new Random();
|
||||
Long number = Long.valueOf(rnd.nextInt(999999));
|
||||
return number;
|
||||
int i = rnd.nextInt(999999);
|
||||
if(i<100000){
|
||||
i=i+100000;
|
||||
}
|
||||
return Long.valueOf(i);
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
for (int i = 0; i < 50; i++) {
|
||||
Random rnd = new Random();
|
||||
int j = rnd.nextInt(999999);
|
||||
System.out.println("number>> " +j);
|
||||
if(j<100000){
|
||||
j=j+100000;
|
||||
}
|
||||
System.out.println("number " +Long.valueOf(j));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user