Explorar el Código

fix 目录删除

18339543638 hace 3 años
padre
commit
c8c3681e34

+ 1 - 3
jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/entity/DeviceCategory.java

@@ -8,6 +8,7 @@ import org.hswebframework.web.api.crud.entity.GenericEntity;
 import org.hswebframework.web.api.crud.entity.GenericTreeSortSupportEntity;
 
 import javax.persistence.Column;
+import javax.persistence.Id;
 import javax.persistence.Table;
 import java.util.List;
 
@@ -17,9 +18,6 @@ import java.util.List;
 @Data
 public class DeviceCategory extends GenericTreeSortSupportEntity<String> {
 
-    @Schema(description = "ID")
-    @Column(name = "id")
-    private String id;
 
     @Schema(description = "标识")
     @Column(name = "key")

+ 1 - 1
jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/web/DeviceCategoryController.java

@@ -76,7 +76,7 @@ public class DeviceCategoryController implements
                     return Mono.just(productCount);
                 }
             })
-            .doOnNext(productCount-> this.service.deleteById(Mono.just(id)))
+            .flatMap(productCount-> this.service.deleteById(Mono.just(id)))
             ;
     }