Table of content



3.2. DiscountCampaignService


Entity-Relationship-Model of DiscountCampaignService

Schema Entities

Entity NameAlias NameMicroserviceData Schema
CustomerGroupCustomerGroupCountryServiceShop
DiscountCampaignDiscountCampaignDiscountCampaignServiceShop
DiscountCampaignCustomerDiscountCampaignCustomerCountryServiceShop
DiscountCampaignCustomerGroupDiscountCampaignCustomerGroupDiscountCampaignServiceShop
DiscountCampaignProductDiscountCampaignProductDiscountCampaignServiceShop
DiscountCampaignProductCategoryDiscountCampaignProductCategoryDiscountCampaignServiceShop
DiscountTypeDiscountTypeDiscountCampaignServiceShop
ProductProductProductServiceShop
ProductCategoryProductCategoryProductServiceShop

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/discountcampaignGETfindAllDiscountCampaign()DiscountCampaignServiceDiscountCampaign
/discounttype/{id}PUTupdateDiscountTypeById(discounttype)DiscountCampaignServiceDiscountType
/discountcampaigncustomergroup/{id}PUTupdateDiscountCampaignCustomerGroupById(discountcampaigncustomergroup)DiscountCampaignServiceDiscountCampaignCustomerGroup
/discountcampaigncustomergroup/customergroup/{id}GETfindAllDiscountCampaignCustomerGroupOfCustomerGroup(id)DiscountCampaignServiceCustomerGroup DiscountCampaignCustomerGroup
/discounttype/{id}DELETEdeleteDiscountTypeById(id)DiscountCampaignServiceDiscountType
/discounttype/{id}GETfindDiscountTypeById(id)DiscountCampaignServiceDiscountType
/discounttypePOSTinsertDiscountType(discounttype)DiscountCampaignServiceDiscountType
/discountcampaign/{id}DELETEdeleteDiscountCampaignById(id)DiscountCampaignServiceDiscountCampaign
/discountcampaignproductcategoryGETfindAllDiscountCampaignProductCategory()DiscountCampaignServiceDiscountCampaignProductCategory
/discounttypeGETfindAllDiscountType()DiscountCampaignServiceDiscountType
/discountcampaigncustomergroupPOSTinsertDiscountCampaignCustomerGroup(discountcampaigncustomergroup)DiscountCampaignServiceDiscountCampaignCustomerGroup
/discountcampaignproduct/{id}GETfindDiscountCampaignProductById(id)DiscountCampaignServiceDiscountCampaignProduct
/discountcampaignproductcategoryPOSTinsertDiscountCampaignProductCategory(discountcampaignproductcategory)DiscountCampaignServiceDiscountCampaignProductCategory
/discountcampaigncustomergroupGETfindAllDiscountCampaignCustomerGroup()DiscountCampaignServiceDiscountCampaignCustomerGroup
/discountcampaignPOSTinsertDiscountCampaign(discountcampaign)DiscountCampaignServiceDiscountCampaign
/discountcampaignproductcategory/{id}GETfindDiscountCampaignProductCategoryById(id)DiscountCampaignServiceDiscountCampaignProductCategory
/discountcampaigncustomergroup/{id}DELETEdeleteDiscountCampaignCustomerGroupById(id)DiscountCampaignServiceDiscountCampaignCustomerGroup
/discountcampaignproduct/product/{id}GETfindAllDiscountCampaignProductOfProduct(id)DiscountCampaignServiceProduct DiscountCampaignProduct
/discountcampaignproduct/discountcampaign/{id}GETfindAllDiscountCampaignProductOfDiscountCampaign(id)DiscountCampaignServiceDiscountCampaign DiscountCampaignProduct
/discountcampaign/{id}PUTupdateDiscountCampaignById(discountcampaign)DiscountCampaignServiceDiscountCampaign
/discountcampaign/discounttype/{id}GETfindAllDiscountCampaignOfDiscountType(id)DiscountCampaignServiceDiscountType DiscountCampaign
/discountcampaignproduct/{id}PUTupdateDiscountCampaignProductById(discountcampaignproduct)DiscountCampaignServiceDiscountCampaignProduct
/discountcampaigncustomergroup/{id}GETfindDiscountCampaignCustomerGroupById(id)DiscountCampaignServiceDiscountCampaignCustomerGroup
/discountcampaignproductcategory/{id}DELETEdeleteDiscountCampaignProductCategoryById(id)DiscountCampaignServiceDiscountCampaignProductCategory
/discountcampaign/{id}GETfindDiscountCampaignById(id)DiscountCampaignServiceDiscountCampaign
/discountcampaignproductcategory/{id}PUTupdateDiscountCampaignProductCategoryById(discountcampaignproductcategory)DiscountCampaignServiceDiscountCampaignProductCategory
/discountcampaignproductGETfindAllDiscountCampaignProduct()DiscountCampaignServiceDiscountCampaignProduct
/discountcampaigncustomergroup/discountcampaign/{id}GETfindAllDiscountCampaignCustomerGroupOfDiscountCampaign(id)DiscountCampaignServiceDiscountCampaign DiscountCampaignCustomerGroup
/discountcampaignproductcategory/productcategory/{id}GETfindAllDiscountCampaignProductCategoryOfProductCategory(id)DiscountCampaignServiceProductCategory DiscountCampaignProductCategory
/discountcampaignproductPOSTinsertDiscountCampaignProduct(discountcampaignproduct)DiscountCampaignServiceDiscountCampaignProduct
/discountcampaignproduct/{id}DELETEdeleteDiscountCampaignProductById(id)DiscountCampaignServiceDiscountCampaignProduct
/discountcampaignproductcategory/discountcampaign/{id}GETfindAllDiscountCampaignProductCategoryOfDiscountCampaign(id)DiscountCampaignServiceDiscountCampaign DiscountCampaignProductCategory

