CustomerStatisticsMapper.java
6.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
package cn.com.glsx.entmicro.mapper;
import cn.com.glsx.entmicro.entity.CustomerStatistics;
import cn.com.glsx.entmicro.model.CustomerStaticRequest;
import cn.com.glsx.entmicro.model.CustomerStatisticModel;
import cn.com.glsx.entmicro.model.response.*;
import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
@Mapper
public interface CustomerStatisticsMapper extends CommonBaseMapper<CustomerStatistics> {
@MapKey("dateTime")
Map<String, ChartDayResponse> getDaysDataByMerchantIds(@Param("dates") List<String> dates, @Param("merchantIds") List<Integer> merchantIds);
ShopCollectViewResponse getShopCollectViewByMerchantIds(@Param("date") Date date, @Param("merchantIds") List<Integer> merchantIds);
StoreCollectViewResponse getStoreCollectViewByMerchantIds(@Param("date") Date date, @Param("merchantIds") List<Integer> merchantIds);
@MapKey("dateTime")
Map<String, ShopLineChart> getShopLineChartByMerchantIds(@Param("dates") List<String> dates, @Param("merchantIds") List<Integer> merchantIds);
List<ShopCustSort> getShopCustSortAdd(@Param("merchantIds") List<Integer> merchantIds);
List<ShopCustSort> getShopCustSortAddActual(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
List<ShopCustSort> getShopCustSortYesterAdd(@Param("merchantIds") List<Integer> merchantIds);
List<ShopCustSort> getShopCustSortDayAddActual(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
List<ShopCustSort> getShopCustSortLose(@Param("merchantIds") List<Integer> merchantIds);
List<ShopCustSort> getShopCustSortLoseActual(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
//商户号,昨天之前客户
@MapKey("merchantId")
Map<Integer, CustomerStatistics> getCustomerBeforeYesterDayCount(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
//实时客户,<=dateTime
Integer getCustomerCountActual(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
//实时客户,=dateTime
Integer getCustomerDateTimeCountActual(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
//商户号,昨天新增客户
@MapKey("merchantId")
Map<Integer, CustomerStatistics> getCustomeYesterDayCount(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
//商户号,昨天之前企微客户数
@MapKey("merchantId")
Map<Integer, CustomerStatistics> getEntmicroCustomerBeforeYesterDayCount(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
//实时企微客户数,<=dateTime
Integer getEntmicroCustomerCountActual(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
//实时企微客户数 =dateTime
Integer getEntmicroCustomerDayTimeCountActual(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
//商户号,昨天新增企微客户数
@MapKey("merchantId")
Map<Integer, CustomerStatistics> getEntmicroCustomerYesterDayCount(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
//商户号,昨天之前流失客户数
@MapKey("merchantId")
Map<Integer, CustomerStatistics> getLostCustomerBeforeYesterDayCount(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
//实时流失客户数 <=dateTime
Integer getLostCustomerCountActual(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
//实时流失客户数 =dateTime
Integer getLostCustomerDateTimeCountActual(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
//商户号,昨天流失企微客户数
@MapKey("merchantId")
Map<Integer, CustomerStatistics> getLostCustomerYesterDayCount(@Param("merchantIds") List<Integer> merchantIds, @Param("dateTime") String dateTime);
@MapKey("dateTime")
Map<String, LineChartMonthResponse> getCustMonthsCount(@Param("merchantIds") List<Integer> merchantIds, @Param("months") Set<String> months);
CustomerStatisResponse getPurposeAndPurchaseYester(@Param("merchantIds") List<Integer> merchantIds);
CustomerStatisResponse getPurposeAndPurchaseToday(@Param("merchantIds") List<Integer> merchantIds);
CustomerYesterStatisResponse getCustomerToday(@Param("merchantIds") List<Integer> merchantIds);
CustomerYesterStatisResponse getCustomerYesterday(@Param("merchantIds") List<Integer> merchantIds);
String getCreateCustomerMinDay(@Param("datalist") List<Integer> datalist);
List<Integer> findFirst(@Param("minDay") String minDay, @Param("datalist") List<Integer> datalist);
List<String> getExistDates(@Param("datalist") List<Integer> datalist);
@MapKey("merchantId")
Map<Integer, CustomerStatistics> findStaticsDataByDate(@Param("datalist") List<String> datalist, @Param("dateTime") String dateTime);
int batchUpdate(@Param("datalist") List<CustomerStatistics> datalist);
List<CustomerStatisticModel> findCustomerStatistic(@Param("customerStaticRequest") CustomerStaticRequest customerStaticRequest);
List<CustomerStatisticModel> findLostCustomerStatistic(@Param("customerStaticRequest") CustomerStaticRequest customerStaticRequest);
@MapKey("dateTime")
Map<String, Map> getDaysAddCountDataByMerchantIds(@Param("dates") List<String> dates, @Param("merchantIds") List<Integer> merchantIds);
@MapKey("dateTime")
Map<String, Map> getDaysAddEntCountDataByMerchantIds(@Param("dates") List<String> dates, @Param("merchantIds") List<Integer> merchantIds);
@MapKey("dateTime")
Map<String, Map> getDaysLostEntCountDataByMerchantIds(@Param("dates") List<String> dates, @Param("merchantIds") List<Integer> merchantIds);
/**
* 查询活码客户新增数据
*
* @param customerStaticRequest
* @return
*/
List<CustomerStatisticModel> findCodeStatistic(@Param("customerStaticRequest") CustomerStaticRequest customerStaticRequest);
@MapKey("dateTime")
Map<String, Map> getMonAddCountDataByMerchantIds(@Param("months") Set<String> months, @Param("merchantIds") List<Integer> merchantIds);
@MapKey("dateTime")
Map<String, Map> getMonAddEntCountDataByMerchantIds(@Param("months") Set<String> months, @Param("merchantIds") List<Integer> merchantIds);
@MapKey("dateTime")
Map<String, Map> getMonLostEntCountDataByMerchantIds(@Param("months") Set<String> months, @Param("merchantIds") List<Integer> merchantIds);
List<CustomerStatisticModel> findCustomerStatisticGroupMerchantId(@Param("customerStaticRequest") CustomerStaticRequest customerStaticRequest);
}