傅行帆 3 years ago
parent
commit
70b3a0fd05

+ 6
- 0
src/main/java/com/yunzhi/marketing/po/TaRecommendCustomerPO.java View File

@@ -33,4 +33,10 @@ public class TaRecommendCustomerPO {
33 33
      * 过了保护期的时间
34 34
      */
35 35
     private LocalDateTime expirationDate;
36
+
37
+    private String recommendPerson;
38
+
39
+    private String recommendPersonName;
40
+
41
+    private String recommendPersonPhone;
36 42
 }

+ 15
- 0
src/main/java/com/yunzhi/marketing/service/impl/TaRecommendCustomerServiceImpl.java View File

@@ -137,6 +137,9 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
137 137
     @Autowired
138 138
     private CustomerSignatoryMapper customerSignatoryMapper;
139 139
 
140
+    @Autowired
141
+    private TaBuildingApartmentMapper taBuildingApartmentMapper;
142
+
140 143
     @Override
141 144
     public ResponseBean getMyCustList(String openid, String keywords, int pageNumber, int pageSize) {
142 145
         List<TaPerson> taPersons = getPersonsByOpenId(openid);
@@ -467,6 +470,14 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
467 470
         // 查询出此楼盘下的职业顾问
468 471
         IPage<TaRecommendCustomerPO> page = new Page<>(pageNumber,pageSize);
469 472
         IPage<TaRecommendCustomerPO> result = taRecommendCustomerMapper.getMarkingCustList(page, keywords,buildingId);
473
+        List<TaRecommendCustomerPO> records = result.getRecords();
474
+        records.forEach(e -> {
475
+            TaPerson recommendPerson = taPersonMapper.selectById(e.getRecommendPerson());
476
+            if (null != recommendPerson) {
477
+                e.setRecommendPersonName(recommendPerson.getName());
478
+                e.setRecommendPersonPhone(recommendPerson.getPhone());
479
+            }
480
+        });
470 481
         return ResponseBean.success(result);
471 482
     }
472 483
 
@@ -713,6 +724,10 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
713 724
             LambdaQueryWrapper<CustomerSignatory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
714 725
             lambdaQueryWrapper.eq(CustomerSignatory::getCustomerId,taRecommendCustomer.getCustomerId());
715 726
             List<CustomerSignatory> customerSignatories = customerSignatoryMapper.selectList(lambdaQueryWrapper);
727
+            customerSignatories.forEach(e -> {
728
+                TaBuildingApartment taBuildingApartment = taBuildingApartmentMapper.selectById(e.getHouseType());
729
+                e.setBuildingApartment(taBuildingApartment);
730
+            });
716 731
             taRecommendCustomerVO.setCustomerSignatory(customerSignatories);
717 732
         }
718 733
 

+ 18
- 0
src/main/java/com/yunzhi/marketing/xlk/controller/ChannelCustomerController.java View File

@@ -203,6 +203,24 @@ public class ChannelCustomerController extends BaseController {
203 203
         return responseBean;
204 204
     }
205 205
 
206
+    /**
207
+     * 根据id查询对象
208
+     * @param customerId  实体ID
209
+     */
210
+    @ApiOperation(value = "森哥看这里-admin-后台获取详情信息", notes = "森哥看这里-admin-后台获取详情信息")
211
+    @RequestMapping(value="/admin/customer/detail/{customerId}",method= RequestMethod.GET)
212
+    public ResponseBean detailCustomerGet(@PathVariable String customerId, @RequestHeader("authorization") String token){
213
+        ResponseBean responseBean = new ResponseBean();
214
+        try {
215
+            responseBean = taRecommendCustomerService.getCustDetail(customerId);
216
+        }catch (Exception e){
217
+            e.printStackTrace();
218
+            logger.error("channelCustomerDelete -=- {}",e.toString());
219
+            responseBean.addError(e.getMessage());
220
+        }
221
+        return responseBean;
222
+    }
223
+
206 224
 
207 225
     /**
208 226
      * 根据id查询对象

+ 6
- 15
src/main/java/com/yunzhi/marketing/xlk/entity/CustomerSignatory.java View File

@@ -1,8 +1,10 @@
1 1
 package com.yunzhi.marketing.xlk.entity;
2 2
 
3 3
 import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
4 5
 import com.baomidou.mybatisplus.annotation.TableId;
5 6
 import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.yunzhi.marketing.entity.TaBuildingApartment;
6 8
 import lombok.Data;
7 9
 import lombok.EqualsAndHashCode;
8 10
 import lombok.experimental.Accessors;
@@ -97,25 +99,14 @@ public class CustomerSignatory implements Serializable {
97 99
      */
98 100
     private String houseType;
99 101
 
100
-    /**
101
-     * 栋
102
-     */
103
-    private String ridgepole;
104
-
105
-    /**
106
-     * 单元
107
-     */
108
-    private String unit;
109
-
110
-    /**
111
-     * 室
112
-     */
113
-    private String room;
102
+    /** 房屋信息 */
103
+    private String houseInfo;
114 104
 
115 105
     /**
116 106
      * 金额
117 107
      */
118 108
     private String price;
119 109
 
120
-
110
+    @TableField(exist = false)
111
+    private TaBuildingApartment buildingApartment;
121 112
 }

+ 6
- 3
src/main/resources/mapper/TaRecommendCustomerMapper.xml View File

@@ -1003,7 +1003,8 @@ FROM
1003 1003
             t.building_id as buildingId,
1004 1004
             t.realty_consultant as consultant,
1005 1005
             t.status as customerStatus,
1006
-            null as channelStatus
1006
+            null as channelStatus,
1007
+            t.recommend_person
1007 1008
         FROM
1008 1009
             ta_recommend_customer t
1009 1010
 --         INNER JOIN ta_person p ON t.recommend_person = p.person_id
@@ -1023,12 +1024,14 @@ FROM
1023 1024
             "report" AS type,
1024 1025
             null as buildingId,
1025 1026
             null as consultant,
1026
-            null as customerStatus,
1027
-            status as channelStatus
1027
+            1 as customerStatus,
1028
+            null as channelStatus,
1029
+            recommend_person
1028 1030
         FROM
1029 1031
             xlk_channel_customer
1030 1032
         WHERE
1031 1033
             building_id = #{buildingId}
1034
+        and status = 1
1032 1035
         <if test="keywords != null and keywords !=''">
1033 1036
             and name like CONCAT('%',#{keywords}, '%')
1034 1037
         </if>