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 ChatRepositorychatRepositoryprivate static com.fasterxml.jackson.databind.ObjectMappermapperprivate org.springframework.data.mongodb.core.MongoTemplatemongoTemplateprivate OrderRepositoryorderRepositoryprivate ProfileRepositoryprofileRepositoryprivate SellerRepositorysellerRepository
-
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.ChartDatagetCustomersActivityChart(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.ChartDatagetRegisteredCustomersChart()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:CustomerAnalyticsServiceThis method builds a list of events based on customer's actions.- Specified by:
searchCustomerActivityEventsin 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:CustomerAnalyticsServiceThis method builds a list of events based on customer's actions.- Specified by:
searchCustomerActivityEventsin 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:CustomerAnalyticsServiceThis method builds an event graph based on customer's actions.- Specified by:
getCustomerActivityin 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:CustomerAnalyticsServiceThis method builds an event graph based on customer's actions.- Specified by:
getCustomerActivityin 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:CustomerAnalyticsServiceThis method builds an array for the chart diagrams based on customer's actions.- Specified by:
getCustomersActivityChartin interfaceCustomerAnalyticsService- Parameters:
request- search request as entity- Returns:
- data transport object
-
getRegisteredCustomersChart
public ChartData getRegisteredCustomersChart()
Description copied from interface:CustomerAnalyticsServiceThis method builds an array for the chart diagrams based on registered companies.- Specified by:
getRegisteredCustomersChartin interfaceCustomerAnalyticsService- Returns:
- data transport object
-
getRegisteredCompaniesByCountry
public java.util.Map<java.lang.String,java.lang.Integer> getRegisteredCompaniesByCountry()
Description copied from interface:CustomerAnalyticsServiceRetrieves 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:
getRegisteredCompaniesByCountryin 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:CustomerAnalyticsServiceRetrieves 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:
getRegisteredCompaniesByTypein interfaceCustomerAnalyticsService- Returns:
- a map of registered companies by type
-
-