|
@@ -156,4 +156,40 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
|
156
|
156
|
|
157
|
157
|
return ResponseBean.error("此客户是私客或已被报备", ResponseBean.ERROR_UNAVAILABLE);
|
158
|
158
|
}
|
|
159
|
+
|
|
160
|
+ /**
|
|
161
|
+ * 驻场 无效报备
|
|
162
|
+ *
|
|
163
|
+ * @param params
|
|
164
|
+ * @return
|
|
165
|
+ */
|
|
166
|
+ @Override
|
|
167
|
+ public ResponseBean invalidCustomerUpdate(MarkingChannelCustomerDTO params) {// 渠道推荐的客户
|
|
168
|
+ if ("channel".equals(params.getType())) {
|
|
169
|
+ ChannelCustomer customer = channelCustomerMapper.selectById(params.getId());
|
|
170
|
+ // 审核不通过 先查看在ta_recommend_customer 手机号是否存在
|
|
171
|
+ LambdaQueryWrapper<TaRecommendCustomer> queryWrapper = new LambdaQueryWrapper<>();
|
|
172
|
+ queryWrapper.eq(TaRecommendCustomer::getPhone,customer.getPhone());
|
|
173
|
+ queryWrapper.eq(TaRecommendCustomer::getBuildingId,customer.getBuildingId());
|
|
174
|
+ TaRecommendCustomer recommendCustomer = taRecommendCustomerMapper.selectOne(queryWrapper);
|
|
175
|
+ if (null != recommendCustomer) {
|
|
176
|
+ // 审核不通过
|
|
177
|
+ recommendCustomer.setRecommendPerson(customer.getRecommendPerson());
|
|
178
|
+ recommendCustomer.setVerifyStatus(CommConstant.VERIFY_AGREE);
|
|
179
|
+ recommendCustomer.setStatus(CommConstant.CUSTOMER_VISITE);
|
|
180
|
+ taRecommendCustomerMapper.updateById(recommendCustomer);
|
|
181
|
+
|
|
182
|
+ }
|
|
183
|
+ customer.setStatus("2");
|
|
184
|
+ channelCustomerMapper.updateById(customer);
|
|
185
|
+ return ResponseBean.success("审核成功");
|
|
186
|
+ }else if ("customer".equals(params.getType())) {
|
|
187
|
+ // 置业顾问 经纪人推荐的客户
|
|
188
|
+ TaRecommendCustomer taRecommendCustomer = taRecommendCustomerMapper.selectById(params.getId());
|
|
189
|
+ taRecommendCustomer.setVerifyStatus(CommConstant.VERIFY_DISAGREE);
|
|
190
|
+ taRecommendCustomerMapper.updateById(taRecommendCustomer);
|
|
191
|
+ return ResponseBean.success("审核成功");
|
|
192
|
+ }
|
|
193
|
+ return ResponseBean.error("无效操作", ResponseBean.ERROR_UNAVAILABLE);
|
|
194
|
+ }
|
159
|
195
|
}
|