Commit d2da8ca3 authored by Junling Bu's avatar Junling Bu
Browse files

fix[litemall-db]: 订单号再次生成,需要添加日期

parent a0fc7d06
...@@ -64,7 +64,7 @@ public class LitemallOrderService { ...@@ -64,7 +64,7 @@ public class LitemallOrderService {
String now = df.format(LocalDate.now()); String now = df.format(LocalDate.now());
String orderSn = now + getRandomNum(6); String orderSn = now + getRandomNum(6);
while (countByOrderSn(userId, orderSn) != 0) { while (countByOrderSn(userId, orderSn) != 0) {
orderSn = getRandomNum(6); orderSn = now + getRandomNum(6);
} }
return orderSn; return orderSn;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment