张延森 5 년 전
부모
커밋
a868e9878d
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6
    2
      src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java

+ 6
- 2
src/main/java/com/huiju/estateagents/controller/TaRecommendCustomerController.java 파일 보기

@@ -263,8 +263,12 @@ public class TaRecommendCustomerController extends BaseController {
263 263
         try{
264 264
             IPage<TaRecommendCustomer>pg = new Page<>(pageNumber,pageSize);
265 265
             QueryWrapper<TaRecommendCustomer>queryWrapper = new QueryWrapper<>();
266
-            queryWrapper.eq("realty_consultant",person.getPersonId());
267
-           // queryWrapper.eq("report_recommend_status",CommConstant.REPORTED);
266
+
267
+            // 2020-4-1 yansen realty_consultant 可能是 person_id, 可能是 user_id
268
+//            queryWrapper.eq("realty_consultant",person.getPersonId());
269
+            queryWrapper.eq("org_id", person.getOrgId());   // 主要是为了走索引
270
+            queryWrapper.nested(query -> query.eq("realty_consultant",person.getPersonId()).or().eq("realty_consultant", person.getUserId()));
271
+            // queryWrapper.eq("report_recommend_status",CommConstant.REPORTED);
268 272
             queryWrapper.gt("status",CommConstant.STATUS_UNACCALIMED);
269 273
             queryWrapper.orderByDesc("create_date");
270 274
             IPage<TaRecommendCustomer>result = taRecommendCustomerService.page(pg,queryWrapper);