Skip to content

Instantly share code, notes, and snippets.

@philmadden83
Created November 17, 2016 16:01
Show Gist options
  • Save philmadden83/c47a7de2db6b1e122d2be97fb25d17da to your computer and use it in GitHub Desktop.
Save philmadden83/c47a7de2db6b1e122d2be97fb25d17da to your computer and use it in GitHub Desktop.
@POST
@Authenticate
@Path("/{trackingId}")
public Response updateAirbillOrderToShipped(@PathParam("trackingId") String trackingId) {
List<Integer> orderIdList = shippingNotificationService.getOrderIdListByTrackingId(trackingId);
if (CollectionUtils.isEmptry(orderIdList)) {
return Response.status(Response.Status.NOT_FOUND).entity(new ErrorResponseEntity("No orders found with the provided tracking ID.")).build();
}
shippingNotificationService.setAirbillOrdersToShippedAndSendEmail(ordeorderIdListrId);
return Response.ok(new SuccessResponseEntity("Order status updated and shipping notification sent.")).build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment