kerry 5 years ago
parent
commit
3a54866eec

+ 4 - 6
elastic-publish-service/src/main/resources/mapper/AgencyMapper.xml View File

@@ -83,12 +83,10 @@
83 83
         TAE.AGENCY_ATTRIBUTE_CLASS_ID
84 84
         FROM (select *
85 85
         from T_AGENCY I_TAG
86
-        <where>
87
-            where I_TAG.AGENCY_ID in
88
-            <foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
89
-                    ${item}
90
-            </foreach>
91
-        </where>
86
+        where I_TAG.AGENCY_ID in
87
+        <foreach collection="ids" item="id" index="index" open="(" separator="," close=")">
88
+            ${id}
89
+        </foreach>
92 90
         ) TAG
93 91
         INNER JOIN T_UNIT TU ON TU.AGENCY_ID = TAG.AGENCY_ID
94 92
         INNER JOIN T_BUILDING TB ON TB.BUILDING_ID = TU.BUILDING_ID

+ 1 - 1
elastic-publish-service/src/test/java/com/vcarecity/publish/mapper/AgencyMapperTest.java View File

@@ -49,7 +49,7 @@ public class AgencyMapperTest {
49 49
     @Test
50 50
     public void loadByAgencyIds() {
51 51
         List<Long> ids = new ArrayList<>();
52
-        ids.add(80424L);
52
+        ids.add(299L);
53 53
 
54 54
         List<UnitAgencyMergeEntity> unitAgencyMergeEntities = agencyMapper.loadByAgencyIds(ids);
55 55
         for (UnitAgencyMergeEntity unitAgencyMergeEntity : unitAgencyMergeEntities) {