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

渠道下的经纪人总数加orgid

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

+ 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}