傅行帆 преди 5 години
родител
ревизия
26eea8544b
променени са 2 файла, в които са добавени 13 реда и са изтрити 1 реда
  1. 12
    0
      src/main/resources/mapper/TaPersonBuildingMapper.xml
  2. 1
    1
      src/main/resources/mapper/TaRecommendCustomerMapper.xml

+ 12
- 0
src/main/resources/mapper/TaPersonBuildingMapper.xml Целия файл

12
             <if test="buildingId != null and buildingId != ''">
12
             <if test="buildingId != null and buildingId != ''">
13
               and a.building_id = #{buildingId}
13
               and a.building_id = #{buildingId}
14
             </if>
14
             </if>
15
+            <if test="personBuildingList != null and personBuildingList.size > 0">
16
+                AND a.building_id in
17
+                <foreach collection="personBuildingList" item="personBuilding" open="(" close=")" separator=",">
18
+                    #{personBuilding.buildingId}
19
+                </foreach>
20
+            </if>
15
             <if test="startCreateDate != null and startCreateDate != ''">
21
             <if test="startCreateDate != null and startCreateDate != ''">
16
                 and  date_format(c.create_date,'%Y-%m-%d') >= date_format(#{startCreateDate},'%Y-%m-%d')
22
                 and  date_format(c.create_date,'%Y-%m-%d') >= date_format(#{startCreateDate},'%Y-%m-%d')
17
             </if>
23
             </if>
44
         <if test="buildingId != null and buildingId != ''">
50
         <if test="buildingId != null and buildingId != ''">
45
             and a.building_id = #{buildingId}
51
             and a.building_id = #{buildingId}
46
         </if>
52
         </if>
53
+        <if test="personBuildingList != null and personBuildingList.size > 0">
54
+            AND a.building_id in
55
+            <foreach collection="personBuildingList" item="personBuilding" open="(" close=")" separator=",">
56
+                #{personBuilding.buildingId}
57
+            </foreach>
58
+        </if>
47
         <if test="startCreateDate != null and startCreateDate != ''">
59
         <if test="startCreateDate != null and startCreateDate != ''">
48
             and  date_format(c.create_date,'%Y-%m-%d') >= date_format(#{startCreateDate},'%Y-%m-%d')
60
             and  date_format(c.create_date,'%Y-%m-%d') >= date_format(#{startCreateDate},'%Y-%m-%d')
49
         </if>
61
         </if>

+ 1
- 1
src/main/resources/mapper/TaRecommendCustomerMapper.xml Целия файл

567
                 AND b.building_id = #{buildingId}
567
                 AND b.building_id = #{buildingId}
568
             </if>
568
             </if>
569
             <if test="personBuildingList != null and personBuildingList.size > 0">
569
             <if test="personBuildingList != null and personBuildingList.size > 0">
570
-                AND r.building_id in
570
+                AND b.building_id in
571
                 <foreach collection="personBuildingList" item="personBuilding" open="(" close=")" separator=",">
571
                 <foreach collection="personBuildingList" item="personBuilding" open="(" close=")" separator=",">
572
                     #{personBuilding.buildingId}
572
                     #{personBuilding.buildingId}
573
                 </foreach>
573
                 </foreach>