|
|
@@ -6,23 +6,16 @@ import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
|
|
|
public class RandomStr {
|
|
|
+ private static final List<String> list1 = List.of("07e3138d92454920b975c5a07d8c0e17", "835c9959339f495d921d6555c03aa6dc","057ef6fddb394f7080350bd9237575ba");
|
|
|
+ private static final List<String> list2 = List.of("weixin.qq.com", "baidu.com", "sina.com", "qq.com", "apple.com.cn", "apple.com", "huawei.com", "mi.com", "jd.com");
|
|
|
+ private static final String RandomString="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
|
public static String getRandomStr(String code){
|
|
|
- List<String> list1 = List.of("07e3138d92454920b975c5a07d8c0e17", "835c9959339f495d921d6555c03aa6dc","411fbbd72e5d4de08beafa8e68fa7bc1","a87622f45ff2448191809090b6122786");
|
|
|
if(Objects.isNull(code)||!list1.contains(code)){
|
|
|
- List<String> list = List.of("qq", "baidu", "weixin");
|
|
|
- String s = list.get(RandomUtil.randomInt(0, list.size()));
|
|
|
- String string = RandomUtil.randomString("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", 7);
|
|
|
- return s+"-"+string;
|
|
|
+ return RandomUtil.randomString(RandomString, 7);
|
|
|
}else {
|
|
|
- List<String> list2 = List.of("weixin.qq.com", "baidu.com", "sina.com", "qq.com", "apple.com.cn", "apple.com", "huawei.com", "mi.com", "jd.com");
|
|
|
String s = list2.get(RandomUtil.randomInt(0, list2.size()));
|
|
|
- return s;
|
|
|
+ String string = RandomUtil.randomString(RandomString, 6);
|
|
|
+ return s+"."+string;
|
|
|
}
|
|
|
-
|
|
|
- // return s+"-"+string;
|
|
|
- // return RandomStr.getRandomStr(); String string = RandomUtil.randomString("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", 7);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|