Compare commits
2 Commits
952c6f69d8
...
20b4366d91
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20b4366d91 | ||
|
|
8b6e20cb3a |
@@ -5,6 +5,6 @@ import java.util.List;
|
||||
import com.example.demo.app.domain.model.CourseInfoModel;
|
||||
|
||||
public interface CourseInfoService {
|
||||
//
|
||||
|
||||
public List<CourseInfoModel> findAll();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.List;
|
||||
import com.example.demo.app.domain.model.CourseModel;
|
||||
|
||||
public interface CourseService {
|
||||
//
|
||||
|
||||
public List<CourseModel> findAll();
|
||||
|
||||
}
|
||||
|
||||
@@ -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.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<CourseInfoModel> findAll() {
|
||||
return allocationRepository.findAllJoinedAllocation();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,5 +21,4 @@ public class CourseServiceImpl implements CourseService {
|
||||
|
||||
return CourseEntity.createCourseModelList(courseRepository.findAll());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user