1 /**
 2      * 获取数据库ID编号
 3      * @param head
 4      * @return
 5      */
 6     public static String getKeyId(String head) {
 7         Date date = new Date();
 8         SimpleDateFormat myFmt = new SimpleDateFormat("yyyyMMddHHmmssSSS");
 9         return head + myFmt.format(date) + getRandom();
10     }
工作中遇到获取数据库ID时不知道后面三个SSS什么意思,特地查阅资料总结了一下.最后一个值是-0800;

日期时间参数

 

 

相关文章:

  • 2021-11-23
  • 2021-08-27
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-08
  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
相关资源
相似解决方案