xiari 1 年之前
父節點
當前提交
cbd05338bc

+ 2 - 2
ruoyi-modules/ruoyi-hotel/src/main/java/org/dromara/hotel/service/impl/KfTeamServiceImpl.java

@@ -167,12 +167,12 @@ public class KfTeamServiceImpl implements IKfTeamService {
         //3.处理新的客人
         if (newGuests.size() > 0) {
             List<Long> guestIdList =
-                newGuests.stream().filter(item -> item.getId() != null).map(item -> item.getId()).toList();
+                new java.util.ArrayList<>(newGuests.stream().filter(item -> item.getId() != null).map(item -> item.getId()).toList());
             List<KfGuestBo> noIdBoList = newGuests.stream().filter(item -> item.getId() == null).toList();
             if (noIdBoList != null && noIdBoList.size() > 0) {
                 Collection<KfGuest> noIdList = MapstructUtils.convert(noIdBoList, KfGuest.class);
                 guestMapper.insertBatch(noIdList);
-                noIdList.stream().forEach(item -> guestIdList.add(item.getId()));
+                noIdList.forEach(item -> guestIdList.add(item.getId()));
             }
             //3.新增客人客团关系
             List<KfGuestTeamR> relations = guestIdList.stream().map(item -> {