Table of content



The Warehouse entity within the microservice architecture

Entity-Relationship-Model of <CountryService>

Entity Name: Warehouse

Data Schema: Shop

Master Service: CountryService


Dataflow of entity of Warehouse

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
CitySTRINGWarehouse
CountryLONGWarehouseCountry
PrimaryKeyLONGWarehouse
ServerReplicationVersionLONGWarehouse
ShopOwnerLONGWarehouse
StreetSTRINGWarehouse
WarehouseNameSTRINGWarehouse

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/warehouse/country/{id}GETfindAllWarehouseOfCountry(id)CountryServiceCountry Warehouse
/warehouse/{id}GETfindWarehouseById(id)CountryServiceWarehouse
/warehouse/{id}PUTupdateWarehouseById(warehouse)CountryServiceWarehouse
/warehousePOSTinsertWarehouse(warehouse)CountryServiceWarehouse
/warehouse/{id}DELETEdeleteWarehouseById(id)CountryServiceWarehouse
/purchaserule/warehouse/{id}GETfindAllPurchaseRuleOfWarehouse(id)ProductServiceWarehouse PurchaseRule
/productdelivery/warehouse/{id}GETfindAllProductDeliveryOfWarehouse(id)ProductServiceWarehouse ProductDelivery
/warehouseresponsibility/warehouse/{id}GETfindAllWarehouseResponsibilityOfWarehouse(id)CountryServiceWarehouse WarehouseResponsibility
/warehouseGETfindAllWarehouse()CountryServiceWarehouse

Distributed transaction of <Warehouse>

Pseudo code snippet

final Warehouse warehouse = (Warehouse) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/warehouse/" + id, Warehouse.class);
if (warehouse != null) {
    final Country country1 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + warehouse.getCountry().getId(), Country.class);
    if (country1 != null) {
    }
}
return warehouse;


Table of content