Table of content



The DiscountCampaignCustomer entity within the microservice architecture

Entity-Relationship-Model of <CountryService>

Entity Name: DiscountCampaignCustomer

Data Schema: Shop

Master Service: CountryService


Dataflow of entity of DiscountCampaignCustomer

Microservices

3.1 CountryService3.2 DiscountCampaignService3.3 ProductService3.4 ShopLicenseService

Entity Properties

Property NameDatatypeData EntityReference Entity
DiscountCampaignLONGDiscountCampaignCustomerDiscountCampaign
MaxDiscountsINTDiscountCampaignCustomer
PrimaryKeyLONGDiscountCampaignCustomer
ServerReplicationVersionLONGDiscountCampaignCustomer
ShopCustomerLONGDiscountCampaignCustomerShopCustomer
ShopOwnerLONGDiscountCampaignCustomer
UsedDiscountsINTDiscountCampaignCustomer

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/discountcampaigncustomer/{id}DELETEdeleteDiscountCampaignCustomerById(id)CountryServiceDiscountCampaignCustomer
/discountcampaigncustomer/{id}PUTupdateDiscountCampaignCustomerById(discountcampaigncustomer)CountryServiceDiscountCampaignCustomer
/discountcampaigncustomer/{id}GETfindDiscountCampaignCustomerById(id)CountryServiceDiscountCampaignCustomer
/discountcampaigncustomerGETfindAllDiscountCampaignCustomer()CountryServiceDiscountCampaignCustomer
/discountcampaigncustomer/discountcampaign/{id}GETfindAllDiscountCampaignCustomerOfDiscountCampaign(id)CountryServiceDiscountCampaign DiscountCampaignCustomer
/discountcampaigncustomer/shopcustomer/{id}GETfindAllDiscountCampaignCustomerOfShopCustomer(id)CountryServiceShopCustomer DiscountCampaignCustomer
/discountcampaigncustomerPOSTinsertDiscountCampaignCustomer(discountcampaigncustomer)CountryServiceDiscountCampaignCustomer

Distributed transaction of <DiscountCampaignCustomer>

Pseudo code snippet

final DiscountCampaignCustomer discountcampaigncustomer = (DiscountCampaignCustomer) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/discountcampaigncustomer/" + id, DiscountCampaignCustomer.class);
if (discountcampaigncustomer != null) {
    final ShopCustomer shopcustomer1 = (ShopCustomer) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/shopcustomer/" + discountcampaigncustomer.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) {
        }
    }
    final DiscountCampaign discountcampaign3 = (DiscountCampaign) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discountcampaign/" + discountcampaigncustomer.getDiscountCampaign().getId(), DiscountCampaign.class);
    if (discountcampaign3 != null) {
        final DiscountType discounttype4 = (DiscountType) this.callMicroservice(ServiceNames.DISCOUNT_CAMPAIGN_SERVICE + "/discounttype/" + discountcampaign3.getDiscountType().getId(), DiscountType.class);
        if (discounttype4 != null) {
        }
    }
}
return discountcampaigncustomer;


Table of content