/**
* 生成支付订单号
*
* @athour CNZZ
* @time 2019-04-17
* @param n
* @return
*/
public static String createRandomNumByDate(Date date, Integer n) {
// 时间戳+n位随机数字
int randomNum = (int) ((Math.random() * 9 + 1) * Math.pow(10, n-1));
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
String dateString = sdf.format(date);
return dateString + randomNum;
}