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