Commit 6a5c493a by 丁伟峰

自生成的订单编号统一为9位(uuid的后9位),由于真正的订单都是bean那边传入,pea这边的订单仅用于流程验证,碰撞概率很小

1 parent beee1b00
......@@ -89,7 +89,8 @@ public class OrderCreateServiceImpl implements OrderCreateService {
entity.setId(IdUtil.getSnowflake().nextIdStr());
String orderId = req.getOrderId();
if (StringUtils.isEmpty(orderId)) {
orderId = UUID.randomUUID().toString().replace("-", "");
String s = UUID.randomUUID().toString().replace("-", "");
orderId = s.substring(s.length()-9);
}
entity.setOrderId(orderId);
entity.setName(req.getName());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!