|
@@ -11,13 +11,11 @@ import com.huiju.estateagents.base.ResponseBean;
|
11
|
11
|
import com.huiju.estateagents.common.CommConstant;
|
12
|
12
|
import com.huiju.estateagents.common.JWTUtils;
|
13
|
13
|
import com.huiju.estateagents.common.StringUtils;
|
14
|
|
-import com.huiju.estateagents.entity.TaChannel;
|
15
|
|
-import com.huiju.estateagents.entity.TaChannelPerson;
|
16
|
|
-import com.huiju.estateagents.entity.TaPerson;
|
17
|
|
-import com.huiju.estateagents.entity.TaRecommendCustomer;
|
|
14
|
+import com.huiju.estateagents.entity.*;
|
18
|
15
|
import com.huiju.estateagents.event.EventBus;
|
19
|
16
|
import com.huiju.estateagents.excel.*;
|
20
|
17
|
import com.huiju.estateagents.excel.handler.CustomCellWriteHandler;
|
|
18
|
+import com.huiju.estateagents.mapper.TaPersonBuildingMapper;
|
21
|
19
|
import com.huiju.estateagents.mapper.TaRecommendCustomerMapper;
|
22
|
20
|
import com.huiju.estateagents.service.ITaPersonService;
|
23
|
21
|
import com.huiju.estateagents.service.ITaRecommendCustomerService;
|
|
@@ -40,6 +38,7 @@ import java.io.IOException;
|
40
|
38
|
import java.time.LocalDateTime;
|
41
|
39
|
import java.util.ArrayList;
|
42
|
40
|
import java.util.List;
|
|
41
|
+import java.util.Map;
|
43
|
42
|
|
44
|
43
|
/**
|
45
|
44
|
* <p>
|
|
@@ -72,6 +71,10 @@ public class TaRecommendCustomerController extends BaseController {
|
72
|
71
|
@Autowired
|
73
|
72
|
private TaRecommendCustomerMapper taRecommendCustomerMapper;
|
74
|
73
|
|
|
74
|
+ @Autowired
|
|
75
|
+ private TaPersonBuildingMapper taPersonBuildingMapper;
|
|
76
|
+
|
|
77
|
+
|
75
|
78
|
/**
|
76
|
79
|
* 我的客户列表
|
77
|
80
|
* @param pageNumber
|
|
@@ -257,9 +260,21 @@ public class TaRecommendCustomerController extends BaseController {
|
257
|
260
|
@RequestParam(value ="entryType",required = false) String entryType,
|
258
|
261
|
@RequestParam(value ="verifyStatus",required = false) String verifyStatus,
|
259
|
262
|
@RequestParam(value = "sex",required = false)Integer sex,
|
260
|
|
- @RequestParam(value = "customerType") String customerType,
|
261
|
|
- @RequestParam(value = "status",required = false) Integer status){ // public 公 private 私
|
|
263
|
+ @RequestParam(value = "customerType") String customerType,// public 公 private 私
|
|
264
|
+ @RequestParam(value = "status",required = false) Integer status){
|
262
|
265
|
try{
|
|
266
|
+
|
|
267
|
+ // TODO 目前如果是公客,就取当前操作人员的 buildingId
|
|
268
|
+ if ("public".equals(customerType)) {
|
|
269
|
+ Map<String,Object> map = JWTUtils.getUserIdAndOrgId(request);
|
|
270
|
+ String userId = (String) map.get("userId");
|
|
271
|
+ QueryWrapper<TaPersonBuilding> queryWrapper = new QueryWrapper<>();
|
|
272
|
+ queryWrapper.eq("user_id", userId);
|
|
273
|
+ queryWrapper.orderByDesc("create_date");
|
|
274
|
+ queryWrapper.last("limit 1");
|
|
275
|
+ TaPersonBuilding personBuilding = taPersonBuildingMapper.selectOne(queryWrapper);
|
|
276
|
+ buildingId = personBuilding.getBuildingId();
|
|
277
|
+ }
|
263
|
278
|
return ResponseBean.success(taRecommendCustomerService.getCustomerList(status,pageNumber,pageSize,buildingId,name,tel,consultName,consultTel,entryType,verifyStatus,sex, customerType, getOrgId(request)));
|
264
|
279
|
}catch (Exception e){
|
265
|
280
|
e.printStackTrace();
|