dingxin il y a 5 ans
Parent
révision
60a522114b
42 fichiers modifiés avec 1468 ajouts et 21 suppressions
  1. 1
    1
      pom.xml
  2. 15
    0
      src/main/java/com/huiju/estateagents/common/CommConstant.java
  3. 2
    1
      src/main/java/com/huiju/estateagents/controller/TaPolicyController.java
  4. 6
    1
      src/main/java/com/huiju/estateagents/entity/HelpActivity.java
  5. 16
    0
      src/main/java/com/huiju/estateagents/entity/TaBuilding.java
  6. 5
    0
      src/main/java/com/huiju/estateagents/entity/TaBuildingDynamic.java
  7. 5
    0
      src/main/java/com/huiju/estateagents/entity/TaShareRecord.java
  8. 72
    0
      src/main/java/com/huiju/estateagents/job/CustomerStatisticTimeJob.java
  9. 28
    1
      src/main/java/com/huiju/estateagents/service/impl/TaBuildingServiceImpl.java
  10. 18
    9
      src/main/java/com/huiju/estateagents/service/impl/TaPersonServiceImpl.java
  11. 149
    0
      src/main/java/com/huiju/estateagents/statistic/controller/TaCustomerFollowUpRecordController.java
  12. 149
    0
      src/main/java/com/huiju/estateagents/statistic/controller/TaCustomerGenderStatisticController.java
  13. 149
    0
      src/main/java/com/huiju/estateagents/statistic/controller/TaCustomerStatisticDailyController.java
  14. 149
    0
      src/main/java/com/huiju/estateagents/statistic/controller/TaCustomerStatisticMonthlyController.java
  15. 62
    0
      src/main/java/com/huiju/estateagents/statistic/entity/TaCustomerFollowUpRecord.java
  16. 67
    0
      src/main/java/com/huiju/estateagents/statistic/entity/TaCustomerGenderStatistic.java
  17. 56
    0
      src/main/java/com/huiju/estateagents/statistic/entity/TaCustomerStatisticDaily.java
  18. 66
    0
      src/main/java/com/huiju/estateagents/statistic/entity/TaCustomerStatisticMonthly.java
  19. 18
    0
      src/main/java/com/huiju/estateagents/statistic/mapper/TaCustomerFollowUpRecordMapper.java
  20. 18
    0
      src/main/java/com/huiju/estateagents/statistic/mapper/TaCustomerGenderStatisticMapper.java
  21. 45
    0
      src/main/java/com/huiju/estateagents/statistic/mapper/TaCustomerStatisticDailyMapper.java
  22. 18
    0
      src/main/java/com/huiju/estateagents/statistic/mapper/TaCustomerStatisticMonthlyMapper.java
  23. 16
    0
      src/main/java/com/huiju/estateagents/statistic/service/ITaCustomerFollowUpRecordService.java
  24. 35
    0
      src/main/java/com/huiju/estateagents/statistic/service/ITaCustomerGenderStatisticService.java
  25. 35
    0
      src/main/java/com/huiju/estateagents/statistic/service/ITaCustomerStatisticDailyService.java
  26. 16
    0
      src/main/java/com/huiju/estateagents/statistic/service/ITaCustomerStatisticMonthlyService.java
  27. 20
    0
      src/main/java/com/huiju/estateagents/statistic/service/impl/TaCustomerFollowUpRecordServiceImpl.java
  28. 55
    0
      src/main/java/com/huiju/estateagents/statistic/service/impl/TaCustomerGenderStatisticServiceImpl.java
  29. 90
    0
      src/main/java/com/huiju/estateagents/statistic/service/impl/TaCustomerStatisticDailyServiceImpl.java
  30. 20
    0
      src/main/java/com/huiju/estateagents/statistic/service/impl/TaCustomerStatisticMonthlyServiceImpl.java
  31. 1
    1
      src/main/resources/application-demo.yml
  32. 1
    1
      src/main/resources/application-dev.yml
  33. 1
    1
      src/main/resources/application-gzysd.yml
  34. 1
    1
      src/main/resources/application-nj.yml
  35. 1
    1
      src/main/resources/application-prod.yml
  36. 1
    1
      src/main/resources/application-test.yml
  37. 1
    1
      src/main/resources/application-v3.yml
  38. 1
    1
      src/main/resources/application-xs.yml
  39. 5
    0
      src/main/resources/mapper/statistic/TaCustomerFollowUpRecordMapper.xml
  40. 5
    0
      src/main/resources/mapper/statistic/TaCustomerGenderStatisticMapper.xml
  41. 44
    0
      src/main/resources/mapper/statistic/TaCustomerStatisticDailyMapper.xml
  42. 5
    0
      src/main/resources/mapper/statistic/TaCustomerStatisticMonthlyMapper.xml

+ 1
- 1
pom.xml Voir le fichier

@@ -198,7 +198,7 @@
198 198
 				<includes>
199 199
 					<include>application.yml</include>
200 200
 					<include>application-${profiles.active}.yml</include>
201
-					<include>mapper/*.xml</include>
201
+					<include>mapper/**/*.xml</include>
202 202
 				</includes>
203 203
 			</resource>
204 204
 		</resources>

+ 15
- 0
src/main/java/com/huiju/estateagents/common/CommConstant.java Voir le fichier

@@ -457,4 +457,19 @@ public class CommConstant {
457 457
      * 活动以结束
458 458
      */
459 459
     public static final Integer ACTIVITY_STATUS_FINISH = 2;
460
+    
461
+    /**
462
+     * 客户统计类型:跟进客户
463
+     */
464
+	public static final String CUSTOMER_TYPE_FOLLOW = "follow";
465
+    
466
+    /**
467
+     * 客户统计类型:新增客户
468
+     */
469
+    public static final String CUSTOMER_TYPE_NEW = "new";
470
+    
471
+    /**
472
+     * 客户统计类型:到访客户
473
+     */
474
+    public static final String CUSTOMER_TYPE_VISITE = "visite";
460 475
 }

+ 2
- 1
src/main/java/com/huiju/estateagents/controller/TaPolicyController.java Voir le fichier

