|
|
|
@@ -362,18 +362,6 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<TouchUsersReportVo> getTouchUsersReportList(String tenantId, MarkingCouponDataReportDto markingCouponDataReportDto, Integer pageIndex, Integer pageSize) { |
|
|
|
//获取领取人数 |
|
|
|
//获取领取量 |
|
|
|
//获取核销人数 |
|
|
|
//核销量 |
|
|
|
HashMap<String, Object> params = new HashMap<>(); |
|
|
|
params.put("tenantId", tenantId); |
|
|
|
if (markingCouponDataReportDto.getStartTime() != null) |
|
|
|
params.put("startTime", convertDate(markingCouponDataReportDto.getStartTime())); |
|
|
|
if (markingCouponDataReportDto.getEndTime() != null) |
|
|
|
params.put("endTime", convertDateAndAdd(convertDate(markingCouponDataReportDto.getEndTime()), 1)); |
|
|
|
PageHelper.startPage(pageIndex, pageSize); |
|
|
|
List<TouchUsersReportVo> couponDatalist = wxCouponOrderMapper.touchUsersReportList(params); |
|
|
|
|
|
|
|
//查询UV PV |
|
|
|
HashMap<String, Object> params1 = new HashMap<>(); |
|
|
|
@@ -382,15 +370,32 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService { |
|
|
|
params1.put("startTime", convertDate(markingCouponDataReportDto.getStartTime())); |
|
|
|
if (markingCouponDataReportDto.getEndTime() != null) |
|
|
|
params1.put("endTime", convertDateAndAdd(convertDate(markingCouponDataReportDto.getEndTime()), 1)); |
|
|
|
PageHelper.startPage(pageIndex, pageSize); |
|
|
|
List<TouchUsersReportVo> wxUserVisitList = wxUserVisitMapper.touchUsersReportList(params1); |
|
|
|
Map<String,TouchUsersReportVo> visitMap = wxUserVisitList.stream().collect(Collectors.toMap(TouchUsersReportVo::getxTime, p -> p)); |
|
|
|
for (TouchUsersReportVo temp:couponDatalist) { |
|
|
|
|
|
|
|
|
|
|
|
//获取领取人数 |
|
|
|
//获取领取量 |
|
|
|
//获取核销人数 |
|
|
|
//核销量 |
|
|
|
HashMap<String, Object> params2 = new HashMap<>(); |
|
|
|
params2.put("tenantId", tenantId); |
|
|
|
if (markingCouponDataReportDto.getStartTime() != null) |
|
|
|
params2.put("startTime", convertDate(markingCouponDataReportDto.getStartTime())); |
|
|
|
if (markingCouponDataReportDto.getEndTime() != null) |
|
|
|
params2.put("endTime", convertDateAndAdd(convertDate(markingCouponDataReportDto.getEndTime()), 1)); |
|
|
|
List<TouchUsersReportVo> couponDatalist = wxCouponOrderMapper.touchUsersReportList(params2); |
|
|
|
|
|
|
|
Map<String,TouchUsersReportVo> visitMap = couponDatalist.stream().collect(Collectors.toMap(TouchUsersReportVo::getxTime, p -> p)); |
|
|
|
for (TouchUsersReportVo temp:wxUserVisitList) { |
|
|
|
if(visitMap.get(temp.getxTime())!=null){ |
|
|
|
temp.setUv(visitMap.get(temp.getxTime()).getUv()); |
|
|
|
temp.setPv(visitMap.get(temp.getxTime()).getPv()); |
|
|
|
temp.setCouponCount(visitMap.get(temp.getxTime()).getCouponCount()); |
|
|
|
temp.setUserCount(visitMap.get(temp.getxTime()).getUserCount()); |
|
|
|
temp.setVerifyCount(visitMap.get(temp.getxTime()).getVerifyCount()); |
|
|
|
temp.setVerifyUserCount(visitMap.get(temp.getxTime()).getVerifyUserCount()); |
|
|
|
} |
|
|
|
} |
|
|
|
return new PageInfo<>(couponDatalist); |
|
|
|
return new PageInfo<>(wxUserVisitList); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
|