瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

顾绍勇 5 年之前
父節點
當前提交
4de6b9233e

+ 7
- 0
src/main/java/com/huiju/estateagents/excel/ActivityStatistics/TsChannelDaily.java 查看文件

@@ -1,5 +1,6 @@
1 1
 package com.huiju.estateagents.excel.ActivityStatistics;
2 2
 
3
+import com.alibaba.excel.annotation.ExcelIgnore;
3 4
 import com.alibaba.excel.annotation.ExcelProperty;
4 5
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
5 6
 import lombok.Data;
@@ -48,4 +49,10 @@ public class TsChannelDaily {
48 49
     @ExcelProperty(value = "访问次数", index = 5)
49 50
     private Integer visitNum;
50 51
 
52
+    /**
53
+     * 活动ID
54
+     */
55
+    @ExcelIgnore
56
+    private String targetId;
57
+
51 58
 }

+ 8
- 0
src/main/java/com/huiju/estateagents/service/impl/TaChannelServiceImpl.java 查看文件

@@ -60,6 +60,11 @@ public class TaChannelServiceImpl extends ServiceImpl<TaChannelMapper, TaChannel
60 60
             orderType = "desc";
61 61
         }
62 62
         IPage<TsActivityDaily> data = taChannelMapper.getChannelIntroductionList(pg, orgId,startDate,endDate,channelType,buildingId, channelId, sortField, orderType,taPersonBuildings);
63
+        List<TsActivityDaily> records = data.getRecords();
64
+        records.forEach(e -> {
65
+            List<ChannelVisitPersonNum> channelPersonNumListExport = taChannelMapper.getChannelPersonNumListExport(orgId, channelId, e.getTargetId(), e.getTargetType(), buildingId, startDate, endDate);
66
+            e.setVisitPersons(channelPersonNumListExport.size());
67
+        });
63 68
         return ResponseBean.success(data);
64 69
     }
65 70
 
@@ -135,6 +140,9 @@ public class TaChannelServiceImpl extends ServiceImpl<TaChannelMapper, TaChannel
135 140
     public List<TsChannelDaily> getChannelIntroductionListExport(Integer orgId, LocalDate startDate, LocalDate endDate, String channelType, String buildingId, Integer channelId, List<TaPersonBuilding> taPersonBuildings) {
136 141
         List<TsChannelDaily> channelIntroductionListExport = taChannelMapper.getChannelIntroductionListExport(orgId, startDate, endDate, channelType, buildingId, channelId,taPersonBuildings);
137 142
         channelIntroductionListExport.forEach(e -> {
143
+            List<ChannelVisitPersonNum> channelPersonNumListExport = taChannelMapper.getChannelPersonNumListExport(orgId, channelId, e.getTargetId(), e.getTargetType(), buildingId, startDate, endDate);
144
+            e.setVisitPersons(channelPersonNumListExport.size());
145
+
138 146
             String message = "";
139 147
             switch (e.getTargetType()){
140 148
                 case "building":