@@ -102,7 +102,7 @@ public class TaPolicyController extends BaseController {
102 102
     @RequestMapping(value="/wx/taPolicy",method= RequestMethod.GET)
103 103
     public ResponseBean taPolicyListCity(@RequestParam(value ="pageNumber",defaultValue = "1") Integer pageNumber,
104 104
                                      @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
105
-                                         @RequestParam(value ="cityId", required = false) Integer cityId){
105
+                                         @RequestParam(value ="cityId", required = false) Integer cityId,HttpServletRequest request){
106 106
         ResponseBean responseBean = new ResponseBean();
107 107
         try {
108 108
             //使用分页插件
@@ -110,6 +110,7 @@ public class TaPolicyController extends BaseController {
110 110
             QueryWrapper<TaPolicy> queryWrapper = new QueryWrapper<>();
111 111
             queryWrapper.eq("city_id",cityId);
112 112
             queryWrapper.eq("publish_status",CommConstant.IS_PUBLISH);
113
+            queryWrapper.eq("org_id",getOrgId(request));
113 114
             queryWrapper.orderByDesc("weight", "create_date");
114 115
             queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
115 116
 

+ 6
- 1
src/main/java/com/huiju/estateagents/entity/HelpActivity.java Voir le fichier

@@ -115,7 +115,12 @@ public class HelpActivity implements Serializable {
115 115
      * 活动状态
116 116
      */
117 117
     private Integer activityStatus;
118
-    
118
+
119
+    /**
120
+     * 权重,用于排序
121
+     */
122
+    private Integer heavy;
123
+
119 124
     /**
120 125
      * Initiate 发起者  Booster 助力者
121 126
      */

+ 16
- 0
src/main/java/com/huiju/estateagents/entity/TaBuilding.java Voir le fichier

@@ -188,6 +188,16 @@ public class TaBuilding implements Serializable {
188 188
      */
189 189
     private Integer orgId;
190 190
 
191
+    /**
192
+     * 视频url
193
+     */
194
+    private String videoUrl;
195
+
196
+    /**
197
+     * 地图范围
198
+     */
199
+    private Integer mapScope;
200
+
191 201
 
192 202
 
193 203
     /**
@@ -249,4 +259,10 @@ public class TaBuilding implements Serializable {
249 259
      */
250 260
     @TableField(exist = false)
251 261
     private List<TaShareActivity> shareActivityList;
262
+
263
+    /**
264
+     * 列表图
265
+     */
266
+    @TableField(exist = false)
267
+    private List<TaBuildingImg> buildingListImg;
252 268
 }

+ 5
- 0
src/main/java/com/huiju/estateagents/entity/TaBuildingDynamic.java Voir le fichier

@@ -188,6 +188,11 @@ public class TaBuildingDynamic implements Serializable {
188 188
      */
189 189
     private Integer activityStatus;
190 190
 
191
+    /**
192
+     * 权重,用于排序
193
+     */
194
+    private Integer heavy;
195
+
191 196
     /**
192 197
      * 公司Id
193 198
      */

+ 5
- 0
src/main/java/com/huiju/estateagents/entity/TaShareRecord.java Voir le fichier

@@ -86,6 +86,11 @@ public class TaShareRecord implements Serializable {
86 86
      */
87 87
     private Integer verificationStatus;
88 88
 
89
+    /**
90
+     * 权重,用于排序
91
+     */
92
+    private Integer heavy;
93
+
89 94
     /**
90 95
      * 核销码
91 96
      */

+ 72
- 0
src/main/java/com/huiju/estateagents/job/CustomerStatisticTimeJob.java Voir le fichier

@@ -0,0 +1,72 @@
1
+package com.huiju.estateagents.job;
2
+
3
+import com.huiju.estateagents.base.BaseController;
4
+import com.huiju.estateagents.common.DateUtils;
5
+import com.huiju.estateagents.service.IHelpActivityService;
6
+import com.huiju.estateagents.service.IHelpInitiateRecordService;
7
+import com.huiju.estateagents.service.IHelpRecordService;
8
+import com.huiju.estateagents.service.ITaBuildingDynamicService;
9
+import com.huiju.estateagents.service.ITaShareActivityService;
10
+import com.huiju.estateagents.service.ITaShareChildRecordService;
11
+import com.huiju.estateagents.service.ITaShareRecordService;
12
+import com.huiju.estateagents.statistic.service.ITaCustomerGenderStatisticService;
13
+import com.huiju.estateagents.statistic.service.ITaCustomerStatisticDailyService;
14
+import org.slf4j.Logger;
15
+import org.slf4j.LoggerFactory;
16
+import org.springframework.beans.factory.annotation.Autowired;
17
+import org.springframework.context.annotation.Configuration;
18
+import org.springframework.scheduling.annotation.EnableScheduling;
19
+import org.springframework.scheduling.annotation.Scheduled;
20
+import org.springframework.stereotype.Component;
21
+
22
+import java.time.LocalDateTime;
23
+
24
+/**
25
+ * @author fxf
26
+ * @Title: CustomerStatisticTimeJob
27
+ * @Description: 盘客数据分析统计
28
+ * @date 2019/11/08
29
+ */
30
+@Component
31
+@Configuration
32
+@EnableScheduling
33
+public class CustomerStatisticTimeJob extends BaseController {
34
+
35
+    private final Logger logger = LoggerFactory.getLogger(CustomerStatisticTimeJob.class);
36
+
37
+    @Autowired
38
+    private ITaCustomerStatisticDailyService customerStatisticDailyService;
39
+    
40
+    @Autowired
41
+    private ITaCustomerGenderStatisticService taCustomerGenderStatisticService;
42
+
43
+    /**
44
+     *
45
+     * 盘客工具数据统计
46
+     *
47
+     * 开启定时任务,每天23:50执行
48
+     */
49
+    @Scheduled(cron = "* 50 23 * * ?")
50
+    private void configureTasks() {
51
+        LocalDateTime nowDate = LocalDateTime.now();
52
+    
53
+        //每天的新增客户统计并入表
54
+        customerStatisticDailyService.newCustomerStatisticDaily(nowDate);
55
+        
56
+        //每天的跟进客户统计并入表
57
+        customerStatisticDailyService.followUpStatisticDaily(nowDate);
58
+        
59
+        //每天的到访客户统计并入表
60
+        customerStatisticDailyService.visiteStatisticDaily(nowDate);
61
+    
62
+        //每天的新增客户性别统计并入表
63
+        taCustomerGenderStatisticService.newCustomerSexStatisticDaily(nowDate);
64
+    
65
+        //每天的跟进客户性别统计并入表
66
+        taCustomerGenderStatisticService.followUpSexStatisticDaily(nowDate);
67
+    
68
+        //每天的到访客户性别统计并入表
69
+        taCustomerGenderStatisticService.visiteSexStatisticDaily(nowDate);
70
+    }
71
+
72
+}

+ 28
- 1
src/main/java/com/huiju/estateagents/service/impl/TaBuildingServiceImpl.java Voir le fichier

@@ -135,6 +135,14 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
135 135
         List<TaBuildingImg> buildingImg = taBuildingImgMapper.selectList(BuildingImgQueryWrapper);
136 136
         building.setBuildingImg(buildingImg);
137 137
 
138
+        // 列表图
139
+        QueryWrapper<TaBuildingImg> BuildingListImgQueryWrapper = new QueryWrapper<>();
140
+        BuildingListImgQueryWrapper.eq("building_id", building.getBuildingId());
141
+        BuildingListImgQueryWrapper.eq("img_type", "list");
142
+        List<TaBuildingImg> buildingListImg = taBuildingImgMapper.selectList(BuildingListImgQueryWrapper);
143
+        building.setBuildingListImg(buildingListImg);
144
+
145
+
138 146
         // 查询tag
139 147
         QueryWrapper<TaBuildingTag> BuildingTagQueryWrapper = new QueryWrapper<>();
140 148
         BuildingTagQueryWrapper.eq("building_id", id);
@@ -258,6 +266,17 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
258 266
             insertImgBatch(buildingImgs, building.getBuildingId());
259 267
         }
260 268
 
269
+        // 列表图
270
+        String listImg = object.getString("listImg");
271
+        List<TaBuildingImg> buildingListImg = JSONObject.parseArray(listImg, TaBuildingImg.class);
272
+        if (CollectionUtils.isNotEmpty(buildingListImg)) {
273
+            QueryWrapper<TaBuildingImg> BuildingListImgQueryWrapper = new QueryWrapper<>();
274
+            BuildingListImgQueryWrapper.eq("building_id", building.getBuildingId());
275
+            BuildingListImgQueryWrapper.eq("img_type", "list");
276
+            taBuildingImgMapper.delete(BuildingListImgQueryWrapper);
277
+            buildingListImg = insertImgBatch(buildingListImg, building.getBuildingId());
278
+        }
279
+
261 280
 
262 281
         // tag先删除再增加
263 282
         String tagStr = object.getString("tag");
@@ -321,13 +340,21 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
321 340
             tdCityMapper.updateById(city);
322 341
         }
323 342
 
343
+        // 项目主图
324 344
         String imgStr = object.getString("img");
325 345
         List<TaBuildingImg> buildingImgs = JSONObject.parseArray(imgStr, TaBuildingImg.class);
326
-
327 346
         if (CollectionUtils.isNotEmpty(buildingImgs)) {
328 347
             buildingImgs = insertImgBatch(buildingImgs, building.getBuildingId());
329 348
         }
330 349
 
350
+        // 列表图
351
+        String listImg = object.getString("listImg");
352
+        List<TaBuildingImg> buildingListImg = JSONObject.parseArray(listImg, TaBuildingImg.class);
353
+        if (CollectionUtils.isNotEmpty(buildingListImg)) {
354
+            buildingListImg = insertImgBatch(buildingListImg, building.getBuildingId());
355
+        }
356
+
357
+        // 标签
331 358
         String tagStr = object.getString("tag");
332 359
         List<TaBuildingTag> buildingTags = JSONObject.parseArray(tagStr, TaBuildingTag.class);
333 360
         if (CollectionUtils.isNotEmpty(buildingTags)) {

+ 18
- 9
src/main/java/com/huiju/estateagents/service/impl/TaPersonServiceImpl.java Voir le fichier

@@ -18,6 +18,7 @@ import com.huiju.estateagents.event.EventBus;
18 18
 import com.huiju.estateagents.mapper.*;
19 19
 import com.huiju.estateagents.service.*;
20 20
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
21
+import org.apache.commons.collections.CollectionUtils;
21 22
 import org.springframework.beans.factory.annotation.Autowired;
22 23
 import org.springframework.context.ApplicationContext;
23 24
 import org.springframework.stereotype.Service;
@@ -28,6 +29,7 @@ import java.util.ArrayList;
28 29
 import java.util.HashMap;
29 30
 import java.util.List;
30 31
 import java.util.Map;
32
+import java.util.stream.Collectors;
31 33
 
32 34
 /**
33 35
  * <p>
@@ -293,7 +295,8 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
293 295
             }
294 296
             result.put("unReadNum", null == unReadNum ? 0 : unReadNum);
295 297
         } else {
296
-            result.put("liked", true);
298
+            List<TaFavor> taUvList = getFavorListBy(person, person);
299
+            result.put("liked", null != taUvList && taUvList.size() > 0);
297 300
             Integer unReadNum = taChatMapper.getAllUnReadMessage(person.getPersonId());
298 301
             result.put("unReadNum", null == unReadNum ? 0 : unReadNum);
299 302
         }
@@ -432,15 +435,21 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
432 435
         personBuildingQueryWrapper.eq("building_id",buildingId);
433 436
         List<TaPersonBuilding> list = taPersonBuildingMapper.selectList(personBuildingQueryWrapper);
434 437
         List<Integer>idLists = new ArrayList<>();
435
-        for(int i=0; i<list.size();i++){
436
-            if(null != list.get(i).getUserId()){
437
-                idLists.add(list.get(i).getUserId());
438
-            }
438
+//        for(int i=0; i<list.size();i++){
439
+//            if(null != list.get(i).getUserId()){
440
+//                idLists.add(list.get(i).getUserId());
441
+//            }
442
+//        }
443
+
444
+        idLists = list.stream().filter(e -> null != e.getUserId()).map(e -> e.getUserId()).collect(Collectors.toList());
445
+        IPage<TaUser> data = new Page<>();
446
+        if(CollectionUtils.isNotEmpty(idLists)) {
447
+            QueryWrapper<TaUser> userQueryWrapper = new QueryWrapper<>();
448
+            userQueryWrapper.in("user_id",idLists);
449
+            userQueryWrapper.eq("is_consultant", true);
450
+            data = taUserService.page(page,userQueryWrapper);
439 451
         }
440
-        QueryWrapper<TaUser> userQueryWrapper = new QueryWrapper<>();
441
-        userQueryWrapper.in("user_id",idLists);
442
-        userQueryWrapper.eq("is_consultant", true);
443
-        IPage<TaUser> data = taUserService.page(page,userQueryWrapper);
452
+
444 453
         return data;
445 454
     }
446 455
 

+ 149
- 0
src/main/java/com/huiju/estateagents/statistic/controller/TaCustomerFollowUpRecordController.java Voir le fichier

@@ -0,0 +1,149 @@
1
+package com.huiju.estateagents.statistic.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.base.BaseController;
7
+import com.huiju.estateagents.base.ResponseBean;
8
+import com.huiju.estateagents.statistic.entity.TaCustomerFollowUpRecord;
9
+import com.huiju.estateagents.statistic.service.ITaCustomerFollowUpRecordService;
10
+import org.slf4j.Logger;
11
+import org.slf4j.LoggerFactory;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.PathVariable;
14
+import org.springframework.web.bind.annotation.RequestBody;
15
+import org.springframework.web.bind.annotation.RequestMapping;
16
+import org.springframework.web.bind.annotation.RequestMethod;
17
+import org.springframework.web.bind.annotation.RequestParam;
18
+import org.springframework.web.bind.annotation.ResponseBody;
19
+import org.springframework.web.bind.annotation.RestController;
20
+
21
+/**
22
+ * <p>
23
+    * 跟进记录表 小程序盘客工具我的客户跟进记录信息 前端控制器
24
+    * </p>
25
+ *
26
+ * @author jobob
27
+ * @since 2019-11-08
28
+ */
29
+@RestController
30
+@RequestMapping("/")
31
+public class TaCustomerFollowUpRecordController extends BaseController {
32
+
33
+    private final Logger logger = LoggerFactory.getLogger(TaCustomerFollowUpRecordController.class);
34
+
35
+    @Autowired
36
+    public ITaCustomerFollowUpRecordService iTaCustomerFollowUpRecordService;
37
+
38
+
39
+    /**
40
+     * 分页查询列表
41
+     * @param pageNum
42
+     * @param pageSize
43
+     * @return
44
+     */
45
+    @RequestMapping(value="/taCustomerFollowUpRecord",method= RequestMethod.GET)
46
+    public ResponseBean taCustomerFollowUpRecordList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47
+                                                     @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
48
+        ResponseBean responseBean = new ResponseBean();
49
+        try {
50
+            //使用分页插件
51
+		    IPage<TaCustomerFollowUpRecord> pg = new Page<>(pageNum, pageSize);
52
+            QueryWrapper<TaCustomerFollowUpRecord> queryWrapper = new QueryWrapper<>();
53
+            queryWrapper.orderByDesc("create_date");
54
+
55
+            IPage<TaCustomerFollowUpRecord> result = iTaCustomerFollowUpRecordService.page(pg, queryWrapper);
56
+            responseBean.addSuccess(result);
57
+        }catch (Exception e){
58
+            e.printStackTrace();
59
+            logger.error("taCustomerFollowUpRecordList -=- {}",e.toString());
60
+            responseBean.addError(e.getMessage());
61
+        }
62
+        return responseBean;
63
+    }
64
+
65
+    /**
66
+     * 保存对象
67
+     * @param taCustomerFollowUpRecord 实体对象
68
+     * @return
69
+     */
70
+    @RequestMapping(value="/taCustomerFollowUpRecord",method= RequestMethod.POST)
71
+    public ResponseBean taCustomerFollowUpRecordAdd(@RequestBody TaCustomerFollowUpRecord taCustomerFollowUpRecord){
72
+        ResponseBean responseBean = new ResponseBean();
73
+        try {
74
+            if (iTaCustomerFollowUpRecordService.save(taCustomerFollowUpRecord)){
75
+                responseBean.addSuccess(taCustomerFollowUpRecord);
76
+            }else {
77
+                responseBean.addError("fail");
78
+            }
79
+        }catch (Exception e){
80
+            e.printStackTrace();
81
+            logger.error("taCustomerFollowUpRecordAdd -=- {}",e.toString());
82
+            responseBean.addError(e.getMessage());
83
+        }
84
+        return responseBean;
85
+    }
86
+
87
+    /**
88
+     * 根据id删除对象
89
+     * @param id  实体ID
90
+     */
91
+    @ResponseBody
92
+    @RequestMapping(value="/taCustomerFollowUpRecord/{id}", method= RequestMethod.DELETE)
93
+    public ResponseBean taCustomerFollowUpRecordDelete(@PathVariable Integer id){
94
+        ResponseBean responseBean = new ResponseBean();
95
+        try {
96
+            if(iTaCustomerFollowUpRecordService.removeById(id)){
97
+                responseBean.addSuccess("success");
98
+            }else {
99
+                responseBean.addError("fail");
100
+            }
101
+        }catch (Exception e){
102
+            e.printStackTrace();
103
+            logger.error("taCustomerFollowUpRecordDelete -=- {}",e.toString());
104
+            responseBean.addError(e.getMessage());
105
+        }
106
+        return responseBean;
107
+    }
108
+
109
+    /**
110
+     * 修改对象
111
+     * @param id  实体ID
112
+     * @param taCustomerFollowUpRecord 实体对象
113
+     * @return
114
+     */
115
+    @RequestMapping(value="/taCustomerFollowUpRecord/{id}",method= RequestMethod.PUT)
116
+    public ResponseBean taCustomerFollowUpRecordUpdate(@PathVariable Integer id,
117
+                                        @RequestBody TaCustomerFollowUpRecord taCustomerFollowUpRecord){
118
+        ResponseBean responseBean = new ResponseBean();
119
+        try {
120
+            if (iTaCustomerFollowUpRecordService.updateById(taCustomerFollowUpRecord)){
121
+                responseBean.addSuccess(taCustomerFollowUpRecord);
122
+            }else {
123
+                responseBean.addError("fail");
124
+            }
125
+        }catch (Exception e){
126
+            e.printStackTrace();
127
+            logger.error("taCustomerFollowUpRecordUpdate -=- {}",e.toString());
128
+            responseBean.addError(e.getMessage());
129
+        }
130
+        return responseBean;
131
+    }
132
+
133
+    /**
134
+     * 根据id查询对象
135
+     * @param id  实体ID
136
+     */
137
+    @RequestMapping(value="/taCustomerFollowUpRecord/{id}",method= RequestMethod.GET)
138
+    public ResponseBean taCustomerFollowUpRecordGet(@PathVariable Integer id){
139
+        ResponseBean responseBean = new ResponseBean();
140
+        try {
141
+            responseBean.addSuccess(iTaCustomerFollowUpRecordService.getById(id));
142
+        }catch (Exception e){
143
+            e.printStackTrace();
144
+            logger.error("taCustomerFollowUpRecordDelete -=- {}",e.toString());
145
+            responseBean.addError(e.getMessage());
146
+        }
147
+        return responseBean;
148
+    }
149
+}

+ 149
- 0
src/main/java/com/huiju/estateagents/statistic/controller/TaCustomerGenderStatisticController.java Voir le fichier

@@ -0,0 +1,149 @@
1
+package com.huiju.estateagents.statistic.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.base.BaseController;
7
+import com.huiju.estateagents.base.ResponseBean;
8
+import com.huiju.estateagents.statistic.entity.TaCustomerGenderStatistic;
9
+import com.huiju.estateagents.statistic.service.ITaCustomerGenderStatisticService;
10
+import org.slf4j.Logger;
11
+import org.slf4j.LoggerFactory;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.PathVariable;
14
+import org.springframework.web.bind.annotation.RequestBody;
15
+import org.springframework.web.bind.annotation.RequestMapping;
16
+import org.springframework.web.bind.annotation.RequestMethod;
17
+import org.springframework.web.bind.annotation.RequestParam;
18
+import org.springframework.web.bind.annotation.ResponseBody;
19
+import org.springframework.web.bind.annotation.RestController;
20
+
21
+/**
22
+ * <p>
23
+    * 客户分析性别统计表 小程序盘客工具客户分析 前端控制器
24
+    * </p>
25
+ *
26
+ * @author jobob
27
+ * @since 2019-11-08
28
+ */
29
+@RestController
30
+@RequestMapping("/")
31
+public class TaCustomerGenderStatisticController extends BaseController {
32
+
33
+    private final Logger logger = LoggerFactory.getLogger(TaCustomerGenderStatisticController.class);
34
+
35
+    @Autowired
36
+    public ITaCustomerGenderStatisticService iTaCustomerGenderStatisticService;
37
+
38
+
39
+    /**
40
+     * 分页查询列表
41
+     * @param pageNum
42
+     * @param pageSize
43
+     * @return
44
+     */
45
+    @RequestMapping(value="/taCustomerGenderStatistic",method= RequestMethod.GET)
46
+    public ResponseBean taCustomerGenderStatisticList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47
+                                                      @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
48
+        ResponseBean responseBean = new ResponseBean();
49
+        try {
50
+            //使用分页插件
51
+		    IPage<TaCustomerGenderStatistic> pg = new Page<>(pageNum, pageSize);
52
+            QueryWrapper<TaCustomerGenderStatistic> queryWrapper = new QueryWrapper<>();
53
+            queryWrapper.orderByDesc("create_date");
54
+
55
+            IPage<TaCustomerGenderStatistic> result = iTaCustomerGenderStatisticService.page(pg, queryWrapper);
56
+            responseBean.addSuccess(result);
57
+        }catch (Exception e){
58
+            e.printStackTrace();
59
+            logger.error("taCustomerGenderStatisticList -=- {}",e.toString());
60
+            responseBean.addError(e.getMessage());
61
+        }
62
+        return responseBean;
63
+    }
64
+
65
+    /**
66
+     * 保存对象
67
+     * @param taCustomerGenderStatistic 实体对象
68
+     * @return
69
+     */
70
+    @RequestMapping(value="/taCustomerGenderStatistic",method= RequestMethod.POST)
71
+    public ResponseBean taCustomerGenderStatisticAdd(@RequestBody TaCustomerGenderStatistic taCustomerGenderStatistic){
72
+        ResponseBean responseBean = new ResponseBean();
73
+        try {
74
+            if (iTaCustomerGenderStatisticService.save(taCustomerGenderStatistic)){
75
+                responseBean.addSuccess(taCustomerGenderStatistic);
76
+            }else {
77
+                responseBean.addError("fail");
78
+            }
79
+        }catch (Exception e){
80
+            e.printStackTrace();
81
+            logger.error("taCustomerGenderStatisticAdd -=- {}",e.toString());
82
+            responseBean.addError(e.getMessage());
83
+        }
84
+        return responseBean;
85
+    }
86
+
87
+    /**
88
+     * 根据id删除对象
89
+     * @param id  实体ID
90
+     */
91
+    @ResponseBody
92
+    @RequestMapping(value="/taCustomerGenderStatistic/{id}", method= RequestMethod.DELETE)
93
+    public ResponseBean taCustomerGenderStatisticDelete(@PathVariable Integer id){
94
+        ResponseBean responseBean = new ResponseBean();
95
+        try {
96
+            if(iTaCustomerGenderStatisticService.removeById(id)){
97
+                responseBean.addSuccess("success");
98
+            }else {
99
+                responseBean.addError("fail");
100
+            }
101
+        }catch (Exception e){
102
+            e.printStackTrace();
103
+            logger.error("taCustomerGenderStatisticDelete -=- {}",e.toString());
104
+            responseBean.addError(e.getMessage());
105
+        }
106
+        return responseBean;
107
+    }
108
+
109
+    /**
110
+     * 修改对象
111
+     * @param id  实体ID
112
+     * @param taCustomerGenderStatistic 实体对象
113
+     * @return
114
+     */
115
+    @RequestMapping(value="/taCustomerGenderStatistic/{id}",method= RequestMethod.PUT)
116
+    public ResponseBean taCustomerGenderStatisticUpdate(@PathVariable Integer id,
117
+                                        @RequestBody TaCustomerGenderStatistic taCustomerGenderStatistic){
118
+        ResponseBean responseBean = new ResponseBean();
119
+        try {
120
+            if (iTaCustomerGenderStatisticService.updateById(taCustomerGenderStatistic)){
121
+                responseBean.addSuccess(taCustomerGenderStatistic);
122
+            }else {
123
+                responseBean.addError("fail");
124
+            }
125
+        }catch (Exception e){
126
+            e.printStackTrace();
127
+            logger.error("taCustomerGenderStatisticUpdate -=- {}",e.toString());
128
+            responseBean.addError(e.getMessage());
129
+        }
130
+        return responseBean;
131
+    }
132
+
133
+    /**
134
+     * 根据id查询对象
135
+     * @param id  实体ID
136
+     */
137
+    @RequestMapping(value="/taCustomerGenderStatistic/{id}",method= RequestMethod.GET)
138
+    public ResponseBean taCustomerGenderStatisticGet(@PathVariable Integer id){
139
+        ResponseBean responseBean = new ResponseBean();
140
+        try {
141
+            responseBean.addSuccess(iTaCustomerGenderStatisticService.getById(id));
142
+        }catch (Exception e){
143
+            e.printStackTrace();
144
+            logger.error("taCustomerGenderStatisticDelete -=- {}",e.toString());
145
+            responseBean.addError(e.getMessage());
146
+        }
147
+        return responseBean;
148
+    }
149
+}

+ 149
- 0
src/main/java/com/huiju/estateagents/statistic/controller/TaCustomerStatisticDailyController.java Voir le fichier

@@ -0,0 +1,149 @@
1
+package com.huiju.estateagents.statistic.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.base.BaseController;
7
+import com.huiju.estateagents.base.ResponseBean;
8
+import com.huiju.estateagents.statistic.entity.TaCustomerStatisticDaily;
9
+import com.huiju.estateagents.statistic.service.ITaCustomerStatisticDailyService;
10
+import org.slf4j.Logger;
11
+import org.slf4j.LoggerFactory;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.PathVariable;
14
+import org.springframework.web.bind.annotation.RequestBody;
15
+import org.springframework.web.bind.annotation.RequestMapping;
16
+import org.springframework.web.bind.annotation.RequestMethod;
17
+import org.springframework.web.bind.annotation.RequestParam;
18
+import org.springframework.web.bind.annotation.ResponseBody;
19
+import org.springframework.web.bind.annotation.RestController;
20
+
21
+/**
22
+ * <p>
23
+    * 客户分析日统计表 小程序盘客工具客户分析 前端控制器
24
+    * </p>
25
+ *
26
+ * @author jobob
27
+ * @since 2019-11-08
28
+ */
29
+@RestController
30
+@RequestMapping("/")
31
+public class TaCustomerStatisticDailyController extends BaseController {
32
+
33
+    private final Logger logger = LoggerFactory.getLogger(TaCustomerStatisticDailyController.class);
34
+
35
+    @Autowired
36
+    public ITaCustomerStatisticDailyService iTaCustomerStatisticDailyService;
37
+
38
+
39
+    /**
40
+     * 分页查询列表
41
+     * @param pageNum
42
+     * @param pageSize
43
+     * @return
44
+     */
45
+    @RequestMapping(value="/taCustomerStatisticDaily",method= RequestMethod.GET)
46
+    public ResponseBean taCustomerStatisticDailyList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47
+                                                     @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
48
+        ResponseBean responseBean = new ResponseBean();
49
+        try {
50
+            //使用分页插件
51
+		    IPage<TaCustomerStatisticDaily> pg = new Page<>(pageNum, pageSize);
52
+            QueryWrapper<TaCustomerStatisticDaily> queryWrapper = new QueryWrapper<>();
53
+            queryWrapper.orderByDesc("create_date");
54
+
55
+            IPage<TaCustomerStatisticDaily> result = iTaCustomerStatisticDailyService.page(pg, queryWrapper);
56
+            responseBean.addSuccess(result);
57
+        }catch (Exception e){
58
+            e.printStackTrace();
59
+            logger.error("taCustomerStatisticDailyList -=- {}",e.toString());
60
+            responseBean.addError(e.getMessage());
61
+        }
62
+        return responseBean;
63
+    }
64
+
65
+    /**
66
+     * 保存对象
67
+     * @param taCustomerStatisticDaily 实体对象
68
+     * @return
69
+     */
70
+    @RequestMapping(value="/taCustomerStatisticDaily",method= RequestMethod.POST)
71
+    public ResponseBean taCustomerStatisticDailyAdd(@RequestBody TaCustomerStatisticDaily taCustomerStatisticDaily){
72
+        ResponseBean responseBean = new ResponseBean();
73
+        try {
74
+            if (iTaCustomerStatisticDailyService.save(taCustomerStatisticDaily)){
75
+                responseBean.addSuccess(taCustomerStatisticDaily);
76
+            }else {
77
+                responseBean.addError("fail");
78
+            }
79
+        }catch (Exception e){
80
+            e.printStackTrace();
81
+            logger.error("taCustomerStatisticDailyAdd -=- {}",e.toString());
82
+            responseBean.addError(e.getMessage());
83
+        }
84
+        return responseBean;
85
+    }
86
+
87
+    /**
88
+     * 根据id删除对象
89
+     * @param id  实体ID
90
+     */
91
+    @ResponseBody
92
+    @RequestMapping(value="/taCustomerStatisticDaily/{id}", method= RequestMethod.DELETE)
93
+    public ResponseBean taCustomerStatisticDailyDelete(@PathVariable Integer id){
94
+        ResponseBean responseBean = new ResponseBean();
95
+        try {
96
+            if(iTaCustomerStatisticDailyService.removeById(id)){
97
+                responseBean.addSuccess("success");
98
+            }else {
99
+                responseBean.addError("fail");
100
+            }
101
+        }catch (Exception e){
102
+            e.printStackTrace();
103
+            logger.error("taCustomerStatisticDailyDelete -=- {}",e.toString());
104
+            responseBean.addError(e.getMessage());
105
+        }
106
+        return responseBean;
107
+    }
108
+
109
+    /**
110
+     * 修改对象
111
+     * @param id  实体ID
112
+     * @param taCustomerStatisticDaily 实体对象
113
+     * @return
114
+     */
115
+    @RequestMapping(value="/taCustomerStatisticDaily/{id}",method= RequestMethod.PUT)
116
+    public ResponseBean taCustomerStatisticDailyUpdate(@PathVariable Integer id,
117
+                                        @RequestBody TaCustomerStatisticDaily taCustomerStatisticDaily){
118
+        ResponseBean responseBean = new ResponseBean();
119
+        try {
120
+            if (iTaCustomerStatisticDailyService.updateById(taCustomerStatisticDaily)){
121
+                responseBean.addSuccess(taCustomerStatisticDaily);
122
+            }else {
123
+                responseBean.addError("fail");
124
+            }
125
+        }catch (Exception e){
126
+            e.printStackTrace();
127
+            logger.error("taCustomerStatisticDailyUpdate -=- {}",e.toString());
128
+            responseBean.addError(e.getMessage());
129
+        }
130
+        return responseBean;
131
+    }
132
+
133
+    /**
134
+     * 根据id查询对象
135
+     * @param id  实体ID
136
+     */
137
+    @RequestMapping(value="/taCustomerStatisticDaily/{id}",method= RequestMethod.GET)
138
+    public ResponseBean taCustomerStatisticDailyGet(@PathVariable Integer id){
139
+        ResponseBean responseBean = new ResponseBean();
140
+        try {
141
+            responseBean.addSuccess(iTaCustomerStatisticDailyService.getById(id));
142
+        }catch (Exception e){
143
+            e.printStackTrace();
144
+            logger.error("taCustomerStatisticDailyDelete -=- {}",e.toString());
145
+            responseBean.addError(e.getMessage());
146
+        }
147
+        return responseBean;
148
+    }
149
+}

+ 149
- 0
src/main/java/com/huiju/estateagents/statistic/controller/TaCustomerStatisticMonthlyController.java Voir le fichier

@@ -0,0 +1,149 @@
1
+package com.huiju.estateagents.statistic.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.base.BaseController;
7
+import com.huiju.estateagents.base.ResponseBean;
8
+import com.huiju.estateagents.statistic.entity.TaCustomerStatisticMonthly;
9
+import com.huiju.estateagents.statistic.service.ITaCustomerStatisticMonthlyService;
10
+import org.slf4j.Logger;
11
+import org.slf4j.LoggerFactory;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.PathVariable;
14
+import org.springframework.web.bind.annotation.RequestBody;
15
+import org.springframework.web.bind.annotation.RequestMapping;
16
+import org.springframework.web.bind.annotation.RequestMethod;
17
+import org.springframework.web.bind.annotation.RequestParam;
18
+import org.springframework.web.bind.annotation.ResponseBody;
19
+import org.springframework.web.bind.annotation.RestController;
20
+
21
+/**
22
+ * <p>
23
+    * 客户分析月统计表 小程序盘客工具客户分析 前端控制器
24
+    * </p>
25
+ *
26
+ * @author jobob
27
+ * @since 2019-11-08
28
+ */
29
+@RestController
30
+@RequestMapping("/")
31
+public class TaCustomerStatisticMonthlyController extends BaseController {
32
+
33
+    private final Logger logger = LoggerFactory.getLogger(TaCustomerStatisticMonthlyController.class);
34
+
35
+    @Autowired
36
+    public ITaCustomerStatisticMonthlyService iTaCustomerStatisticMonthlyService;
37
+
38
+
39
+    /**
40
+     * 分页查询列表
41
+     * @param pageNum
42
+     * @param pageSize
43
+     * @return
44
+     */
45
+    @RequestMapping(value="/taCustomerStatisticMonthly",method= RequestMethod.GET)
46
+    public ResponseBean taCustomerStatisticMonthlyList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47
+                                                       @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
48
+        ResponseBean responseBean = new ResponseBean();
49
+        try {
50
+            //使用分页插件
51
+		    IPage<TaCustomerStatisticMonthly> pg = new Page<>(pageNum, pageSize);
52
+            QueryWrapper<TaCustomerStatisticMonthly> queryWrapper = new QueryWrapper<>();
53
+            queryWrapper.orderByDesc("create_date");
54
+
55
+            IPage<TaCustomerStatisticMonthly> result = iTaCustomerStatisticMonthlyService.page(pg, queryWrapper);
56
+            responseBean.addSuccess(result);
57
+        }catch (Exception e){
58
+            e.printStackTrace();
59
+            logger.error("taCustomerStatisticMonthlyList -=- {}",e.toString());
60
+            responseBean.addError(e.getMessage());
61
+        }
62
+        return responseBean;
63
+    }
64
+
65
+    /**
66
+     * 保存对象
67
+     * @param taCustomerStatisticMonthly 实体对象
68
+     * @return
69
+     */
70
+    @RequestMapping(value="/taCustomerStatisticMonthly",method= RequestMethod.POST)
71
+    public ResponseBean taCustomerStatisticMonthlyAdd(@RequestBody TaCustomerStatisticMonthly taCustomerStatisticMonthly){
72
+        ResponseBean responseBean = new ResponseBean();
73
+        try {
74
+            if (iTaCustomerStatisticMonthlyService.save(taCustomerStatisticMonthly)){
75
+                responseBean.addSuccess(taCustomerStatisticMonthly);
76
+            }else {
77
+                responseBean.addError("fail");
78
+            }
79
+        }catch (Exception e){
80
+            e.printStackTrace();
81
+            logger.error("taCustomerStatisticMonthlyAdd -=- {}",e.toString());
82
+            responseBean.addError(e.getMessage());
83
+        }
84
+        return responseBean;
85
+    }
86
+
87
+    /**
88
+     * 根据id删除对象
89
+     * @param id  实体ID
90
+     */
91
+    @ResponseBody
92
+    @RequestMapping(value="/taCustomerStatisticMonthly/{id}", method= RequestMethod.DELETE)
93
+    public ResponseBean taCustomerStatisticMonthlyDelete(@PathVariable Integer id){
94
+        ResponseBean responseBean = new ResponseBean();
95
+        try {
96
+            if(iTaCustomerStatisticMonthlyService.removeById(id)){
97
+                responseBean.addSuccess("success");
98
+            }else {
99
+                responseBean.addError("fail");
100
+            }
101
+        }catch (Exception e){
102
+            e.printStackTrace();
103
+            logger.error("taCustomerStatisticMonthlyDelete -=- {}",e.toString());
104
+            responseBean.addError(e.getMessage());
105
+        }
106
+        return responseBean;
107
+    }
108
+
109
+    /**
110
+     * 修改对象
111
+     * @param id  实体ID
112
+     * @param taCustomerStatisticMonthly 实体对象
113
+     * @return
114
+     */
115
+    @RequestMapping(value="/taCustomerStatisticMonthly/{id}",method= RequestMethod.PUT)
116
+    public ResponseBean taCustomerStatisticMonthlyUpdate(@PathVariable Integer id,
117
+                                        @RequestBody TaCustomerStatisticMonthly taCustomerStatisticMonthly){
118
+        ResponseBean responseBean = new ResponseBean();
119
+        try {
120
+            if (iTaCustomerStatisticMonthlyService.updateById(taCustomerStatisticMonthly)){
121
+                responseBean.addSuccess(taCustomerStatisticMonthly);
122
+            }else {
123
+                responseBean.addError("fail");
124
+            }
125
+        }catch (Exception e){
126
+            e.printStackTrace();
127
+            logger.error("taCustomerStatisticMonthlyUpdate -=- {}",e.toString());
128
+            responseBean.addError(e.getMessage());
129
+        }
130
+        return responseBean;
131
+    }
132
+
133
+    /**
134
+     * 根据id查询对象
135
+     * @param id  实体ID
136
+     */
137
+    @RequestMapping(value="/taCustomerStatisticMonthly/{id}",method= RequestMethod.GET)
138
+    public ResponseBean taCustomerStatisticMonthlyGet(@PathVariable Integer id){
139
+        ResponseBean responseBean = new ResponseBean();
140
+        try {
141
+            responseBean.addSuccess(iTaCustomerStatisticMonthlyService.getById(id));
142
+        }catch (Exception e){
143
+            e.printStackTrace();
144
+            logger.error("taCustomerStatisticMonthlyDelete -=- {}",e.toString());
145
+            responseBean.addError(e.getMessage());
146
+        }
147
+        return responseBean;
148
+    }
149
+}

+ 62
- 0
src/main/java/com/huiju/estateagents/statistic/entity/TaCustomerFollowUpRecord.java Voir le fichier

@@ -0,0 +1,62 @@
1
+package com.huiju.estateagents.statistic.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import lombok.Data;
6
+import lombok.EqualsAndHashCode;
7
+import lombok.experimental.Accessors;
8
+
9
+import java.io.Serializable;
10
+import java.time.LocalDateTime;
11
+
12
+/**
13
+ * <p>
14
+ * 跟进记录表 小程序盘客工具我的客户跟进记录信息
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-11-08
19
+ */
20
+@Data
21
+@EqualsAndHashCode(callSuper = false)
22
+@Accessors(chain = true)
23
+public class TaCustomerFollowUpRecord implements Serializable {
24
+
25
+    private static final long serialVersionUID = 1L;
26
+
27
+    /**
28
+     * 主键ID
29
+     */
30
+    @TableId(value = "follow_up_record_id", type = IdType.AUTO)
31
+    private Integer followUpRecordId;
32
+
33
+    /**
34
+     * 公司id
35
+     */
36
+    private Integer orgId;
37
+
38
+    /**
39
+     * 创建时间
40
+     */
41
+    private LocalDateTime createDate;
42
+
43
+    /**
44
+     * 客户ID
45
+     */
46
+    private String customerId;
47
+
48
+    /**
49
+     * 记录类型
50
+     */
51
+    private String recordType;
52
+
53
+    /**
54
+     * 记录内容
55
+     */
56
+    private String recordContent;
57
+    
58
+    /**
59
+     * 跟进人ID
60
+     */
61
+    private Integer followerId;
62
+}

+ 67
- 0
src/main/java/com/huiju/estateagents/statistic/entity/TaCustomerGenderStatistic.java Voir le fichier

@@ -0,0 +1,67 @@
1
+package com.huiju.estateagents.statistic.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import lombok.Data;
6
+import lombok.EqualsAndHashCode;
7
+import lombok.experimental.Accessors;
8
+
9
+import java.io.Serializable;
10
+import java.time.LocalDateTime;
11
+
12
+/**
13
+ * <p>
14
+ * 客户分析性别统计表 小程序盘客工具客户分析
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-11-08
19
+ */
20
+@Data
21
+@EqualsAndHashCode(callSuper = false)
22
+@Accessors(chain = true)
23
+public class TaCustomerGenderStatistic implements Serializable {
24
+
25
+    private static final long serialVersionUID = 1L;
26
+
27
+    /**
28
+     * 主键ID
29
+     */
30
+    @TableId(value = "customer_gender_statistic_id", type = IdType.AUTO)
31
+    private Integer customerGenderStatisticId;
32
+
33
+    /**
34
+     * 公司id
35
+     */
36
+    private Integer orgId;
37
+
38
+    /**
39
+     * 性别类型 1男2女3未知
40
+     */
41
+    private Integer genderType;
42
+
43
+    /**
44
+     * 客户人数
45
+     */
46
+    private Integer customerNum;
47
+
48
+    /**
49
+     * 百分比 百分比
50
+     */
51
+    private Integer percentage;
52
+
53
+    /**
54
+     * 创建时间
55
+     */
56
+    private LocalDateTime createDate;
57
+
58
+    /**
59
+     * 更新时间
60
+     */
61
+    private LocalDateTime updateDate;
62
+    
63
+    /**
64
+     * 客户类型 visite 到访客户, new 新增客户 ,follow跟进客户
65
+     */
66
+    private String customerType;
67
+}

+ 56
- 0
src/main/java/com/huiju/estateagents/statistic/entity/TaCustomerStatisticDaily.java Voir le fichier

@@ -0,0 +1,56 @@
1
+package com.huiju.estateagents.statistic.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+import java.io.Serializable;
11
+import java.time.LocalDateTime;
12
+
13
+/**
14
+ * <p>
15
+ * 客户分析日统计表 小程序盘客工具客户分析
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2019-11-08
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("ta_customer_statistic_daily")
25
+public class TaCustomerStatisticDaily implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    /**
30
+     * 主键ID
31
+     */
32
+    @TableId(value = "customer_statistic_daily_id", type = IdType.AUTO)
33
+    private Integer customerStatisticDailyId;
34
+
35
+    /**
36
+     * 公司id
37
+     */
38
+    private Integer orgId;
39
+
40
+    /**
41
+     * 客户数量
42
+     */
43
+    private Integer customerNum;
44
+
45
+    /**
46
+     * 客户类型 visite 到访客户, new 新增客户 ,follow跟进客户
47
+     */
48
+    private String customerType;
49
+
50
+    /**
51
+     * 创建时间
52
+     */
53
+    private LocalDateTime createDate;
54
+
55
+
56
+}

+ 66
- 0
src/main/java/com/huiju/estateagents/statistic/entity/TaCustomerStatisticMonthly.java Voir le fichier

@@ -0,0 +1,66 @@
1
+package com.huiju.estateagents.statistic.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+import java.io.Serializable;
11
+import java.time.LocalDateTime;
12
+
13
+/**
14
+ * <p>
15
+ * 客户分析月统计表 小程序盘客工具客户分析
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2019-11-08
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@TableName("ta_customer_statistic_monthly")
25
+public class TaCustomerStatisticMonthly implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    /**
30
+     * 主键ID
31
+     */
32
+    @TableId(value = "customer_statistic_monthly_id", type = IdType.AUTO)
33
+    private Integer customerStatisticMonthlyId;
34
+
35
+    /**
36
+     * 公司id
37
+     */
38
+    private Integer orgId;
39
+
40
+    /**
41
+     * 客户数量
42
+     */
43
+    private Integer customerNum;
44
+
45
+    /**
46
+     * 客户类型 visite 到访客户, new 新增客户 ,follow跟进客户
47
+     */
48
+    private String customerType;
49
+
50
+    /**
51
+     * 月份 格式yyyymm例201911
52
+     */
53
+    private String month;
54
+
55
+    /**
56
+     * 创建时间
57
+     */
58
+    private LocalDateTime createDate;
59
+
60
+    /**
61
+     * 更新时间
62
+     */
63
+    private LocalDateTime updateDate;
64
+
65
+
66
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/statistic/mapper/TaCustomerFollowUpRecordMapper.java Voir le fichier

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.statistic.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.statistic.entity.TaCustomerFollowUpRecord;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 跟进记录表 小程序盘客工具我的客户跟进记录信息 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-11-08
14
+ */
15
+@Mapper
16
+public interface TaCustomerFollowUpRecordMapper extends BaseMapper<TaCustomerFollowUpRecord> {
17
+
18
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/statistic/mapper/TaCustomerGenderStatisticMapper.java Voir le fichier

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.statistic.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.statistic.entity.TaCustomerGenderStatistic;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 客户分析性别统计表 小程序盘客工具客户分析 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-11-08
14
+ */
15
+@Mapper
16
+public interface TaCustomerGenderStatisticMapper extends BaseMapper<TaCustomerGenderStatistic> {
17
+
18
+}

+ 45
- 0
src/main/java/com/huiju/estateagents/statistic/mapper/TaCustomerStatisticDailyMapper.java Voir le fichier

@@ -0,0 +1,45 @@
1
+package com.huiju.estateagents.statistic.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.statistic.entity.TaCustomerStatisticDaily;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+import java.time.LocalDateTime;
9
+import java.util.List;
10
+import java.util.Map;
11
+
12
+/**
13
+ * <p>
14
+ * 客户分析日统计表 小程序盘客工具客户分析 Mapper 接口
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-11-08
19
+ */
20
+@Mapper
21
+public interface TaCustomerStatisticDailyMapper extends BaseMapper<TaCustomerStatisticDaily> {
22
+	
23
+	/**
24
+	 * 获取当天跟进客户数
25
+	 * @param nowDate
26
+	 * @return
27
+	 */
28
+	List<TaCustomerStatisticDaily> getFollowUpData(@Param("nowDate") LocalDateTime nowDate);
29
+	
30
+	/**
31
+	 * 获取当天新增客户数
32
+	 * @param nowDate
33
+	 * @param status
34
+	 * @return
35
+	 */
36
+	List<TaCustomerStatisticDaily> getNewCustomerData(@Param("nowDate") LocalDateTime nowDate,@Param("status") int status);
37
+	
38
+	/**
39
+	 * 获取当天到访客户数
40
+	 * @param nowDate
41
+	 * @param checkin
42
+	 * @return
43
+	 */
44
+	List<TaCustomerStatisticDaily> getVisiteCustomerData(@Param("nowDate") LocalDateTime nowDate,@Param("checkin") int checkin);
45
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/statistic/mapper/TaCustomerStatisticMonthlyMapper.java Voir le fichier

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.statistic.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.statistic.entity.TaCustomerStatisticMonthly;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 客户分析月统计表 小程序盘客工具客户分析 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-11-08
14
+ */
15
+@Mapper
16
+public interface TaCustomerStatisticMonthlyMapper extends BaseMapper<TaCustomerStatisticMonthly> {
17
+
18
+}

+ 16
- 0
src/main/java/com/huiju/estateagents/statistic/service/ITaCustomerFollowUpRecordService.java Voir le fichier

@@ -0,0 +1,16 @@
1
+package com.huiju.estateagents.statistic.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.huiju.estateagents.statistic.entity.TaCustomerFollowUpRecord;
5
+
6
+/**
7
+ * <p>
8
+ * 跟进记录表 小程序盘客工具我的客户跟进记录信息 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-11-08
13
+ */
14
+public interface ITaCustomerFollowUpRecordService extends IService<TaCustomerFollowUpRecord> {
15
+
16
+}

+ 35
- 0
src/main/java/com/huiju/estateagents/statistic/service/ITaCustomerGenderStatisticService.java Voir le fichier

@@ -0,0 +1,35 @@
1
+package com.huiju.estateagents.statistic.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.huiju.estateagents.statistic.entity.TaCustomerGenderStatistic;
5
+
6
+import java.time.LocalDateTime;
7
+
8
+/**
9
+ * <p>
10
+ * 客户分析性别统计表 小程序盘客工具客户分析 服务类
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-11-08
15
+ */
16
+public interface ITaCustomerGenderStatisticService extends IService<TaCustomerGenderStatistic> {
17
+	
18
+	/**
19
+	 * 每天的新增客户性别统计
20
+	 * @param nowDate
21
+	 */
22
+	void newCustomerSexStatisticDaily(LocalDateTime nowDate);
23
+	
24
+	/**
25
+	 * 每天的跟进客户性别统计
26
+	 * @param nowDate
27
+	 */
28
+	void followUpSexStatisticDaily(LocalDateTime nowDate);
29
+	
30
+	/**
31
+	 * 每天的到访客户性别统计
32
+	 * @param nowDate
33
+	 */
34
+	void visiteSexStatisticDaily(LocalDateTime nowDate);
35
+}

+ 35
- 0
src/main/java/com/huiju/estateagents/statistic/service/ITaCustomerStatisticDailyService.java Voir le fichier

@@ -0,0 +1,35 @@
1
+package com.huiju.estateagents.statistic.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.huiju.estateagents.statistic.entity.TaCustomerStatisticDaily;
5
+
6
+import java.time.LocalDateTime;
7
+
8
+/**
9
+ * <p>
10
+ * 客户分析日统计表 小程序盘客工具客户分析 服务类
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-11-08
15
+ */
16
+public interface ITaCustomerStatisticDailyService extends IService<TaCustomerStatisticDaily> {
17
+	
18
+	/**
19
+	 * 每天的跟进客户统计
20
+	 * @param nowDate
21
+	 */
22
+	void followUpStatisticDaily(LocalDateTime nowDate);
23
+	
24
+	/**
25
+	 * 每天的新增客户统计
26
+	 * @param nowDate
27
+	 */
28
+	void newCustomerStatisticDaily(LocalDateTime nowDate);
29
+	
30
+	/**
31
+	 * 每天的到访客户统计
32
+	 * @param nowDate
33
+	 */
34
+	void visiteStatisticDaily(LocalDateTime nowDate);
35
+}

+ 16
- 0
src/main/java/com/huiju/estateagents/statistic/service/ITaCustomerStatisticMonthlyService.java Voir le fichier

@@ -0,0 +1,16 @@
1
+package com.huiju.estateagents.statistic.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.huiju.estateagents.statistic.entity.TaCustomerStatisticMonthly;
5
+
6
+/**
7
+ * <p>
8
+ * 客户分析月统计表 小程序盘客工具客户分析 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-11-08
13
+ */
14
+public interface ITaCustomerStatisticMonthlyService extends IService<TaCustomerStatisticMonthly> {
15
+
16
+}

+ 20
- 0
src/main/java/com/huiju/estateagents/statistic/service/impl/TaCustomerFollowUpRecordServiceImpl.java Voir le fichier

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.statistic.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.huiju.estateagents.statistic.entity.TaCustomerFollowUpRecord;
5
+import com.huiju.estateagents.statistic.mapper.TaCustomerFollowUpRecordMapper;
6
+import com.huiju.estateagents.statistic.service.ITaCustomerFollowUpRecordService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 跟进记录表 小程序盘客工具我的客户跟进记录信息 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-11-08
16
+ */
17
+@Service
18
+public class TaCustomerFollowUpRecordServiceImpl extends ServiceImpl<TaCustomerFollowUpRecordMapper, TaCustomerFollowUpRecord> implements ITaCustomerFollowUpRecordService {
19
+
20
+}

+ 55
- 0
src/main/java/com/huiju/estateagents/statistic/service/impl/TaCustomerGenderStatisticServiceImpl.java Voir le fichier

@@ -0,0 +1,55 @@
1
+package com.huiju.estateagents.statistic.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.huiju.estateagents.statistic.entity.TaCustomerGenderStatistic;
5
+import com.huiju.estateagents.statistic.mapper.TaCustomerGenderStatisticMapper;
6
+import com.huiju.estateagents.statistic.service.ITaCustomerGenderStatisticService;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.stereotype.Service;
9
+
10
+import java.time.LocalDateTime;
11
+
12
+/**
13
+ * <p>
14
+ * 客户分析性别统计表 小程序盘客工具客户分析 服务实现类
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-11-08
19
+ */
20
+@Service
21
+public class TaCustomerGenderStatisticServiceImpl extends ServiceImpl<TaCustomerGenderStatisticMapper, TaCustomerGenderStatistic> implements ITaCustomerGenderStatisticService {
22
+	
23
+	@Autowired
24
+	private TaCustomerGenderStatisticMapper customerGenderStatisticMapper;
25
+	
26
+	/**
27
+	 * 每天的新增客户性别统计
28
+	 *
29
+	 * @param nowDate
30
+	 */
31
+	@Override
32
+	public void newCustomerSexStatisticDaily(LocalDateTime nowDate) {
33
+	
34
+	}
35
+	
36
+	/**
37
+	 * 每天的跟进客户性别统计
38
+	 *
39
+	 * @param nowDate
40
+	 */
41
+	@Override
42
+	public void followUpSexStatisticDaily(LocalDateTime nowDate) {
43
+	
44
+	}
45
+	
46
+	/**
47
+	 * 每天的到访客户性别统计
48
+	 *
49
+	 * @param nowDate
50
+	 */
51
+	@Override
52
+	public void visiteSexStatisticDaily(LocalDateTime nowDate) {
53
+	
54
+	}
55
+}

+ 90
- 0
src/main/java/com/huiju/estateagents/statistic/service/impl/TaCustomerStatisticDailyServiceImpl.java Voir le fichier

@@ -0,0 +1,90 @@
1
+package com.huiju.estateagents.statistic.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.huiju.estateagents.common.CommConstant;
5
+import com.huiju.estateagents.common.StringUtils;
6
+import com.huiju.estateagents.statistic.entity.TaCustomerStatisticDaily;
7
+import com.huiju.estateagents.statistic.mapper.TaCustomerStatisticDailyMapper;
8
+import com.huiju.estateagents.statistic.service.ITaCustomerStatisticDailyService;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.stereotype.Service;
11
+
12
+import java.time.LocalDateTime;
13
+import java.util.ArrayList;
14
+import java.util.List;
15
+import java.util.Map;
16
+
17
+/**
18
+ * <p>
19
+ * 客户分析日统计表 小程序盘客工具客户分析 服务实现类
20
+ * </p>
21
+ *
22
+ * @author jobob
23
+ * @since 2019-11-08
24
+ */
25
+@Service
26
+public class TaCustomerStatisticDailyServiceImpl extends ServiceImpl<TaCustomerStatisticDailyMapper, TaCustomerStatisticDaily> implements ITaCustomerStatisticDailyService {
27
+	
28
+	@Autowired
29
+	private TaCustomerStatisticDailyMapper customerStatisticDailyMapper;
30
+	
31
+	/**
32
+	 * 每天的跟进客户统计
33
+	 *
34
+	 * @param nowDate
35
+	 */
36
+	@Override
37
+	public void followUpStatisticDaily(LocalDateTime nowDate) {
38
+		//按当前时间获取当天的跟进客户的数量,多一个客户进行多次跟进行为,只记录一次
39
+		List<TaCustomerStatisticDaily> list = customerStatisticDailyMapper.getFollowUpData(nowDate);
40
+		//批量保存
41
+		statisticDailySaveBatch(list,nowDate,CommConstant.CUSTOMER_TYPE_FOLLOW);
42
+	}
43
+	
44
+	/**
45
+	 * 每天的新增客户统计
46
+	 *
47
+	 * @param nowDate
48
+	 */
49
+	@Override
50
+	public void newCustomerStatisticDaily(LocalDateTime nowDate) {
51
+		//按当前时间获取当天的新增客户的数量,ta_recommend_customer 表的status 为1 的就是新增客户
52
+		List<TaCustomerStatisticDaily> list = customerStatisticDailyMapper.getNewCustomerData(nowDate,CommConstant.STATUS_NORMAL);
53
+		//批量保存
54
+		statisticDailySaveBatch(list,nowDate,CommConstant.CUSTOMER_TYPE_NEW);
55
+	}
56
+	
57
+	/**
58
+	 * 每天的到访客户统计
59
+	 *
60
+	 * @param nowDate
61
+	 */
62
+	@Override
63
+	public void visiteStatisticDaily(LocalDateTime nowDate) {
64
+		//按当前时间获取当天的到访客户的数量,同一天同一个项目只记录一次
65
+		List<TaCustomerStatisticDaily> list = customerStatisticDailyMapper.getVisiteCustomerData(nowDate,CommConstant.STATUS_NORMAL);
66
+		List<TaCustomerStatisticDaily> saveList = new ArrayList<>();
67
+		list.forEach(e -> {
68
+			if (null != e.getOrgId() && !e.getOrgId().equals("null")){
69
+				saveList.add(e);
70
+			}
71
+		});
72
+		//批量保存
73
+		statisticDailySaveBatch(saveList,nowDate,CommConstant.CUSTOMER_TYPE_VISITE);
74
+	}
75
+	
76
+	/**
77
+	 * 批量保存当天的统计数据
78
+	 * @param list
79
+	 * @param nowDate
80
+	 * @param customerType
81
+	 */
82
+	private void statisticDailySaveBatch(List<TaCustomerStatisticDaily> list, LocalDateTime nowDate, String customerType) {
83
+		list.forEach(e -> {
84
+			e.setCreateDate(nowDate);
85
+			e.setCustomerType(customerType);
86
+		});
87
+		//批量保存
88
+		this.saveBatch(list);
89
+	}
90
+}

+ 20
- 0
src/main/java/com/huiju/estateagents/statistic/service/impl/TaCustomerStatisticMonthlyServiceImpl.java Voir le fichier

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.statistic.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.huiju.estateagents.statistic.entity.TaCustomerStatisticMonthly;
5
+import com.huiju.estateagents.statistic.mapper.TaCustomerStatisticMonthlyMapper;
6
+import com.huiju.estateagents.statistic.service.ITaCustomerStatisticMonthlyService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 客户分析月统计表 小程序盘客工具客户分析 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-11-08
16
+ */
17
+@Service
18
+public class TaCustomerStatisticMonthlyServiceImpl extends ServiceImpl<TaCustomerStatisticMonthlyMapper, TaCustomerStatisticMonthly> implements ITaCustomerStatisticMonthlyService {
19
+
20
+}

+ 1
- 1
src/main/resources/application-demo.yml Voir le fichier

@@ -22,7 +22,7 @@ mybatis-plus:
22 22
   configuration:
23 23
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
24 24
     call-setters-on-nulls: true
25
-  mapper-locations: classpath:mapper/*.xml
25
+  mapper-locations: classpath:mapper/**/*.xml
26 26
 wx:
27 27
   miniapp:
28 28
     appid: wx65d61e127ed35d5e

+ 1
- 1
src/main/resources/application-dev.yml Voir le fichier

@@ -22,7 +22,7 @@ mybatis-plus:
22 22
   configuration:
23 23
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
24 24
     call-setters-on-nulls: true
25
-  mapper-locations: classpath:mapper/*.xml
25
+  mapper-locations: classpath:mapper/**/*.xml
26 26
 wx:
27 27
   miniapp:
28 28
     appid: wxd6f47a9bb3052175

+ 1
- 1
src/main/resources/application-gzysd.yml Voir le fichier

@@ -22,7 +22,7 @@ mybatis-plus:
22 22
   configuration:
23 23
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
24 24
     call-setters-on-nulls: true
25
-  mapper-locations: classpath:mapper/*.xml
25
+  mapper-locations: classpath:mapper/**/*.xml
26 26
 wx:
27 27
   miniapp:
28 28
     appid: wxe3b1e683853800b5

+ 1
- 1
src/main/resources/application-nj.yml Voir le fichier

@@ -22,7 +22,7 @@ mybatis-plus:
22 22
   configuration:
23 23
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
24 24
     call-setters-on-nulls: true
25
-  mapper-locations: classpath:mapper/*.xml
25
+  mapper-locations: classpath:mapper/**/*.xml
26 26
 wx:
27 27
   miniapp:
28 28
     appid: wx1a3e5f7d0139285e

+ 1
- 1
src/main/resources/application-prod.yml Voir le fichier

@@ -22,7 +22,7 @@ mybatis-plus:
22 22
   configuration:
23 23
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
24 24
     call-setters-on-nulls: true
25
-  mapper-locations: classpath:mapper/*.xml
25
+  mapper-locations: classpath:mapper/**/*.xml
26 26
 wx:
27 27
   miniapp:
28 28
     appid: wxd6f47a9bb3052175

+ 1
- 1
src/main/resources/application-test.yml Voir le fichier

@@ -22,7 +22,7 @@ mybatis-plus:
22 22
   configuration:
23 23
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
24 24
     call-setters-on-nulls: true
25
-  mapper-locations: classpath:mapper/*.xml
25
+  mapper-locations: classpath:mapper/**/*.xml
26 26
 wx:
27 27
   miniapp:
28 28
     appid: wxc56decdcbc64d8de

+ 1
- 1
src/main/resources/application-v3.yml Voir le fichier

@@ -22,7 +22,7 @@ mybatis-plus:
22 22
   configuration:
23 23
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
24 24
     call-setters-on-nulls: true
25
-  mapper-locations: classpath:mapper/*.xml
25
+  mapper-locations: classpath:mapper/**/*.xml
26 26
 
27 27
 ali:
28 28
   accessKeyId: LTAIkc75dpkJw8Lb

+ 1
- 1
src/main/resources/application-xs.yml Voir le fichier

@@ -22,7 +22,7 @@ mybatis-plus:
22 22
   configuration:
23 23
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
24 24
     call-setters-on-nulls: true
25
-  mapper-locations: classpath:mapper/*.xml
25
+  mapper-locations: classpath:mapper/**/*.xml
26 26
 wx:
27 27
   miniapp:
28 28
     appid: wx09cd665abf378db7

+ 5
- 0
src/main/resources/mapper/statistic/TaCustomerFollowUpRecordMapper.xml Voir le fichier

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.huiju.estateagents.statistic.mapper.TaCustomerFollowUpRecordMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/statistic/TaCustomerGenderStatisticMapper.xml Voir le fichier

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.huiju.estateagents.statistic.mapper.TaCustomerGenderStatisticMapper">
4
+
5
+</mapper>

+ 44
- 0
src/main/resources/mapper/statistic/TaCustomerStatisticDailyMapper.xml Voir le fichier

@@ -0,0 +1,44 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.huiju.estateagents.statistic.mapper.TaCustomerStatisticDailyMapper">
4
+
5
+    <select id="getFollowUpData" resultType="com.huiju.estateagents.statistic.entity.TaCustomerStatisticDaily">
6
+        SELECT
7
+            org_id,
8
+            count( DISTINCT ( customer_id ) ) as customer_num
9
+        FROM
10
+            ta_customer_follow_up_record
11
+        WHERE
12
+            date_format( create_date, '%Y-%m-%d' ) = date_format( #{nowDate}, '%Y-%m-%d' )
13
+        GROUP BY
14
+            org_id
15
+    </select>
16
+
17
+    <select id="getNewCustomerData" resultType="com.huiju.estateagents.statistic.entity.TaCustomerStatisticDaily">
18
+        SELECT
19
+            org_id,
20
+            count( customer_id ) as customer_num
21
+        FROM
22
+            ta_recommend_customer
23
+        WHERE
24
+            `STATUS` = #{status}
25
+            AND date_format( create_date, '%Y-%m-%d' ) = date_format( #{nowDate}, '%Y-%m-%d' )
26
+        GROUP BY
27
+            org_id
28
+    </select>
29
+    <select id="getVisiteCustomerData" resultType="com.huiju.estateagents.statistic.entity.TaCustomerStatisticDaily">
30
+        SELECT
31
+            count( DISTINCT ( c.customer_id ) ) as customer_num,
32
+            c.org_id
33
+        FROM
34
+            ta_activity_dynamic_enlist t
35
+            LEFT JOIN ta_recommend_customer c ON t.person_id = c.person_id
36
+            AND t.building_id = c.building_id
37
+            AND t.org_id = c.org_id
38
+        WHERE
39
+            t.is_checkin = #{checkin}
40
+            AND date_format( t.create_date, '%Y-%m-%d' ) = date_format( #{nowDate}, '%Y-%m-%d' )
41
+        GROUP BY
42
+            c.org_id
43
+    </select>
44
+</mapper>

+ 5
- 0
src/main/resources/mapper/statistic/TaCustomerStatisticMonthlyMapper.xml Voir le fichier

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.huiju.estateagents.statistic.mapper.TaCustomerStatisticMonthlyMapper">
4
+
5
+</mapper>