diff --git a/hai-service/src/main/java/com/hai/order/utils/OrderUtil.java b/hai-service/src/main/java/com/hai/order/utils/OrderUtil.java index 6e8a8611..c5bb47bb 100644 --- a/hai-service/src/main/java/com/hai/order/utils/OrderUtil.java +++ b/hai-service/src/main/java/com/hai/order/utils/OrderUtil.java @@ -53,12 +53,11 @@ public class OrderUtil { */ public static String generateOrderNo() throws Exception { // 5位随机数 + 1位线程生成数 - String randomNum = (new Random().nextInt(899999) + 10000) + IDGenerator.nextId(1); + String randomNum = (new Random().nextInt(8999) + 1000) + IDGenerator.nextId(1); // 生成订单号 return DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + randomNum; } - /** * 生成子订单号 * @return