Преглед изворни кода

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents into dev

傅行帆 пре 5 година
родитељ
комит
3bbbf5d188

+ 8
- 8
src/main/java/com/huiju/estateagents/controller/TaPersonVisitRecordController.java Прегледај датотеку

@@ -272,14 +272,14 @@ public class TaPersonVisitRecordController extends BaseController {
272 272
     @RequestMapping(value = "/wx/activityVisitRecord", method = RequestMethod.GET)
273 273
     public ResponseBean wxPersonActivityVisitRecordList(@RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
274 274
                                                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
275
-                                                        @RequestParam(value = "userId") Integer userId,
275
+                                                        @RequestParam(value = "personId") String personId,
276 276
                                                         @RequestParam(value = "targetId") String targetId,
277 277
                                                         @RequestParam(value = "eventType") String eventType,
278 278
                                                         HttpServletRequest request) {
279 279
         try {
280 280
             //使用分页插件
281 281
             IPage<TaPersonVisitRecord> pg = new Page<>(pageNumber, pageSize);
282
-            IPage<TaPersonVisitRecord> result = iTaPersonVisitRecordService.getWxActivityVisitRecordList(pg, userId, getOrgId(request), targetId, eventType);
282
+            IPage<TaPersonVisitRecord> result = iTaPersonVisitRecordService.getWxActivityVisitRecordList(pg, personId, getOrgId(request), targetId, eventType);
283 283
             return ResponseBean.success(result);
284 284
         } catch (Exception e) {
285 285
             e.printStackTrace();
@@ -293,29 +293,29 @@ public class TaPersonVisitRecordController extends BaseController {
293 293
      *
294 294
      * @param pageNumber
295 295
      * @param pageSize
296
-     * @param userId
296
+     * @param personId
297 297
      * @param request
298 298
      * @return
299 299
      */
300 300
     @RequestMapping(value = "/wx/shareRecords", method = RequestMethod.GET)
301 301
     public ResponseBean wxShareRecordsByUserId(@RequestParam(value = "pageNumber", defaultValue = "1") Integer pageNumber,
302 302
                                                @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
303
-                                               @RequestParam(value = "userId") Integer userId,
303
+                                               @RequestParam(value = "personId") String personId,
304 304
                                                HttpServletRequest request) {
305 305
         ResponseBean responseBean = new ResponseBean();
306
-        if (userId == null) {
306
+        if (personId == null) {
307 307
             return responseBean;
308 308
         }
309 309
         //使用分页插件
310 310
         IPage<TaConsultantInfo> pg = new Page<>(pageNumber, pageSize);
311 311
         QueryWrapper<TaPerson> taPersonQueryWrapper = new QueryWrapper<>();
312
-        taPersonQueryWrapper.eq("user_id", userId);
312
+        taPersonQueryWrapper.eq("person_id", personId);
313 313
         TaPerson taPerson = taPersonService.getOne(taPersonQueryWrapper);
314
-        IPage<TaConsultantInfo> result = iTaPersonVisitRecordService.getConsultantShareInfoList(pg, taPerson.getPersonId());
314
+        IPage<TaConsultantInfo> result = iTaPersonVisitRecordService.getConsultantShareInfoList(pg, personId);
315 315
 
316 316
         List<TaConsultantInfo> taConsultantInfos = result.getRecords();
317 317
         taConsultantInfos.forEach(e -> {
318
-            Integer shareNum = iTaPersonVisitRecordService.countShareNumByEventType(getOrgId(request), e.getTargetId(), userId, taPerson.getPersonId(), (CommConstant.FAVOR_PROJECT.equals(e.getEventType()) ? "building" : CommConstant.FAVOR_ACTIVITY.equals(e.getEventType()) ? "dynamic" : e.getEventType()) + "_share");
318
+            Integer shareNum = iTaPersonVisitRecordService.countShareNumByEventType(getOrgId(request), e.getTargetId(), taPerson.getUserId(), taPerson.getPersonId(), (CommConstant.FAVOR_PROJECT.equals(e.getEventType()) ? "building" : CommConstant.FAVOR_ACTIVITY.equals(e.getEventType()) ? "dynamic" : e.getEventType()) + "_share");
319 319
             switch (e.getEventType()) {
320 320
                 case CommConstant.FAVOR_ACTIVITY:
321 321
                     e.setActivityShareNum(shareNum);

+ 14
- 14
src/main/java/com/huiju/estateagents/excel/PrivateCustomerExport.java Прегледај датотеку

@@ -14,21 +14,21 @@ public class PrivateCustomerExport {
14 14
      * 姓名
15 15
      */
16 16
     @ColumnWidth(15)
17
-    @ExcelProperty(value = "姓名", index = 0)
17
+    @ExcelProperty(value = "客户昵称", index = 0)
18 18
     private String name;
19 19
 
20 20
     /**
21 21
      * 电话
22 22
      */
23 23
     @ColumnWidth(15)
24
-    @ExcelProperty(value = "电话", index = 1)
24
+    @ExcelProperty(value = "手机号码", index = 1)
25 25
     private String phone;
26 26
 
27 27
     /**
28 28
      * 性别
29 29
      */
30 30
     @ColumnWidth(15)
31
-    @ExcelProperty(value = "性别", index = 2)
31
+    @ExcelProperty(value = "性别", index = 9)
32 32
     private String sex;
33 33
 
34 34
     /**
@@ -56,34 +56,34 @@ public class PrivateCustomerExport {
56 56
      * 用户注册时间
57 57
      */
58 58
     @ColumnWidth(15)
59
-    @ExcelProperty(value = "关注时间", index = 6)
59
+    @ExcelProperty(value = "关注时间(用户注册时间)", index = 2)
60 60
     private String createDate;
61 61
 
62 62
     /**
63 63
      * 国家
64 64
      */
65 65
     @ColumnWidth(15)
66
-    @ExcelProperty(value = "国家", index = 7)
67
-    private String country;
68
-
69
-    /**
70
-     * 省份
71
-     */
72
-    @ColumnWidth(15)
73
-    @ExcelProperty(value = "省份", index = 8)
66
+    @ExcelProperty(value = "归属地", index = 6)
74 67
     private String province;
75 68
 
69
+//    /**
70
+//     * 省份
71
+//     */
72
+//    @ColumnWidth(15)
73
+//    @ExcelProperty(value = "省份", index = 8)
74
+//    private String province;
75
+
76 76
     /**
77 77
      * 来访方式
78 78
      */
79 79
     @ColumnWidth(15)
80
-    @ExcelProperty(value = "来访方式", index = 9)
80
+    @ExcelProperty(value = "来访方式(场景渠道)", index = 7)
81 81
     private String sceneType;
82 82
 
83 83
     /**
84 84
      * 意向度
85 85
      */
86 86
     @ColumnWidth(15)
87
-    @ExcelProperty(value = "意向度", index = 10)
87
+    @ExcelProperty(value = "意向度(意向值)", index = 8)
88 88
     private String intention ;
89 89
 }

+ 16
- 16
src/main/java/com/huiju/estateagents/excel/PublicCustomerExport.java Прегледај датотеку

@@ -14,62 +14,62 @@ public class PublicCustomerExport {
14 14
      * 姓名
15 15
      */
16 16
     @ColumnWidth(15)
17
-    @ExcelProperty(value = "姓名", index = 0)
17
+    @ExcelProperty(value = "客户昵称", index = 0)
18 18
     private String nickname;
19 19
 
20 20
     /**
21 21
      * 电话
22 22
      */
23 23
     @ColumnWidth(15)
24
-    @ExcelProperty(value = "电话", index = 1)
24
+    @ExcelProperty(value = "手机号码", index = 1)
25 25
     private String phone;
26 26
 
27 27
     /**
28 28
      * 性别
29 29
      */
30 30
     @ColumnWidth(15)
31
-    @ExcelProperty(value = "性别", index = 2)
31
+    @ExcelProperty(value = "性别", index = 7)
32 32
     private String sex;
33 33
 
34 34
     /**
35 35
      * 关注时间
36 36
      */
37 37
     @ColumnWidth(15)
38
-    @ExcelProperty(value = "关注时间", index = 3)
38
+    @ExcelProperty(value = "关注时间(用户注册时间)", index = 2)
39 39
     private String createDate;
40 40
 
41 41
     /**
42
-     * 国家
42
+     * 归属地
43 43
      */
44 44
     @ColumnWidth(15)
45
-    @ExcelProperty(value = "国家", index = 4)
46
-    private String country;
47
-
48
-    /**
49
-     * 省份
50
-     */
51
-    @ColumnWidth(15)
52
-    @ExcelProperty(value = "省份", index = 5)
45
+    @ExcelProperty(value = "归属地", index = 4)
53 46
     private String province;
54 47
 
48
+//    /**
49
+//     * 省份
50
+//     */
51
+//    @ColumnWidth(15)
52
+//    @ExcelProperty(value = "省份", index = 5)
53
+//    private String province;
54
+
55 55
     /**
56 56
      * 来访方式
57 57
      */
58 58
     @ColumnWidth(15)
59
-    @ExcelProperty(value = "性别", index = 6)
59
+    @ExcelProperty(value = "来访方式(场景渠道)", index = 5)
60 60
     private String sceneType;
61 61
 
62 62
     /**
63 63
      * 意向度
64 64
      */
65 65
     @ColumnWidth(15)
66
-    @ExcelProperty(value = "意向度", index = 7)
66
+    @ExcelProperty(value = "意向度(意向值)", index = 6)
67 67
     private String intention;
68 68
 
69 69
     /**
70 70
      * 项目名称
71 71
      */
72 72
     @ColumnWidth(15)
73
-    @ExcelProperty(value = "项目名称", index = 8)
73
+    @ExcelProperty(value = "项目名称", index = 3)
74 74
     private String buildingName;
75 75
 }

+ 1
- 1
src/main/java/com/huiju/estateagents/service/ITaPersonVisitRecordService.java Прегледај датотеку

@@ -45,7 +45,7 @@ public interface ITaPersonVisitRecordService extends IService<TaPersonVisitRecor
45 45
 	 * @param orgId
46 46
 	 * @return
47 47
 	 */
48
-	IPage<TaPersonVisitRecord> getWxActivityVisitRecordList(IPage<TaPersonVisitRecord> pg, Integer userId, Integer orgId, String targetId, String eventType);
48
+	IPage<TaPersonVisitRecord> getWxActivityVisitRecordList(IPage<TaPersonVisitRecord> pg, String personId, Integer orgId, String targetId, String eventType);
49 49
 
50 50
 	/**
51 51
 	 * 获取这个人的活动数据列表

+ 3
- 3
src/main/java/com/huiju/estateagents/service/impl/TaPersonVisitRecordServiceImpl.java Прегледај датотеку

@@ -304,14 +304,14 @@ public class TaPersonVisitRecordServiceImpl extends ServiceImpl<TaPersonVisitRec
304 304
 	 * @return
305 305
 	 */
306 306
 	@Override
307
-	public IPage<TaPersonVisitRecord> getWxActivityVisitRecordList(IPage<TaPersonVisitRecord> pg, Integer userId, Integer orgId, String targetId, String eventType) {
307
+	public IPage<TaPersonVisitRecord> getWxActivityVisitRecordList(IPage<TaPersonVisitRecord> pg, String personId, Integer orgId, String targetId, String eventType) {
308 308
 		//根据userId获取用户信息
309 309
 		QueryWrapper<TaPerson> taPersonQueryWrapper = new QueryWrapper<>();
310
-		taPersonQueryWrapper.eq("user_id",userId);
310
+		taPersonQueryWrapper.eq("person_id",personId);
311 311
 		taPersonQueryWrapper.eq("org_id",orgId);
312 312
 		TaPerson taPerson = taPersonMapper.selectOne(taPersonQueryWrapper);
313 313
 		//获取我的访问客户列表
314
-		IPage<TaPersonVisitRecord> result = personVisitRecordMapper.getWxActivityVisitRecordList(pg,userId,orgId, targetId,taPerson.getPersonId(), (CommConstant.FAVOR_PROJECT.equals(eventType) ? "building" : CommConstant.FAVOR_ACTIVITY.equals(eventType) ? "dynamic" : eventType)  + "_share");
314
+		IPage<TaPersonVisitRecord> result = personVisitRecordMapper.getWxActivityVisitRecordList(pg, taPerson.getUserId(), orgId, targetId, personId, (CommConstant.FAVOR_PROJECT.equals(eventType) ? "building" : CommConstant.FAVOR_ACTIVITY.equals(eventType) ? "dynamic" : eventType)  + "_share");
315 315
 		List<TaPersonVisitRecord> records = result.getRecords();
316 316
 		//判断是否我的客户状态
317 317
 		records.forEach(e -> {

+ 4
- 4
src/main/resources/mapper/TaPersonVisitRecordMapper.xml Прегледај датотеку

@@ -123,7 +123,7 @@
123 123
 
124 124
     <select id="getWxActivityVisitRecordList" resultType="com.huiju.estateagents.entity.TaPersonVisitRecord">
125 125
         SELECT
126
-            t.share_from_id, t.share_person as consultant_id, t.share_person_type, t.person_id, t.target_type, t.target_id, t.create_date as visit_time, t.org_id ,building_id, t.status, t.is_first_time,
126
+            t.share_from_id, t.share_person as consultant_id, t.share_person_type, t.person_id, t.target_type, t.target_id, t.create_date as visit_time, t.org_id ,t.building_id, t.status, t.is_first_time,
127 127
 	        p.`name` as user_name,
128 128
 	        p.`nickname` as nickname,
129 129
 	        p.avatarurl
@@ -384,9 +384,9 @@
384 384
         select count(DISTINCT t.person_id)  from ta_share_person_from t
385 385
         left join ta_person a on t.person_id = a.person_id
386 386
         where
387
-        (t.share_person = #{userId}
388
-        <if test="personId != null and personId != ''">
389
-            or t.share_person = #{personId}
387
+        (t.share_person = #{personId}
388
+        <if test="userId != null and userId != ''">
389
+            or t.share_person = #{userId}
390 390
         </if>
391 391
         )
392 392
         and t.org_id = #{orgId}

+ 3
- 5
src/main/resources/mapper/TaRecommendCustomerMapper.xml Прегледај датотеку

@@ -281,7 +281,7 @@ FROM
281 281
             <if test="buildingId != null and buildingId !=''">
282 282
                 AND b.building_id = #{buildingId}
283 283
             </if>
284
-            and NOT EXISTS ( select * from ta_recommend_customer a where a.org_id = #{orgId} and a.recommend_person = b.person_id)
284
+<!--            and NOT EXISTS ( select * from ta_recommend_customer a where a.org_id = #{orgId} and a.recommend_person = b.person_id)-->
285 285
             <if test="personBuildingList != null and personBuildingList.size > 0">
286 286
                 AND b.building_id in
287 287
                 <foreach collection="personBuildingList" item="personBuilding" open="(" close=")" separator=",">
@@ -547,8 +547,7 @@ FROM
547 547
           b.phone as phone,
548 548
           if(b.gender = 1, '男', if(b.gender = 2, '女', '未知')) as sex,
549 549
           b.create_date,
550
-          b.country,
551
-          b.province,
550
+          concat(b.country, b.province) as province,
552 551
           z.intention,
553 552
           d.scene_alias as sceneType,
554 553
           t.building_name
@@ -666,8 +665,7 @@ FROM
666 665
         t.building_name,
667 666
         z.intention,
668 667
         a.create_date,
669
-        a.country,
670
-        a.province,
668
+        concat(a.country,a.province) as province,
671 669
         w.scene_alias as scene_type
672 670
         FROM
673 671
         ta_recommend_customer a