Merge remote-tracking branch 'origin/2.0-master' into 2.0-master

# Conflicts:
#	hai-service/src/main/java/com/hai/order/utils/OrderUtil.java
dev-discount
袁野 2 years ago
commit 4f04c37200
  1. 7
      hai-service/src/main/java/com/hai/order/utils/OrderUtil.java

@ -51,16 +51,11 @@ public class OrderUtil {
* @return
* @throws Exception
*/
public static String generateOrderNo() {
try {
public static String generateOrderNo() throws Exception {
// 5位随机数 + 1位线程生成数
String randomNum = (new Random().nextInt(8999) + 1000) + IDGenerator.nextId(1);
// 生成订单号
return DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + randomNum;
} catch (Exception e) {
return null;
}
}
/**

Loading…
Cancel
Save