gushoubang hai 1 ano
pai
achega
66a61bc194

+ 2 - 0
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/mapper/vector/TableDataMapper.java

@@ -29,4 +29,6 @@ public interface TableDataMapper {
     void delInIds(@Param("tableName") String tableName, @Param("ids") List<String> ids);
 
     void delOutIds(@Param("tableName") String tableName, @Param("ids") List<String> ids);
+
+    void clearTable(@Param("tableName") String tableName);
 }

+ 5 - 1
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/service/impl/TableDateServiceImpl.java

@@ -65,6 +65,10 @@ public class TableDateServiceImpl implements ITableDateService {
 
     @Override
     public void delOutIds(String tableName, List<String> ids) {
-        tableDataMapper.delOutIds(tableName, ids);
+        if (ids.size() != 0) {
+            tableDataMapper.delOutIds(tableName, ids);
+        } else {
+            tableDataMapper.clearTable(tableName);
+        }
     }
 }

+ 4 - 0
onemap-modules/onemap-analyse/src/main/resources/mapper/oracle/vector/TableDateMapper.xml

@@ -165,4 +165,8 @@
             #{id}
         </foreach>
     </delete>
+    <delete id="clearTable">
+        DELETE
+        FROM "${tableName}"
+    </delete>
 </mapper>