DiscountCampaignService inside the microservice architecture

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService





3.2.1 DiscountCampaign


Entity Name: DiscountCampaign

Data Schema: Shop

Master Service: DiscountCampaignService


Call graph of entity of DiscountCampaign

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
DiscountCodeSTRINGDiscountCampaign
DiscountTypeLONGDiscountCampaignDiscountType
FromDateLONGDiscountCampaign
MaxUsedDiscountsINTDiscountCampaign
MinimumPurchaseAmountDOUBLEDiscountCampaign
MinimumQuantityINTDiscountCampaign
PrimaryKeyLONGDiscountCampaign
ServerReplicationVersionLONGDiscountCampaign
ShopOwnerLONGDiscountCampaign
ToDateLONGDiscountCampaign
WholeOrderBOOLDiscountCampaign

Pseudo code snippet

final DiscountCampaign discountcampaign = (DiscountCampaign) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discountcampaign/" + id, DiscountCampaign.class);
if (discountcampaign != null) {
    final DiscountType discounttype1 = (DiscountType) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discounttype/" + discountcampaign.getDiscountType().getId(), DiscountType.class);
    if (discounttype1 != null) {
    }
}
return discountcampaign;


3.2.2 DiscountCampaignCustomerGroup


Entity Name: DiscountCampaignCustomerGroup

Data Schema: Shop

Master Service: DiscountCampaignService


Call graph of entity of DiscountCampaignCustomerGroup

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
CustomerGroupLONGDiscountCampaignCustomerGroupCustomerGroup
DiscountCampaignLONGDiscountCampaignCustomerGroupDiscountCampaign
PrimaryKeyLONGDiscountCampaignCustomerGroup
ServerReplicationVersionLONGDiscountCampaignCustomerGroup
ShopOwnerLONGDiscountCampaignCustomerGroup

Pseudo code snippet

final DiscountCampaignCustomerGroup discountcampaigncustomergroup = (DiscountCampaignCustomerGroup) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discountcampaigncustomergroup/" + id, DiscountCampaignCustomerGroup.class);
if (discountcampaigncustomergroup != null) {
    final CustomerGroup customergroup1 = (CustomerGroup) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/customergroup/" + discountcampaigncustomergroup.getCustomerGroup().getId(), CustomerGroup.class);
    if (customergroup1 != null) {
    }
    final DiscountCampaign discountcampaign2 = (DiscountCampaign) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discountcampaign/" + discountcampaigncustomergroup.getDiscountCampaign().getId(), DiscountCampaign.class);
    if (discountcampaign2 != null) {
        final DiscountType discounttype3 = (DiscountType) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discounttype/" + discountcampaign2.getDiscountType().getId(), DiscountType.class);
        if (discounttype3 != null) {
        }
    }
}
return discountcampaigncustomergroup;


3.2.3 DiscountCampaignProduct


Entity Name: DiscountCampaignProduct

Data Schema: Shop

Master Service: DiscountCampaignService


Call graph 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

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;


3.2.4 DiscountCampaignProductCategory


Entity Name: DiscountCampaignProductCategory

Data Schema: Shop

Master Service: DiscountCampaignService


Call graph of entity of DiscountCampaignProductCategory

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
DiscountCampaignLONGDiscountCampaignProductCategoryDiscountCampaign
PrimaryKeyLONGDiscountCampaignProductCategory
ProductCategoryLONGDiscountCampaignProductCategoryProductCategory
ServerReplicationVersionLONGDiscountCampaignProductCategory
ShopOwnerLONGDiscountCampaignProductCategory

Pseudo code snippet

final DiscountCampaignProductCategory discountcampaignproductcategory = (DiscountCampaignProductCategory) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discountcampaignproductcategory/" + id, DiscountCampaignProductCategory.class);
if (discountcampaignproductcategory != null) {
    final ProductCategory productcategory1 = (ProductCategory) this.callMicroservice(ServiceNames.PRODUCT_SERVICE + "/productcategory/" + discountcampaignproductcategory.getProductCategory().getId(), ProductCategory.class);
    if (productcategory1 != null) {
    }
    final DiscountCampaign discountcampaign2 = (DiscountCampaign) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discountcampaign/" + discountcampaignproductcategory.getDiscountCampaign().getId(), DiscountCampaign.class);
    if (discountcampaign2 != null) {
        final DiscountType discounttype3 = (DiscountType) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discounttype/" + discountcampaign2.getDiscountType().getId(), DiscountType.class);
        if (discounttype3 != null) {
        }
    }
}
return discountcampaignproductcategory;


3.2.5 DiscountType


Entity Name: DiscountType

Data Schema: Shop

Master Service: DiscountCampaignService


Call graph of entity of DiscountType

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
BuyINTDiscountType
FixedAmountDOUBLEDiscountType
FreeShippingBOOLDiscountType
PayINTDiscountType
PercentageDOUBLEDiscountType
PrimaryKeyLONGDiscountType
ServerReplicationVersionLONGDiscountType
ShopOwnerLONGDiscountType

Pseudo code snippet

final DiscountType discounttype = (DiscountType) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discounttype/" + id, DiscountType.class);
if (discounttype != null) {
}
return discounttype;


Table of content