From a89c54f8c0be3b81503242377b8cf852a9dc698a Mon Sep 17 00:00:00 2001 From: kkazuya Date: Thu, 17 Sep 2026 15:49:11 +0900 Subject: [PATCH] =?UTF-8?q?[ADD]=20Course,=20CoureseInfo=E3=81=AE=E3=82=B5?= =?UTF-8?q?=E3=83=BC=E3=83=93=E3=82=B9=E3=81=A8=E3=81=9D=E3=82=8C=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85=E3=81=97=E3=81=9F=E3=82=AF=E3=83=A9=E3=82=B9?= =?UTF-8?q?=E3=82=92=E4=BD=9C=E6=88=90=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/domain/service/CourseInfoService.java | 10 ++++++++ .../app/domain/service/CourseService.java | 11 +++++++++ .../service/impl/CourseInfoServiceImpl.java | 23 ++++++++++++++++++ .../service/impl/CourseServiceImpl.java | 24 +++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 src/main/java/com/example/demo/app/domain/service/CourseInfoService.java create mode 100644 src/main/java/com/example/demo/app/domain/service/CourseService.java create mode 100644 src/main/java/com/example/demo/app/domain/service/impl/CourseInfoServiceImpl.java create mode 100644 src/main/java/com/example/demo/app/domain/service/impl/CourseServiceImpl.java diff --git a/src/main/java/com/example/demo/app/domain/service/CourseInfoService.java b/src/main/java/com/example/demo/app/domain/service/CourseInfoService.java new file mode 100644 index 0000000..83cf4ab --- /dev/null +++ b/src/main/java/com/example/demo/app/domain/service/CourseInfoService.java @@ -0,0 +1,10 @@ +package com.example.demo.app.domain.service; + +import java.util.List; + +import com.example.demo.app.domain.model.CourseInfoModel; + +public interface CourseInfoService { + + public List findAll(); +} diff --git a/src/main/java/com/example/demo/app/domain/service/CourseService.java b/src/main/java/com/example/demo/app/domain/service/CourseService.java new file mode 100644 index 0000000..4681860 --- /dev/null +++ b/src/main/java/com/example/demo/app/domain/service/CourseService.java @@ -0,0 +1,11 @@ +package com.example.demo.app.domain.service; + +import java.util.List; + +import com.example.demo.app.domain.model.CourseModel; + +public interface CourseService { + + public List findAll(); + +} diff --git a/src/main/java/com/example/demo/app/domain/service/impl/CourseInfoServiceImpl.java b/src/main/java/com/example/demo/app/domain/service/impl/CourseInfoServiceImpl.java new file mode 100644 index 0000000..4658a18 --- /dev/null +++ b/src/main/java/com/example/demo/app/domain/service/impl/CourseInfoServiceImpl.java @@ -0,0 +1,23 @@ +package com.example.demo.app.domain.service.impl; + +import java.util.List; + +import org.springframework.stereotype.Service; + +import com.example.demo.app.domain.model.CourseInfoModel; +import com.example.demo.app.domain.service.CourseInfoService; +import com.example.demo.app.infra.repository.AllocationRepository; + +import lombok.RequiredArgsConstructor; + +@Service +@RequiredArgsConstructor +public class CourseInfoServiceImpl implements CourseInfoService { + + private final AllocationRepository allocationRepository; + + @Override + public List findAll() { + return allocationRepository.findAllJoinedAllocation(); + } +} diff --git a/src/main/java/com/example/demo/app/domain/service/impl/CourseServiceImpl.java b/src/main/java/com/example/demo/app/domain/service/impl/CourseServiceImpl.java new file mode 100644 index 0000000..a4dec5f --- /dev/null +++ b/src/main/java/com/example/demo/app/domain/service/impl/CourseServiceImpl.java @@ -0,0 +1,24 @@ +package com.example.demo.app.domain.service.impl; + +import java.util.List; + +import org.springframework.stereotype.Service; + +import com.example.demo.app.domain.model.CourseModel; +import com.example.demo.app.domain.service.CourseService; +import com.example.demo.app.infra.entity.CourseEntity; +import com.example.demo.app.infra.repository.CourseRepository; + +import lombok.RequiredArgsConstructor; + +@Service +@RequiredArgsConstructor +public class CourseServiceImpl implements CourseService { + + private final CourseRepository courseRepository; + + public List findAll(){ + return CourseEntity.createCourseModelList(courseRepository.findAll()); + } + +}