Table of content



The Delivery entity within the microservice architecture

Entity-Relationship-Model of <CountryService>

Entity Name: Delivery

Data Schema: Shop

Master Service: CountryService


Dataflow of entity of Delivery

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
ConditionsSTRINGDelivery
DeliveryDateLONGDelivery
PrimaryKeyLONGDelivery
ServerReplicationVersionLONGDelivery
ShopCustomerLONGDeliveryShopCustomer
ShopOwnerLONGDelivery

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/customerdelivery/delivery/{id}GETfindAllCustomerDeliveryOfDelivery(id)ProductServiceDelivery CustomerDelivery
/delivery/{id}PUTupdateDeliveryById(delivery)CountryServiceDelivery
/delivery/{id}DELETEdeleteDeliveryById(id)CountryServiceDelivery
/delivery/shopcustomer/{id}GETfindAllDeliveryOfShopCustomer(id)CountryServiceShopCustomer Delivery
/delivery/{id}GETfindDeliveryById(id)CountryServiceDelivery
/deliveryGETfindAllDelivery()CountryServiceDelivery
/deliveryPOSTinsertDelivery(delivery)CountryServiceDelivery

Distributed transaction of <Delivery>

Pseudo code snippet

final Delivery delivery = (Delivery) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/delivery/" + id, Delivery.class);
if (delivery != null) {
    final ShopCustomer shopcustomer1 = (ShopCustomer) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/shopcustomer/" + delivery.getShopCustomer().getId(), ShopCustomer.class);
    if (shopcustomer1 != null) {
        final Country country2 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + shopcustomer1.getCountry().getId(), Country.class);
        if (country2 != null) {
        }
    }
}
return delivery;


Table of content