Table of content



The CustomerDelivery entity within the microservice architecture

Entity-Relationship-Model of <ProductService>

Entity Name: CustomerDelivery

Data Schema: Shop

Master Service: ProductService


Dataflow of entity of CustomerDelivery

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
DeliveryLONGCustomerDeliveryDelivery
OrderItemLONGCustomerDeliveryOrderItem
PrimaryKeyLONGCustomerDelivery
ReferenceNumberSTRINGCustomerDelivery
ServerReplicationVersionLONGCustomerDelivery
ShopOwnerLONGCustomerDelivery

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/customerdelivery/delivery/{id}GETfindAllCustomerDeliveryOfDelivery(id)ProductServiceDelivery CustomerDelivery
/customerdelivery/{id}GETfindCustomerDeliveryById(id)ProductServiceCustomerDelivery
/customerdeliveryGETfindAllCustomerDelivery()ProductServiceCustomerDelivery
/customerdeliveryPOSTinsertCustomerDelivery(customerdelivery)ProductServiceCustomerDelivery
/customerdelivery/{id}DELETEdeleteCustomerDeliveryById(id)ProductServiceCustomerDelivery
/customerdelivery/orderitem/{id}GETfindAllCustomerDeliveryOfOrderItem(id)ProductServiceOrderItem CustomerDelivery
/customerdelivery/{id}PUTupdateCustomerDeliveryById(customerdelivery)ProductServiceCustomerDelivery

Distributed transaction of <CustomerDelivery>

Pseudo code snippet

final CustomerDelivery customerdelivery = (CustomerDelivery) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/customerdelivery/" + id, CustomerDelivery.class);
if (customerdelivery != null) {
    final Delivery delivery1 = (Delivery) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/delivery/" + customerdelivery.getDelivery().getId(), Delivery.class);
    if (delivery1 != null) {
        final ShopCustomer shopcustomer2 = (ShopCustomer) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/shopcustomer/" + delivery1.getShopCustomer().getId(), ShopCustomer.class);
        if (shopcustomer2 != null) {
            final Country country3 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + shopcustomer2.getCountry().getId(), Country.class);
            if (country3 != null) {
            }
        }
    }
    final OrderItem orderitem4 = (OrderItem) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/orderitem/" + customerdelivery.getOrderItem().getId(), OrderItem.class);
    if (orderitem4 != null) {
        final Product product5 = (Product) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/product/" + orderitem4.getProduct().getId(), Product.class);
        if (product5 != null) {
            final SalesTax salestax6 = (SalesTax) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/salestax/" + product5.getSalesTax().getId(), SalesTax.class);
            if (salestax6 != null) {
                final Country country7 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + salestax6.getCountry().getId(), Country.class);
                if (country7 != null) {
                }
            }
            final ProductCategory productcategory8 = (ProductCategory) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/productcategory/" + product5.getProductCategory().getId(), ProductCategory.class);
            if (productcategory8 != null) {
            }
            final Country countryoforigin9 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + product5.getCountryOfOrigin().getId(), Country.class);
            if (countryoforigin9 != null) {
            }
        }
        final CustomerOrder customerorder10 = (CustomerOrder) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/customerorder/" + orderitem4.getCustomerOrder().getId(), CustomerOrder.class);
        if (customerorder10 != null) {
            final ShopCustomer shopcustomer11 = (ShopCustomer) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/shopcustomer/" + customerorder10.getShopCustomer().getId(), ShopCustomer.class);
            if (shopcustomer11 != null) {
                final Country country12 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + shopcustomer11.getCountry().getId(), Country.class);
                if (country12 != null) {
                }
            }
        }
    }
}
return customerdelivery;


Table of content