浏览代码

Merge branch 'v3' of http://git.ycjcjy.com/zhiyuxing/estateagents into v3

魏熙美 5 年前
父节点
当前提交
2b2b29dcbb

+ 1
- 0
src/main/java/com/huiju/estateagents/controller/TaPersonController.java 查看文件

589
         TaPerson person = taPersons.get(0);
589
         TaPerson person = taPersons.get(0);
590
         QueryWrapper<TaPerson>queryWrapper = new QueryWrapper<>();
590
         QueryWrapper<TaPerson>queryWrapper = new QueryWrapper<>();
591
         queryWrapper.eq("recommend_agent",person.getPersonId());
591
         queryWrapper.eq("recommend_agent",person.getPersonId());
592
+        queryWrapper.eq("person_type", CommConstant.PERSON_ESTATE_AGENT);
592
         queryWrapper.eq("status",CommConstant.STATUS_NORMAL);
593
         queryWrapper.eq("status",CommConstant.STATUS_NORMAL);
593
         Page<TaPerson>page = new Page<>();
594
         Page<TaPerson>page = new Page<>();
594
         page.setPages(pageNum);
595
         page.setPages(pageNum);

+ 1
- 0
src/main/java/com/huiju/estateagents/service/impl/TaPersonServiceImpl.java 查看文件

649
             QueryWrapper<TaRecommendCustomer> taRecommendCustomerQuery= new QueryWrapper<>();
649
             QueryWrapper<TaRecommendCustomer> taRecommendCustomerQuery= new QueryWrapper<>();
650
             taRecommendCustomerQuery.eq("recommend_person",taPerson.getPersonId());
650
             taRecommendCustomerQuery.eq("recommend_person",taPerson.getPersonId());
651
             taRecommendCustomerQuery.eq("status",1);
651
             taRecommendCustomerQuery.eq("status",1);
652
+            taRecommendCustomerQuery.eq("org_id", orgid);
652
             /*推荐客户总数*/
653
             /*推荐客户总数*/
653
             int recommendCount= taRecommendCustomerMapper.selectCount(taRecommendCustomerQuery);
654
             int recommendCount= taRecommendCustomerMapper.selectCount(taRecommendCustomerQuery);
654
             taPerson.setRecommendCount(recommendCount);
655
             taPerson.setRecommendCount(recommendCount);

+ 5
- 6
src/main/resources/mapper/TaPersonMapper.xml 查看文件

505
         select
505
         select
506
         p.person_id,
506
         p.person_id,
507
         p.avatarurl,
507
         p.avatarurl,
508
-        p.tel,
509
         p.sex,
508
         p.sex,
510
-        rc.`name`,
511
-        rc.phone,
509
+        rc.`name` as name,
510
+        rc.phone as tel,
512
         COUNT(rc.person_id) as recommendCount
511
         COUNT(rc.person_id) as recommendCount
513
         from ta_channel_person tch
512
         from ta_channel_person tch
514
         left join  ta_person p on  tch.person_id = p.person_id
513
         left join  ta_person p on  tch.person_id = p.person_id
515
-        LEFT JOIN ta_recommend_customer rc ON p.person_id = rc.person_id and rc.report_recommend_status = 1
514
+        LEFT JOIN ta_recommend_customer rc ON p.person_id = rc.person_id
516
         <where>
515
         <where>
517
         <if test="name !=null and name !=''">
516
         <if test="name !=null and name !=''">
518
-            and rc.`name` = #{name}
517
+            and rc.name like CONCAT('%',#{name}, '%')
519
         </if>
518
         </if>
520
         <if test="phone !=null and phone !=''">
519
         <if test="phone !=null and phone !=''">
521
-            and rc.phone = #{phone}
520
+            and rc.phone like CONCAT('%',#{phone}, '%')
522
         </if>
521
         </if>
523
             and p.org_id= #{orgid}
522
             and p.org_id= #{orgid}
524
             and tch.channel_id = #{channelId}
523
             and tch.channel_id = #{channelId}