public class UUIDUtils {
/**
*
* 获得随机数
*/
public static String getUUID(){
String uuid = "wty";
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String date= simpleDateFormat.format(new Date());
date=date.replace("-","");
uuid+=date;
uuid+=(new Random().nextInt(89999999)+10000000);
return uuid;
}
/**
* 获取不带横杆的uuid
* @return
*/
public static String getRandomId() {
return UUID.randomUUID().toString().replace("-","");
}
}