Table of content



The DiscountCampaignProduct entity within the microservice architecture

Entity-Relationship-Model of <DiscountCampaignService>

Entity Name: DiscountCampaignProduct

Data Schema: Shop

Master Service: DiscountCampaignService


Dataflow of entity of DiscountCampaignProduct

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
DiscountCampaignLONGDiscountCampaignProductDiscountCampaign
PrimaryKeyLONGDiscountCampaignProduct
ProductLONGDiscountCampaignProductProduct
ServerReplicationVersionLONGDiscountCampaignProduct
ShopOwnerLONGDiscountCampaignProduct

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/discountcampaignproduct/product/{id}GETfindAllDiscountCampaignProductOfProduct(id)DiscountCampaignServiceProduct DiscountCampaignProduct
/discountcampaignproductPOSTinsertDiscountCampaignProduct(discountcampaignproduct)DiscountCampaignServiceDiscountCampaignProduct
/discountcampaignproduct/{id}PUTupdateDiscountCampaignProductById(discountcampaignproduct)DiscountCampaignServiceDiscountCampaignProduct
/discountcampaignproduct/{id}GETfindDiscountCampaignProductById(id)DiscountCampaignServiceDiscountCampaignProduct
/discountcampaignproduct/discountcampaign/{id}GETfindAllDiscountCampaignProductOfDiscountCampaign(id)DiscountCampaignServiceDiscountCampaign DiscountCampaignProduct
/discountcampaignproduct/{id}DELETEdeleteDiscountCampaignProductById(id)DiscountCampaignServiceDiscountCampaignProduct
/discountcampaignproductGETfindAllDiscountCampaignProduct()DiscountCampaignServiceDiscountCampaignProduct

Distributed transaction of <DiscountCampaignProduct>

Pseudo code snippet

final DiscountCampaignProduct discountcampaignproduct = (DiscountCampaignProduct) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discountcampaignproduct/" + id, DiscountCampaignProduct.class);
if (discountcampaignproduct != null) {
    final DiscountCampaign discountcampaign1 = (DiscountCampaign) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discountcampaign/" + discountcampaignproduct.getDiscountCampaign().getId(), DiscountCampaign.class);
    if (discountcampaign1 != null) {
        final DiscountType discounttype2 = (DiscountType) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discounttype/" + discountcampaign1.getDiscountType().getId(), DiscountType.class);
        if (discounttype2 != null) {
        }
    }
    final Product product3 = (Product) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/product/" + discountcampaignproduct.getProduct().getId(), Product.class);
    if (product3 != null) {
        final SalesTax salestax4 = (SalesTax) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/salestax/" + product3.getSalesTax().getId(), SalesTax.class);
        if (salestax4 != null) {
            final Country country5 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + salestax4.getCountry().getId(), Country.class);
            if (country5 != null) {
            }
        }
        final ProductCategory productcategory6 = (ProductCategory) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/productcategory/" + product3.getProductCategory().getId(), ProductCategory.class);
        if (productcategory6 != null) {
        }
        final Country countryoforigin7 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + product3.getCountryOfOrigin().getId(), Country.class);
        if (countryoforigin7 != null) {
        }
    }
}
return discountcampaignproduct;


Table of content