Table of content



The CustomerOrder entity within the microservice architecture

Entity-Relationship-Model of <CountryService>

Entity Name: CustomerOrder

Data Schema: Shop

Master Service: CountryService


Dataflow of entity of CustomerOrder

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
OrderDateLONGCustomerOrder
PrimaryKeyLONGCustomerOrder
RemarksSTRINGCustomerOrder
ServerReplicationVersionLONGCustomerOrder
ShopCustomerLONGCustomerOrderShopCustomer
ShopOwnerLONGCustomerOrder

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/customerorder/{id}GETfindCustomerOrderById(id)CountryServiceCustomerOrder
/customerorder/shopcustomer/{id}GETfindAllCustomerOrderOfShopCustomer(id)CountryServiceShopCustomer CustomerOrder
/customerorder/{id}PUTupdateCustomerOrderById(customerorder)CountryServiceCustomerOrder
/customerorderPOSTinsertCustomerOrder(customerorder)CountryServiceCustomerOrder
/orderitem/customerorder/{id}GETfindAllOrderItemOfCustomerOrder(id)ProductServiceCustomerOrder OrderItem
/customerorderGETfindAllCustomerOrder()CountryServiceCustomerOrder
/customerorder/{id}DELETEdeleteCustomerOrderById(id)CountryServiceCustomerOrder

Distributed transaction of <CustomerOrder>

Pseudo code snippet

final CustomerOrder customerorder = (CustomerOrder) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/customerorder/" + id, CustomerOrder.class);
if (customerorder != null) {
    final ShopCustomer shopcustomer1 = (ShopCustomer) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/shopcustomer/" + customerorder.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 customerorder;


Table of content