package com.mycompany.cartops;
public class MyCheckoutService extends DefaultCheckoutService {
public MyCheckoutService(CheckoutWorkflow checkoutWorkflow, CartProvider cartProvider,
TypeFactory typeFactory, CheckoutCompletionProducer checkoutCompletionProducer,
CartStatusValidationHelper cartStatusValidationHelper) {
super(checkoutWorkflow, cartProvider, typeFactory, checkoutCompletionProducer,
cartStatusValidationHelper);
}
@Override
protected String createOrderNumber(@NonNull Cart cart) {
return LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS"));
}
}