傅行帆 před 3 roky
rodič
revize
cf4535f7d8

+ 2
- 2
src/main/java/com/yunzhi/marketing/controller/StatisticalController.java Zobrazit soubor

@@ -77,7 +77,7 @@ public class StatisticalController extends BaseController {
77 77
     public ResponseBean changeNewsUserCount(@RequestParam(value = "startDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDate startDate,
78 78
                                             @RequestParam(value = "endDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)  LocalDate endDate,
79 79
                                             HttpServletRequest request) {
80
-        return iStatisticalService.changeNewsUserCount(getOrgId(request), startDate, endDate,getInstitutionIds(request));
80
+        return iStatisticalService.changeNewsUserCount(getOrgId(request), startDate, endDate,null);
81 81
     }
82 82
 
83 83
     /**
@@ -267,7 +267,7 @@ public class StatisticalController extends BaseController {
267 267
                                                 @RequestParam(value = "sortField", required = false) String sortField,
268 268
                                                 @RequestParam(value = "sortOrder", required = false) String sortOrder,
269 269
                                                 HttpServletRequest request) {
270
-        return iStatisticalService.getStatsTableList(pageNum,pageSize,getOrgId(request), startDate, endDate,buildingId, getTaPersonBuildingListByUserId(request),sortField,sortOrder);
270
+        return iStatisticalService.getStatsTableList(pageNum,pageSize,getOrgId(request), startDate, endDate,buildingId, getTaPersonBuildingListByUserId(request),sortField,sortOrder,getInstitutionIds(request));
271 271
     }
272 272
 
273 273
     /**

+ 1
- 1
src/main/java/com/yunzhi/marketing/mapper/TaBuildingMapper.java Zobrazit soubor

@@ -153,7 +153,7 @@ public interface TaBuildingMapper extends BaseMapper<TaBuilding> {
153 153
      * @param personBuildingList
154 154
      * @return
155 155
      */
156
-    IPage<StatsBuilding> getStatsTableList(IPage<StatsBuilding> page, @Param("orgId") Integer orgId, @Param("startDate")  LocalDate startDate, @Param("endDate")  LocalDate endDate, @Param("buildingId") String buildingId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList,@Param("sortField") String sortField,@Param("orderType") String orderType);
156
+    IPage<StatsBuilding> getStatsTableList(IPage<StatsBuilding> page, @Param("orgId") Integer orgId, @Param("startDate")  LocalDate startDate, @Param("endDate")  LocalDate endDate, @Param("buildingId") String buildingId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList,@Param("sortField") String sortField,@Param("orderType") String orderType,@Param("institutionIds") List<String> institutionIds);
157 157
 
158 158
     /**
159 159
      * 获取导出的数据

+ 1
- 1
src/main/java/com/yunzhi/marketing/service/IStatisticalService.java Zobrazit soubor

@@ -148,7 +148,7 @@ public interface IStatisticalService {
148 148
      * @param taPersonBuildingListByUserId
149 149
      * @return
150 150
      */
151
-    ResponseBean getStatsTableList(Integer pageNum, Integer pageSize, Integer orgId, LocalDate startDate, LocalDate endDate, String buildingId, List<TaPersonBuilding> taPersonBuildingListByUserId,String sortField,String sortOrder);
151
+    ResponseBean getStatsTableList(Integer pageNum, Integer pageSize, Integer orgId, LocalDate startDate, LocalDate endDate, String buildingId, List<TaPersonBuilding> taPersonBuildingListByUserId,String sortField,String sortOrder,List<String> inistions);
152 152
 
153 153
     /**
154 154
      * 获取需要导出的数据

+ 2
- 2
src/main/java/com/yunzhi/marketing/service/impl/StatisticalServiceImpl.java Zobrazit soubor

@@ -455,7 +455,7 @@ public class StatisticalServiceImpl implements IStatisticalService {
455 455
      * @return
456 456
      */
457 457
     @Override
458
-    public ResponseBean getStatsTableList(Integer pageNum, Integer pageSize, Integer orgId, LocalDate startDate, LocalDate endDate, String buildingId, List<TaPersonBuilding> personBuildingList,String sortField,String sortOrder) {
458
+    public ResponseBean getStatsTableList(Integer pageNum, Integer pageSize, Integer orgId, LocalDate startDate, LocalDate endDate, String buildingId, List<TaPersonBuilding> personBuildingList,String sortField,String sortOrder,List<String> institutionIds) {
459 459
         String orderType = "asc";
460 460
         if ("descend".equals(sortOrder)){
461 461
             orderType = "desc";
@@ -467,7 +467,7 @@ public class StatisticalServiceImpl implements IStatisticalService {
467 467
             orderType = "desc";
468 468
         }
469 469
         IPage<StatsBuilding> pg = new Page<>(pageNum, pageSize);
470
-        IPage<StatsBuilding> page = taBuildingMapper.getStatsTableList(pg, orgId, startDate, endDate, buildingId, personBuildingList,sortField,orderType);
470
+        IPage<StatsBuilding> page = taBuildingMapper.getStatsTableList(pg, orgId, startDate, endDate, buildingId, personBuildingList,sortField,orderType,institutionIds);
471 471
         return ResponseBean.success(page);
472 472
     }
473 473
 

+ 1
- 1
src/main/java/com/yunzhi/marketing/statistic/controller/TsUserBehaviorStatisticController.java Zobrazit soubor

@@ -158,6 +158,6 @@ public class TsUserBehaviorStatisticController extends BaseController {
158 158
                                            @RequestParam(value = "org", required = false) String org,
159 159
                                            HttpServletRequest request) {
160 160
         Integer orgId = StringUtils.isEmpty(org) ? getOrgId(request) : Integer.valueOf(org);
161
-        return iTsUserBehaviorStatisticService.selectUserBehavior(orgId, startDate, endDate, buildingId,getInstitutionIds(request));
161
+        return iTsUserBehaviorStatisticService.selectUserBehavior(orgId, startDate, endDate, buildingId,null);
162 162
     }
163 163
 }

+ 857
- 851
src/main/resources/mapper/TaBuildingMapper.xml
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 2
- 5
src/main/resources/mapper/TaPersonFromRecordMapper.xml Zobrazit soubor

@@ -9,19 +9,16 @@
9 9
             t.event_type,
10 10
             t.org_id,
11 11
             t.create_date,
12
-            sum( IF ( p.phone IS NOT NULL OR p.tel IS NOT NULL, 1, 0 ) ) AS registered_num,
13
-            b.institution_id
12
+            sum( IF ( p.phone IS NOT NULL OR p.tel IS NOT NULL, 1, 0 ) ) AS registered_num
14 13
         FROM
15 14
             ta_person_from_record t
16 15
             LEFT JOIN ta_person p ON t.person_id = p.person_id
17
-            LEFT JOIN ta_building b on t.building_id = b.building_id
18 16
         WHERE
19 17
             t.is_first_time = 1
20 18
             AND DATE_FORMAT( t.create_date, '%Y-%m-%d' ) = DATE_FORMAT( NOW( ), '%Y-%m-%d' )
21 19
         GROUP BY
22 20
             t.scene_type,
23 21
             t.event_type,
24
-            t.org_id,
25
-            b.institution_id
22
+            t.org_id
26 23
     </select>
27 24
 </mapper>