use of com.stardata.starshop2.ordercontext.command.domain.order.Order in project starshop by beautautumn.
the class OrderAppService method delete.
public OrderDeletedResponse delete(Long orderIdLong) {
LongIdentity orderId = LongIdentity.from(orderIdLong);
Order order = managingService.setInvisible(orderId);
return OrderDeletedResponse.from(order);
}
use of com.stardata.starshop2.ordercontext.command.domain.order.Order in project starshop by beautautumn.
the class OrderAppService method confirmReceived.
public OrderConfirmedResponse confirmReceived(Long orderIdLong) {
LongIdentity orderId = LongIdentity.from(orderIdLong);
Order order = managingService.closeOrder(orderId);
OrderClosedEvent orderEvent = new OrderClosedEvent(order);
orderEventPublisher.publish(orderEvent);
return OrderConfirmedResponse.from(order);
}
use of com.stardata.starshop2.ordercontext.command.domain.order.Order in project starshop by beautautumn.
the class OrderAppService method getDetail.
public OrderResponse getDetail(Long orderIdLong) {
LongIdentity orderId = LongIdentity.from(orderIdLong);
Order order = managingService.detail(orderId);
return OrderResponse.from(order);
}
use of com.stardata.starshop2.ordercontext.command.domain.order.Order in project starshop by beautautumn.
the class OrderManagingService method closeOrder.
public Order closeOrder(LongIdentity orderId) {
Order order = orderRepository.instanceOf(orderId);
order.close();
orderRepository.update(order);
return order;
}
use of com.stardata.starshop2.ordercontext.command.domain.order.Order in project starshop by beautautumn.
the class OrderManagingService method setInvisible.
public Order setInvisible(LongIdentity orderId) {
Order order = orderRepository.instanceOf(orderId);
order.setInvisible();
orderRepository.update(order);
return order;
}
Aggregations