Table of content



The DiscountCampaign entity within the microservice architecture

Entity-Relationship-Model of <DiscountCampaignService>

Entity Name: DiscountCampaign

Data Schema: Shop

Master Service: DiscountCampaignService


Dataflow 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

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/discountcampaign/{id}PUTupdateDiscountCampaignById(discountcampaign)DiscountCampaignServiceDiscountCampaign
/discountcampaignGETfindAllDiscountCampaign()DiscountCampaignServiceDiscountCampaign
/discountcampaignPOSTinsertDiscountCampaign(discountcampaign)DiscountCampaignServiceDiscountCampaign
/discountcampaign/discounttype/{id}GETfindAllDiscountCampaignOfDiscountType(id)DiscountCampaignServiceDiscountType DiscountCampaign
/discountcampaigncustomer/discountcampaign/{id}GETfindAllDiscountCampaignCustomerOfDiscountCampaign(id)CountryServiceDiscountCampaign DiscountCampaignCustomer
/discountcampaign/{id}DELETEdeleteDiscountCampaignById(id)DiscountCampaignServiceDiscountCampaign
/discountcampaign/{id}GETfindDiscountCampaignById(id)DiscountCampaignServiceDiscountCampaign
/discountcampaignproduct/discountcampaign/{id}GETfindAllDiscountCampaignProductOfDiscountCampaign(id)DiscountCampaignServiceDiscountCampaign DiscountCampaignProduct
/discountcampaigncustomergroup/discountcampaign/{id}GETfindAllDiscountCampaignCustomerGroupOfDiscountCampaign(id)DiscountCampaignServiceDiscountCampaign DiscountCampaignCustomerGroup
/discountcampaignproductcategory/discountcampaign/{id}GETfindAllDiscountCampaignProductCategoryOfDiscountCampaign(id)DiscountCampaignServiceDiscountCampaign DiscountCampaignProductCategory

Distributed transaction of <DiscountCampaign>

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;


Table of content