class OrderOtherServiceImpl implements OrderOtherService {

    @Override
    public Response saveChanges(Order order, HttpHeaders headers) {
        Order oldOrder = orderOtherRepository.findById(order.getId());
        if (oldOrder == null) {
            OrderOtherServiceImpl.LOGGER.info("[Order Other Service][Modify Order] Fail.Order not found.");
            return new Response<>(0, orderNotFound, null);
        } else {
            oldOrder.setAccountId(order.getAccountId());
            oldOrder.setBoughtDate(order.getBoughtDate());
            oldOrder.setTravelDate(order.getTravelDate());
            oldOrder.setTravelTime(order.getTravelTime());
            oldOrder.setSeatClass(order.getSeatClass());
            oldOrder.setCoachNumber(order.getCoachNumber());

            oldOrder.setSeatNumber(order.getSeatNumber());
            oldOrder.setTo(order.getTo());
            oldOrder.setFrom(order.getFrom());
            oldOrder.setStatus(order.getStatus());
            oldOrder.setTrainNumber(order.getTrainNumber());
            oldOrder.setPrice(order.getPrice());
            oldOrder.setContactsName(order.getContactsName());
            oldOrder.setDocumentType(order.getDocumentType());
            oldOrder.setContactsDocumentNumber(order.getContactsDocumentNumber());

            orderOtherRepository.save(oldOrder);
            OrderOtherServiceImpl.LOGGER.info("[Order Other Service] Success.");
            return new Response<>(1, success, oldOrder);
        }
    }

}