Class CustomerAnalyticsServiceImpl
- java.lang.Object
-
- co.mastermindcms.modules.services.CustomerAnalyticsServiceImpl
-
- All Implemented Interfaces:
CustomerAnalyticsService
@Service public class CustomerAnalyticsServiceImpl extends java.lang.Object implements CustomerAnalyticsService
-
-
Field Summary
Fields Modifier and Type Field Description private ChatRepository
chatRepository
private static com.fasterxml.jackson.databind.ObjectMapper
mapper
private org.springframework.data.mongodb.core.MongoTemplate
mongoTemplate
private OrderRepository
orderRepository
private ProfileRepository
profileRepository
private SellerRepository
sellerRepository
-
Constructor Summary
Constructors Constructor Description CustomerAnalyticsServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.data.domain.Page<CustomerActivity>
getCustomerActivity(co.mastermindcms.modules.beans.SearchRequest request)
This method builds an event graph based on customer's actions.org.springframework.data.domain.Page<CustomerActivity>
getCustomerActivity(java.util.LinkedHashMap<java.lang.String,java.lang.Object> request)
This method builds an event graph based on customer's actions.ChartData
getCustomersActivityChart(java.util.LinkedHashMap<java.lang.String,java.lang.Object> request)
This method builds an array for the chart diagrams based on customer's actions.java.util.Map<java.lang.String,java.lang.Integer>
getRegisteredCompaniesByCountry()
Retrieves a map of registered companies by country.java.util.Map<java.lang.String,java.lang.Integer>
getRegisteredCompaniesByType()
Retrieves a map of registered companies by type.ChartData
getRegisteredCustomersChart()
This method builds an array for the chart diagrams based on registered companies.org.springframework.data.domain.Page<ActivityDataItem>
searchCustomerActivityEvents(co.mastermindcms.modules.beans.SearchRequest sr, Seller seller)
This method builds a list of events based on customer's actions.org.springframework.data.domain.Page<ActivityDataItem>
searchCustomerActivityEvents(java.util.LinkedHashMap<java.lang.String,java.lang.Object> request)
This method builds a list of events based on customer's actions.
-
-
-
Field Detail
-
profileRepository
@Autowired private ProfileRepository profileRepository
-
chatRepository
@Autowired private ChatRepository chatRepository
-
orderRepository
@Autowired private OrderRepository orderRepository
-
sellerRepository
@Autowired private SellerRepository sellerRepository
-
mongoTemplate
@Autowired private org.springframework.data.mongodb.core.MongoTemplate mongoTemplate
-
mapper
private static final com.fasterxml.jackson.databind.ObjectMapper mapper
-
-
Method Detail
-
searchCustomerActivityEvents
public org.springframework.data.domain.Page<ActivityDataItem> searchCustomerActivityEvents(java.util.LinkedHashMap<java.lang.String,java.lang.Object> request)
Description copied from interface:CustomerAnalyticsService
This method builds a list of events based on customer's actions.- Specified by:
searchCustomerActivityEvents
in interfaceCustomerAnalyticsService
- Parameters:
request
- search request as map- Returns:
- data transport entities as page
-
searchCustomerActivityEvents
public org.springframework.data.domain.Page<ActivityDataItem> searchCustomerActivityEvents(co.mastermindcms.modules.beans.SearchRequest sr, Seller seller)
Description copied from interface:CustomerAnalyticsService
This method builds a list of events based on customer's actions.- Specified by:
searchCustomerActivityEvents
in interfaceCustomerAnalyticsService
- Parameters:
sr
- search request as entityseller
- customer entity- Returns:
- data transport entities as page
-
getCustomerActivity
public org.springframework.data.domain.Page<CustomerActivity> getCustomerActivity(java.util.LinkedHashMap<java.lang.String,java.lang.Object> request)
Description copied from interface:CustomerAnalyticsService
This method builds an event graph based on customer's actions.- Specified by:
getCustomerActivity
in interfaceCustomerAnalyticsService
- Parameters:
request
- search request as map- Returns:
- data transport object
-
getCustomerActivity
public org.springframework.data.domain.Page<CustomerActivity> getCustomerActivity(co.mastermindcms.modules.beans.SearchRequest request)
Description copied from interface:CustomerAnalyticsService
This method builds an event graph based on customer's actions.- Specified by:
getCustomerActivity
in interfaceCustomerAnalyticsService
- Parameters:
request
- search request as entity- Returns:
- data transport object
-
getCustomersActivityChart
public ChartData getCustomersActivityChart(java.util.LinkedHashMap<java.lang.String,java.lang.Object> request)
Description copied from interface:CustomerAnalyticsService
This method builds an array for the chart diagrams based on customer's actions.- Specified by:
getCustomersActivityChart
in interfaceCustomerAnalyticsService
- Parameters:
request
- search request as entity- Returns:
- data transport object
-
getRegisteredCustomersChart
public ChartData getRegisteredCustomersChart()
Description copied from interface:CustomerAnalyticsService
This method builds an array for the chart diagrams based on registered companies.- Specified by:
getRegisteredCustomersChart
in interfaceCustomerAnalyticsService
- Returns:
- data transport object
-
getRegisteredCompaniesByCountry
public java.util.Map<java.lang.String,java.lang.Integer> getRegisteredCompaniesByCountry()
Description copied from interface:CustomerAnalyticsService
Retrieves a map of registered companies by country.This method returns a map where the keys are country code and the values are the number of registered companies in that country.
- Specified by:
getRegisteredCompaniesByCountry
in interfaceCustomerAnalyticsService
- Returns:
- a map of registered companies by country
-
getRegisteredCompaniesByType
public java.util.Map<java.lang.String,java.lang.Integer> getRegisteredCompaniesByType()
Description copied from interface:CustomerAnalyticsService
Retrieves a map of registered companies by type.This method returns a map where the keys are type and the values are the number of registered companies in that type.
- Specified by:
getRegisteredCompaniesByType
in interfaceCustomerAnalyticsService
- Returns:
- a map of registered companies by type
-
-