-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
87 changed files
with
2,196 additions
and
1,221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
src/main/java/com/prgrms2/java/bitta/apply/service/ApplyService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/main/java/com/prgrms2/java/bitta/apply/util/ApplyProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/main/java/com/prgrms2/java/bitta/feed/exception/FeedTaskException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package com.prgrms2.java.bitta.feed.exception; | ||
|
||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/com/prgrms2/java/bitta/feed/service/FeedProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.prgrms2.java.bitta.feed.service; | ||
|
||
import com.prgrms2.java.bitta.feed.entity.Feed; | ||
import com.prgrms2.java.bitta.feed.repository.FeedRepository; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class FeedProvider { | ||
private final FeedRepository feedRepository; | ||
|
||
@Transactional(readOnly = true) | ||
public Feed getById(Long id) { | ||
return feedRepository.findById(id).orElse(null); | ||
} | ||
} |
15 changes: 9 additions & 6 deletions
15
src/main/java/com/prgrms2/java/bitta/feed/service/FeedService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
package com.prgrms2.java.bitta.feed.service; | ||
|
||
import com.prgrms2.java.bitta.feed.dto.FeedDTO; | ||
import com.prgrms2.java.bitta.member.entity.Member; | ||
import com.prgrms2.java.bitta.media.dto.MediaDto; | ||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.web.multipart.MultipartFile; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
|
||
public interface FeedService { | ||
FeedDTO read(Long id); | ||
|
||
List<FeedDTO> readAll(); | ||
|
||
List<FeedDTO> readAll(Member member); | ||
Page<FeedDTO> readAll(Pageable pageable, String username, String title); | ||
|
||
void insert(FeedDTO feedDto, List<MultipartFile> files); | ||
|
||
void update(FeedDTO feedDto, List<MultipartFile> filesToUpload, List<String> filepathsToDelete); | ||
void update(FeedDTO feedDto, List<MultipartFile> filesToUpload, List<MediaDto> filesToDelete); | ||
|
||
void delete(Long id); | ||
|
||
List<FeedDTO> readRandomFeeds(int limit); | ||
|
||
boolean checkAuthority(Long feedId, String memberId); | ||
} |
Oops, something went wrong.