Преглед изворни кода

渠道下的经纪人总数加orgid

dingxin пре 5 година
родитељ
комит
6992a2cc7e

+ 1
- 0
src/main/java/com/huiju/estateagents/service/impl/TaPersonServiceImpl.java Прегледај датотеку

@@ -649,6 +649,7 @@ public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> i
649 649
             QueryWrapper<TaRecommendCustomer> taRecommendCustomerQuery= new QueryWrapper<>();
650 650
             taRecommendCustomerQuery.eq("recommend_person",taPerson.getPersonId());
651 651
             taRecommendCustomerQuery.eq("status",1);
652
+            taRecommendCustomerQuery.eq("org_id", orgid);
652 653
             /*推荐客户总数*/
653 654
             int recommendCount= taRecommendCustomerMapper.selectCount(taRecommendCustomerQuery);
654 655
             taPerson.setRecommendCount(recommendCount);

+ 5
- 6
src/main/resources/mapper/TaPersonMapper.xml Прегледај датотеку

@@ -505,20 +505,19 @@ FROM
505 505
         select
506 506
         p.person_id,
507 507
         p.avatarurl,
508
-        p.tel,
509 508
         p.sex,
510
-        rc.`name`,
511
-        rc.phone,
509
+        rc.`name` as name,
510
+        rc.phone as tel,
512 511
         COUNT(rc.person_id) as recommendCount
513 512
         from ta_channel_person tch
514 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 515
         <where>
517 516
         <if test="name !=null and name !=''">
518
-            and rc.`name` = #{name}
517
+            and rc.name like CONCAT('%',#{name}, '%')
519 518
         </if>
520 519
         <if test="phone !=null and phone !=''">
521
-            and rc.phone = #{phone}
520
+            and rc.phone like CONCAT('%',#{phone}, '%')
522 521
         </if>
523 522
             and p.org_id= #{orgid}
524 523
             and tch.channel_id = #{channelId}