Browse Source

元宇宙万岛相关协议

sunkean 3 năm trước cách đây
mục cha
commit
0156e73ca0

+ 4 - 0
src/main/java/com/izouma/nineth/service/MetaSpatialWharfService.java

@@ -103,6 +103,10 @@ public class MetaSpatialWharfService {
         List<MetaBoatDTO> metaBoatDTOS = new ArrayList<>();
         List<MetaBoatDTO> metaBoatDTOS = new ArrayList<>();
         boatTypes.forEach(type -> {
         boatTypes.forEach(type -> {
             List<Long> parkingBoatIds = metaSpatialWharfRepo.findParkingBoatIds(SecurityUtils.getAuthenticatedUser().getId());
             List<Long> parkingBoatIds = metaSpatialWharfRepo.findParkingBoatIds(SecurityUtils.getAuthenticatedUser().getId());
+            if (CollectionUtils.isEmpty(parkingBoatIds)) {
+                parkingBoatIds = new ArrayList<>();
+                parkingBoatIds.add(0L);
+            }
             List<Asset> assets = findAllBoatsByType(type, parkingBoatIds);
             List<Asset> assets = findAllBoatsByType(type, parkingBoatIds);
             if (CollectionUtils.isNotEmpty(assets)) {
             if (CollectionUtils.isNotEmpty(assets)) {
                 assets.forEach(asset -> {
                 assets.forEach(asset -> {