<span style="font-size:18px;"> /**
* 产生流水号
* @return
*/
public String getPayID(){
StringBuffer sb=new StringBuffer();
GregorianCalendar d = new GregorianCalendar();
sb.append(d.get(Calendar.YEAR));
sb.append((d.get(Calendar.MONTH)+1)<10?"0"+(d.get(Calendar.MONTH)+1):(d.get(Calendar.MONTH)+1));
sb.append(d.get(Calendar.DATE));
sb.append(d.get(Calendar.HOUR));
sb.append(d.get(Calendar.MINUTE));
sb.append(d.get(Calendar.SECOND));
Double rand=Math.random()*10000;
sb.append(rand.toString().substring(0, 3));
return sb.toString();
}</span>
17位序列号
最新推荐文章于 2024-05-18 09:18:16 发布