当前位置:网站首页>生成一个包含日期的随机编码
生成一个包含日期的随机编码
2022-08-04 05:33:00 【Jorge666】
private static String genCode() {
String prefix = new SimpleDateFormat("MMdd").format(new Date());
String suffix = UUID.randomUUID().toString().replace("-", "").substring(8, 16).toUpperCase();
return "ZP_" + prefix + suffix;
}
边栏推荐
猜你喜欢
随机推荐
const int * a 与 int * const a 的定义与区别
Usage of SFTP
JUC并发容器——ConcurrentLinkedQueue
注册表设置默认浏览器 win7,winserver 2008,winserver 2012
Pfsense漏洞复现(CVE-2021-41282)
动态内存管理-C语言
C语言无符号整型运算
JUC并发容器——阻塞队列
【c语言】整数的二进制表现形式是什么?
Rules.make - suitable for viewing in edit mode
Uos统信系统 本地APT源配置
Design and implementation of legal aid platform based on asp.net (with project link)
C#找系统文件夹路径
[English learning][sentence] good sentence
Janus转发丢包导致音视频不同步原因分析
Vmmem 进程(WSL2)消耗内存巨大
你要悄悄学网络安全,然后惊艳所有人
最全的最详细的指针讲解(C语言)
LeetCode_Nov_2nd_Week
Completely remove MySQL tutorial