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

This commit is contained in:
Junling Bu
2019-06-05 13:58:09 +08:00
parent a0fc7d0630
commit d2da8ca335

View File

@@ -64,7 +64,7 @@ public class LitemallOrderService {
String now = df.format(LocalDate.now());
String orderSn = now + getRandomNum(6);
while (countByOrderSn(userId, orderSn) != 0) {
orderSn = getRandomNum(6);
orderSn = now + getRandomNum(6);
}
return orderSn;
}