|
@@ -202,13 +202,26 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
|
202
|
202
|
}
|
203
|
203
|
|
204
|
204
|
@Override
|
205
|
|
- public IPage<Map<String, Object>> getCardList(int pageNumber, int pageSize,String buildingId,Integer orgId) {
|
|
205
|
+ public IPage<Map<String, Object>> getCardList(int pageNumber, int pageSize, String buildingId, Integer orgId, TaPerson person) {
|
|
206
|
+ // 获取当前人员的推荐置业顾问ID
|
|
207
|
+ QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
|
|
208
|
+ queryWrapper.eq("org_id", orgId);
|
|
209
|
+ queryWrapper.eq("person_id", person.getPersonId());
|
|
210
|
+ queryWrapper.eq("status", CommConstant.STATUS_NORMAL);
|
|
211
|
+ queryWrapper.last("limit 1");
|
|
212
|
+ TaRecommendCustomer cust = taRecommendCustomerMapper.selectOne(queryWrapper);
|
|
213
|
+ String consultant = "";
|
|
214
|
+ if (cust != null) {
|
|
215
|
+ // 有可能是 personId, 有可能是 userId
|
|
216
|
+ consultant = cust.getRealtyConsultant();
|
|
217
|
+ }
|
|
218
|
+
|
206
|
219
|
Page<Map<String, Object>> page = new Page<>();
|
207
|
220
|
page.setSize(pageSize);
|
208
|
221
|
page.setPages(pageNumber);
|
209
|
222
|
page.setCurrent(pageNumber);
|
210
|
223
|
|
211
|
|
- List<Map<String, Object>> result = taPersonMapper.selectCardList(page, CommConstant.PERSON_REALTY_CONSULTANT, CommConstant.STATUS_NORMAL,buildingId,orgId);
|
|
224
|
+ List<Map<String, Object>> result = taPersonMapper.selectCardList(page, CommConstant.PERSON_REALTY_CONSULTANT, CommConstant.STATUS_NORMAL,buildingId,orgId, consultant);
|
212
|
225
|
page.setRecords(result);
|
213
|
226
|
|
214
|
227
|
return page;
|