Просмотр исходного кода

[营销][修复]:触达用户列表当券数据为空时不显示当日记录

release_toaliyun_real
hupeng 7 лет назад
Родитель
Сommit
7f941ce39f
1 измененных файлов: 22 добавлений и 17 удалений
  1. +22
    -17
      mallinkService/src/main/java/com/iformall/service/impl/MarkingDataReportServiceImpl.java

+ 22
- 17
mallinkService/src/main/java/com/iformall/service/impl/MarkingDataReportServiceImpl.java Просмотреть файл

@@ -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


Загрузка…
Отмена
Сохранить