Browse Source

Merge remote-tracking branch 'origin/dev' into dev

顾绍勇 5 years ago
parent
commit
2bbd147bd3
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/main/resources/mapper/TaBuildingMapper.xml

+ 3
- 1
src/main/resources/mapper/TaBuildingMapper.xml View File

525
         b.STATUS > 0
525
         b.STATUS > 0
526
         AND b.org_id = #{orgId}
526
         AND b.org_id = #{orgId}
527
         AND IFNULL( b.person_type, '' ) IN ( 'estate agent', 'customer' )
527
         AND IFNULL( b.person_type, '' ) IN ( 'estate agent', 'customer' )
528
-        AND b.person_id NOT IN ( SELECT c.person_id FROM ta_recommend_customer c WHERE c.org_id = 84 AND person_id IS NOT NULL AND person_id != '' )
528
+        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 != '' )
529
         <if test="startDate != null">
529
         <if test="startDate != null">
530
             and  TO_DAYS(b.create_date) >= TO_DAYS(#{startDate})
530
             and  TO_DAYS(b.create_date) >= TO_DAYS(#{startDate})
531
         </if>
531
         </if>
544
         u.be_uv AS building_id
544
         u.be_uv AS building_id
545
         FROM
545
         FROM
546
         ta_uv u
546
         ta_uv u
547
+        LEFT JOIN ta_person p ON u.person_id = p.person_id
547
         WHERE
548
         WHERE
548
         u.tagert_type = 'project'
549
         u.tagert_type = 'project'
550
+        AND p.org_id = #{orgId}
549
         <if test="startDate != null">
551
         <if test="startDate != null">
550
             and  TO_DAYS(u.create_date) >= TO_DAYS(#{startDate})
552
             and  TO_DAYS(u.create_date) >= TO_DAYS(#{startDate})
551
         </if>
553
         </if>