傅行帆 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,6 +12,12 @@
12 12
             <if test="buildingId != null and buildingId != ''">
13 13
               and a.building_id = #{buildingId}
14 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 21
             <if test="startCreateDate != null and startCreateDate != ''">
16 22
                 and  date_format(c.create_date,'%Y-%m-%d') >= date_format(#{startCreateDate},'%Y-%m-%d')
17 23
             </if>
@@ -44,6 +50,12 @@
44 50
         <if test="buildingId != null and buildingId != ''">
45 51
             and a.building_id = #{buildingId}
46 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 59
         <if test="startCreateDate != null and startCreateDate != ''">
48 60
             and  date_format(c.create_date,'%Y-%m-%d') >= date_format(#{startCreateDate},'%Y-%m-%d')
49 61
         </if>

+ 1
- 1
src/main/resources/mapper/TaRecommendCustomerMapper.xml ファイルの表示

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