diff --git a/src/main/java/com/example/demo/app/domain/service/AllocationService.java b/src/main/java/com/example/demo/app/domain/service/AllocationService.java index 753a356..1f922cc 100644 --- a/src/main/java/com/example/demo/app/domain/service/AllocationService.java +++ b/src/main/java/com/example/demo/app/domain/service/AllocationService.java @@ -8,6 +8,4 @@ public interface AllocationService { public List findAll(); - public List save(List allocationModelList); - } diff --git a/src/main/java/com/example/demo/app/domain/service/impl/AllocationServiceImpl.java b/src/main/java/com/example/demo/app/domain/service/impl/AllocationServiceImpl.java index 5f18d33..d2d836c 100644 --- a/src/main/java/com/example/demo/app/domain/service/impl/AllocationServiceImpl.java +++ b/src/main/java/com/example/demo/app/domain/service/impl/AllocationServiceImpl.java @@ -1,6 +1,5 @@ package com.example.demo.app.domain.service.impl; -import java.util.ArrayList; import java.util.List; import org.springframework.stereotype.Service; @@ -26,26 +25,5 @@ public class AllocationServiceImpl implements AllocationService { return AllocationEntity.createAllocationModelList(allocationRepository.findAll()); } - public List save(List allocationModelList) { - - List allocationEntityList = new ArrayList<>(); - - allocationModelList.forEach(allocationModel -> { - allocationEntityList.add( - AllocationModel.convertTo( - categoryRepository.findById(allocationModel.getCategoryId()).get(), - courseRepository.findById(allocationModel.getCourseId()).get(), - allocationModel.getAllocationRatio())); - - }); - - List result = new ArrayList<>(); - for (AllocationEntity allocationEntity : allocationEntityList) { - result.add(AllocationModel.convertFrom(allocationRepository.save(allocationEntity))); - } - - - return result; - } }