| | |
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<Object> countSameDayAndBuyGoodsByChannelAndBuyNum(String channel, Integer type, String years,
|
| | | String startTime, String endTime, Integer orderNum) throws Exception {
|
| | | List<Map<String, Object>> list = userActiveLogMapper.countSameDayAndBuyGoodsByChannelAndBuyNum(channel, type, years, |
| | | startTime, endTime, orderNum);
|
| | | |
| | | if (list == null || list.size() == 0) {
|
| | | return null;
|
| | | } |
| | | |
| | | switch (type){
|
| | | case 1: // 按天处理
|
| | | return dayFactory(startTime, endTime, list);
|
| | | case 2: // 按月处理
|
| | | return monthFactory(list);
|
| | | case 3: |
| | | return yearFactory(list);
|
| | | default: |
| | | return null;
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public List<Object> getBuyProportion(String channel, Integer type, String years,
|
| | | String startTime, String endTime) throws Exception{
|
| | | String startTime, String endTime, Integer orderNum) throws Exception{
|
| | |
|
| | | // 统计渠道当日新增用户
|
| | | List<Object> countList = countSameDayByChannel(channel, type, years, startTime, endTime);
|
| | |
|
| | | if (countList == null || countList.size() == 0) {
|
| | | return null;
|
| | | }
|
| | |
|
| | | List<Object> countListBuy= countSameDayAndBuyGoodsByChannel(channel, type, years, startTime, endTime);
|
| | | // 统计渠道当日新增用户存在下单的用户数量
|
| | | List<Object> countListBuy= null;
|
| | | if (orderNum <= 1){
|
| | | countListBuy = countSameDayAndBuyGoodsByChannel(channel, type, years, startTime, endTime);
|
| | | } else {
|
| | | countListBuy = countSameDayAndBuyGoodsByChannelAndBuyNum(channel, type, years, startTime, endTime, orderNum);
|
| | | }
|
| | | |
| | | if (countListBuy == null){
|
| | | new ArrayList<Object>();
|
| | | }
|
| | |
|
| | | List<Object> listObject = new ArrayList<Object>();
|
| | |
|