张延森 пре 5 година
родитељ
комит
11697d6e9d
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3
    3
      src/main/resources/mapper/TaRecommendCustomerMapper.xml

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

@@ -266,7 +266,7 @@ FROM
266 266
             <if test="consultTel != null and consultTel !=''">
267 267
                 and b.tel like CONCAT('%',#{consultTel}, '%')
268 268
             </if>
269
-            and NOT EXISTS ( select * from ta_recommend_customer a where a.recommend_person = b.person_id)
269
+            and NOT EXISTS ( select * from ta_recommend_customer a where a.org_id = #{orgId} and a.recommend_person = b.person_id)
270 270
         </where>
271 271
         order by b.create_date desc
272 272
     </select>
@@ -514,7 +514,7 @@ FROM
514 514
             <if test="consultTel != null and consultTel !=''">
515 515
                 and b.tel like CONCAT('%',#{consultTel}, '%')
516 516
             </if>
517
-            and NOT EXISTS ( select * from ta_recommend_customer a where a.recommend_person = b.person_id)
517
+            and NOT EXISTS ( select * from ta_recommend_customer a where a.org_id = #{orgId} and a.recommend_person = b.person_id)
518 518
         </where>
519 519
         order by b.create_date desc
520 520
     </select>
@@ -547,7 +547,7 @@ FROM
547 547
             <if test="consultTel != null and consultTel !=''">
548 548
                 and b.tel like CONCAT('%',#{consultTel}, '%')
549 549
             </if>
550
-            and NOT EXISTS ( select * from ta_recommend_customer a where a.recommend_person = b.person_id)
550
+            and NOT EXISTS ( select * from ta_recommend_customer a where a.org_id = #{orgId} and a.recommend_person = b.person_id)
551 551
             AND b.person_id not IN ( SELECT c.person_id FROM ta_recommend_customer c WHERE c.org_id = #{orgId} AND person_id is not null AND person_id != ''  )
552 552
         </where>
553 553
         order by b.create_date desc