com.yunzhanghu.example.utils.BaseUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
云账户综合服务平台官方 SDK for Java,支持 Java JDK 1.8 及以上版本
Copyright © 2013 - 2024 云账户技术(天津)有限公司
云账户开放平台:https://open.yunzhanghu.com
package com.yunzhanghu.example.utils;
import java.util.concurrent.ThreadLocalRandom;
public class BaseUtil {
public static String getMess() {
return ThreadLocalRandom.current().nextInt(10000000) + "";
}
/**
* 获取随机字符串
*
* @param prefix 字符串前缀
* @return 随机字符串
*/
public static String getRandomStr(String prefix) {
return prefix + System.currentTimeMillis() + ThreadLocalRandom.current().nextInt(1000);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy