weichaochao 5 år sedan
förälder
incheckning
6c599d12f3

+ 2
- 2
src/main/java/com/huiju/estateagents/controller/TaPreselectionRecordController.java Visa fil

@@ -212,14 +212,14 @@ public class TaPreselectionRecordController extends BaseController {
212 212
     public ResponseBean selectPreSelectRecordList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
213 213
                                                   @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
214 214
                                                   @RequestParam(value = "salesBatchId") String salesBatchId,
215
-                                                  @RequestParam(value = "houseId", required = false) Integer houseId,
215
+                                                  @RequestParam(value = "house", required = false) Integer house,
216 216
                                                   @RequestParam(value = "phone", required = false) String phone,
217 217
                                                   @RequestParam(value = "apartmentId", required = false) String apartmentId,
218 218
                                                   @RequestParam(value = "status", required = false) Integer status,
219 219
                                                   HttpServletRequest request) {
220 220
         ResponseBean responseBean = new ResponseBean();
221 221
         try {
222
-            responseBean = iTaPreselectionRecordService.selectPreSelectRecordList(pageNum, pageSize, salesBatchId, houseId, getOrgId(request), phone, apartmentId, status);
222
+            responseBean = iTaPreselectionRecordService.selectPreSelectRecordList(pageNum, pageSize, salesBatchId, house, getOrgId(request), phone, apartmentId, status);
223 223
         } catch (Exception e) {
224 224
             e.printStackTrace();
225 225
             logger.error("taHousingResourcesList -=- {}", e.toString());

+ 3
- 0
src/main/java/com/huiju/estateagents/entity/TaSharePersonFrom.java Visa fil

@@ -89,4 +89,7 @@ public class TaSharePersonFrom implements Serializable {
89 89
 
90 90
     @TableField(exist = false)
91 91
     private String photoOravatar;
92
+
93
+    @TableField(exist = false)
94
+    private String salesBatchName;
92 95
 }

+ 5
- 0
src/main/java/com/huiju/estateagents/po/TaPreselectionRecordPO.java Visa fil

@@ -48,6 +48,11 @@ public class TaPreselectionRecordPO extends TaPreselectionRecord {
48 48
      */
49 49
     private String apartmentId;
50 50
 
51
+    /**
52
+     * 户型名称
53
+     */
54
+    private String apartmentName;
55
+
51 56
     /**
52 57
      * 楼盘名称
53 58
      */

+ 8
- 4
src/main/java/com/huiju/estateagents/service/impl/TaSharePersonFromServiceImpl.java Visa fil

@@ -39,6 +39,10 @@ public class TaSharePersonFromServiceImpl extends ServiceImpl<TaSharePersonFromM
39 39
 
40 40
     @Autowired
41 41
     private TaSharePersonFromMapper taSharePersonFromMapper;
42
+
43
+    @Autowired
44
+    private  TaSalesBatchMapper taSalesBatchMapper;
45
+
42 46
     /**
43 47
      * 添加客户分享记录
44 48
      *
@@ -107,10 +111,10 @@ public class TaSharePersonFromServiceImpl extends ServiceImpl<TaSharePersonFromM
107 111
         Page page = new Page(pageNum,pageSize);
108 112
         // 分页查询
109 113
         List<TaSharePersonFrom> list = taSharePersonFromMapper.selectHouseVisitList(page, orgId, personType, sceneType, phone, saleBatchId);
110
-//        TaSalesBatch taSalesBatch = taSalesBatchMapper.selectById(saleBatchId);
111
-//        list.forEach(e -> {
112
-//            e.setSalesBatchName(taSalesBatch.getSalesBatchName());
113
-//        });
114
+        TaSalesBatch taSalesBatch = taSalesBatchMapper.selectById(saleBatchId);
115
+        list.forEach(e -> {
116
+            e.setSalesBatchName(taSalesBatch.getSalesBatchName());
117
+        });
114 118
         page.setRecords(list);
115 119
         return ResponseBean.success(page);
116 120
     }

+ 20
- 0
src/main/resources/mapper/TaPersonVisitRecordMapper.xml Visa fil

@@ -336,6 +336,26 @@
336 336
             and t.person_id = #{personId} order by t.create_date desc limit 9999
337 337
             ) t
338 338
             group by t.target_id
339
+         union all
340
+
341
+        select * from (
342
+            select
343
+            t.be_share as target_id,
344
+            g.aerial_view_img as activity_img,
345
+            g.sales_batch_name as activity_name,
346
+            '1' as price,
347
+            '2' as building_name,
348
+            '3' as address,
349
+            1 as building_type_id,
350
+			t.tagert_type as eventType,
351
+			t.create_date as visit_time
352
+            from ta_share t
353
+            left join ta_sales_batch g on t.be_share = g.sales_batch_id
354
+            where t.tagert_type like CONCAT('house' , '%')
355
+            and t.person_id = #{personId} order by t.create_date desc limit 9999
356
+            ) t
357
+            group by t.target_id
358
+
339 359
         ) t
340 360
         order by t.visit_time desc
341 361
     </select>

+ 2
- 0
src/main/resources/mapper/TaPreselectionRecordMapper.xml Visa fil

@@ -65,10 +65,12 @@
65 65
         t.update_date,
66 66
         t.building_id,
67 67
         t.sales_batch_id,
68
+        e.apartment_name,
68 69
         (select name from ta_person t where (t.user_id = t.update_user || t.person_id = t.update_user)) as updateName
69 70
         from ta_preselection_record t
70 71
         left join ta_housing_resources a on t.house_id = a.house_id
71 72
         left join ta_person b on t.person_id = b.person_id
73
+        LEFT JOIN ta_building_apartment e ON a.apartment_id = e.apartment_id
72 74
         where b.org_id = #{orgId} and a.sales_batch_id = #{salesBatchId}
73 75
         <if test="houseId != null and houseId !=''">
74 76
           and t.house_id = #{houseId}

+ 2
- 2
src/main/resources/mapper/TaShareMapper.xml Visa fil

@@ -3,9 +3,9 @@
3 3
 <mapper namespace="com.huiju.estateagents.mapper.TaShareMapper">
4 4
 
5 5
     <select id="selectHouseShareList" resultType="com.huiju.estateagents.entity.TaShare">
6
-      select a.avatarurl as photoOravatar, a.nickname as nameOrnick, a.name, a.phone, a.person_type, t.create_date From ta_share t
6
+      select a.avatarurl as photoOravatar, a.nickname as nameOrnick, a.name, a.phone, a.person_type, t.tagert_type, t.create_date From ta_share t
7 7
       left join ta_person a on t.person_id = a.person_id
8
-      left join ta_housing_resources b on t.be_share = b.house_id
8
+      left join ta_sales_batch b on t.be_share = b.sales_batch_id
9 9
       where a.org_id = #{orgId}
10 10
       and t.tagert_type in ('housePost','houseApp')
11 11
       and b.sales_batch_id = #{saleBatchId}

+ 4
- 1
src/main/resources/mapper/TaSharePersonFromMapper.xml Visa fil

@@ -31,8 +31,10 @@
31 31
         left join td_wx_dict b on a.scene_id = b.scene_id
32 32
         left join ta_person c on t.person_id = c.person_id
33 33
         left join ta_housing_resources d on d.house_id = t.target_id
34
+        left join ta_sales_batch z on t.target_id = z.sales_batch_id
34 35
         where a.org_id = #{orgId}
35
-        and t.target_type in ('housePost','houseApp')
36
+        and t.target_type = 'house_share'
37
+        and z.sales_batch_id = #{saleBatchId}
36 38
         <if test="personType != null and personType != ''">
37 39
             and c.person_Type = #{personType}
38 40
         </if>
@@ -42,6 +44,7 @@
42 44
         <if test="phone != null and phone != ''">
43 45
             and c.phone = #{phone}
44 46
         </if>
47
+        and t.share_person != t.person_id
45 48
         GROUP BY t.target_id,t.target_type,t.person_id,t.share_person
46 49
         order by t.create_date desc
47 50
     </select>