傅行帆 3 years ago
parent
commit
70b3a0fd05

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

33
      * 过了保护期的时间
33
      * 过了保护期的时间
34
      */
34
      */
35
     private LocalDateTime expirationDate;
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
     @Autowired
137
     @Autowired
138
     private CustomerSignatoryMapper customerSignatoryMapper;
138
     private CustomerSignatoryMapper customerSignatoryMapper;
139
 
139
 
140
+    @Autowired
141
+    private TaBuildingApartmentMapper taBuildingApartmentMapper;
142
+
140
     @Override
143
     @Override
141
     public ResponseBean getMyCustList(String openid, String keywords, int pageNumber, int pageSize) {
144
     public ResponseBean getMyCustList(String openid, String keywords, int pageNumber, int pageSize) {
142
         List<TaPerson> taPersons = getPersonsByOpenId(openid);
145
         List<TaPerson> taPersons = getPersonsByOpenId(openid);
467
         // 查询出此楼盘下的职业顾问
470
         // 查询出此楼盘下的职业顾问
468
         IPage<TaRecommendCustomerPO> page = new Page<>(pageNumber,pageSize);
471
         IPage<TaRecommendCustomerPO> page = new Page<>(pageNumber,pageSize);
469
         IPage<TaRecommendCustomerPO> result = taRecommendCustomerMapper.getMarkingCustList(page, keywords,buildingId);
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
         return ResponseBean.success(result);
481
         return ResponseBean.success(result);
471
     }
482
     }
472
 
483
 
713
             LambdaQueryWrapper<CustomerSignatory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
724
             LambdaQueryWrapper<CustomerSignatory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
714
             lambdaQueryWrapper.eq(CustomerSignatory::getCustomerId,taRecommendCustomer.getCustomerId());
725
             lambdaQueryWrapper.eq(CustomerSignatory::getCustomerId,taRecommendCustomer.getCustomerId());
715
             List<CustomerSignatory> customerSignatories = customerSignatoryMapper.selectList(lambdaQueryWrapper);
726
             List<CustomerSignatory> customerSignatories = customerSignatoryMapper.selectList(lambdaQueryWrapper);
727
+            customerSignatories.forEach(e -> {
728
+                TaBuildingApartment taBuildingApartment = taBuildingApartmentMapper.selectById(e.getHouseType());
729
+                e.setBuildingApartment(taBuildingApartment);
730
+            });
716
             taRecommendCustomerVO.setCustomerSignatory(customerSignatories);
731
             taRecommendCustomerVO.setCustomerSignatory(customerSignatories);
717
         }
732
         }
718
 
733
 

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

203
         return responseBean;
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
      * 根据id查询对象
226
      * 根据id查询对象

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

1
 package com.yunzhi.marketing.xlk.entity;
1
 package com.yunzhi.marketing.xlk.entity;
2
 
2
 
3
 import com.baomidou.mybatisplus.annotation.IdType;
3
 import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
4
 import com.baomidou.mybatisplus.annotation.TableId;
5
 import com.baomidou.mybatisplus.annotation.TableId;
5
 import com.baomidou.mybatisplus.annotation.TableName;
6
 import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.yunzhi.marketing.entity.TaBuildingApartment;
6
 import lombok.Data;
8
 import lombok.Data;
7
 import lombok.EqualsAndHashCode;
9
 import lombok.EqualsAndHashCode;
8
 import lombok.experimental.Accessors;
10
 import lombok.experimental.Accessors;
97
      */
99
      */
98
     private String houseType;
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
     private String price;
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
             t.building_id as buildingId,
1003
             t.building_id as buildingId,
1004
             t.realty_consultant as consultant,
1004
             t.realty_consultant as consultant,
1005
             t.status as customerStatus,
1005
             t.status as customerStatus,
1006
-            null as channelStatus
1006
+            null as channelStatus,
1007
+            t.recommend_person
1007
         FROM
1008
         FROM
1008
             ta_recommend_customer t
1009
             ta_recommend_customer t
1009
 --         INNER JOIN ta_person p ON t.recommend_person = p.person_id
1010
 --         INNER JOIN ta_person p ON t.recommend_person = p.person_id
1023
             "report" AS type,
1024
             "report" AS type,
1024
             null as buildingId,
1025
             null as buildingId,
1025
             null as consultant,
1026
             null as consultant,
1026
-            null as customerStatus,
1027
-            status as channelStatus
1027
+            1 as customerStatus,
1028
+            null as channelStatus,
1029
+            recommend_person
1028
         FROM
1030
         FROM
1029
             xlk_channel_customer
1031
             xlk_channel_customer
1030
         WHERE
1032
         WHERE
1031
             building_id = #{buildingId}
1033
             building_id = #{buildingId}
1034
+        and status = 1
1032
         <if test="keywords != null and keywords !=''">
1035
         <if test="keywords != null and keywords !=''">
1033
             and name like CONCAT('%',#{keywords}, '%')
1036
             and name like CONCAT('%',#{keywords}, '%')
1034
         </if>
1037
         </if>