Open
Conversation
…atus 객체를 찾는 findallByUserId 메서드 구현
…adStatusRepository: 유저를 받아 특정 채널의 메시지 수신 정보 생성, 수정, 특정 유저의 메시지 수신 여부 조회 기능 구현
…adStatusRepository: 유저를 받아 특정 채널의 메시지 수신 정보 생성, 수정, 특정 유저의 메시지 수신 여부 조회 기능 구현
UserService: userStatus탐색 과정에서의 버그 수정
userResponseDto: 요구조건에 맞추어 dto 내부로 전달되는 데이터 개수 증가
Collaborator
|
커밋 메세지에 대한 규칙을 컨벤션으로 적용해보시면 좋습니다 |
joonfluence
reviewed
Feb 14, 2026
Comment on lines
+1
to
+7
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip | ||
| networkTimeout=10000 | ||
| validateDistributionUrl=true | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
joonfluence
reviewed
Feb 14, 2026
Comment on lines
+23
to
+29
| //이미지 단순 조회(프로필, 메시지 내 파일 단일 모두 가능) | ||
| @RequestMapping(value = "/api/binaryContent/find", method = RequestMethod.GET) | ||
| public ResponseEntity<BinaryContent> getSimpleFiles( | ||
| @RequestParam UUID binaryContentId | ||
| ){ | ||
| return ResponseEntity.ok(binaryContentService.find(binaryContentId)); | ||
| } |
Collaborator
There was a problem hiding this comment.
RESTFul API에서 GET이 이미 자원에 대한 조회의 의미를 내포하기 때문에 /find 굳이 추가할 필요 없습니다!
joonfluence
reviewed
Feb 14, 2026
Comment on lines
+21
to
+33
| @RequestMapping(value = "/public", method = RequestMethod.POST) | ||
| public ChannelResponseDto postPublicChannel( | ||
| @RequestBody PublicChannelCreateRequestDto requestDto | ||
| ){ | ||
| return channelService.createPublicChannel(requestDto); | ||
| } | ||
|
|
||
| @RequestMapping(value = "/private", method = RequestMethod.POST) | ||
| public ChannelResponseDto postPrivateChannel( | ||
| @RequestBody PrivateChannelCreateRequestDto requestDto | ||
| ){ | ||
| return channelService.createPrivateChannel(requestDto); | ||
| } |
Collaborator
There was a problem hiding this comment.
과제에서 요구사항 대로 하신 것 같아 이해하지만, [POST] "/api/channels/public, private" private, public을 Body 값 안에 넣어서 처리하는 방식이 더 깔끔할 것 같긴 합니다. 정말 분리되어야 하면 모르겠지만 거의 구현 코드가 비슷할거거든요
joonfluence
reviewed
Feb 14, 2026
Comment on lines
+26
to
+41
| public MessageResponseDto postMessage( | ||
| @PathVariable UUID channelId, | ||
| @RequestPart("dto") MessageCreateRequestDto requestDto, | ||
| @RequestPart(value = "attachments", required = false) List<MultipartFile> attachments | ||
| )throws IOException { | ||
|
|
||
| if (attachments != null && !attachments.isEmpty()) { | ||
| for (MultipartFile file : attachments) { | ||
| if (file == null || file.isEmpty()) continue; | ||
|
|
||
| String fileName = file.getOriginalFilename(); | ||
| Path savePath = Paths.get("./upload/" + fileName); | ||
| Files.createDirectories(savePath.getParent()); | ||
| file.transferTo(savePath); | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
이 로직들이 Controller에 있는게 맞을까요?
joonfluence
reviewed
Feb 14, 2026
Collaborator
There was a problem hiding this comment.
ResponseDTO 별도로 선언해주신 것 좋네요 👍
joonfluence
reviewed
Feb 14, 2026
Comment on lines
+1
to
+15
| package com.sprint.mission.discodeit.mapper.channel; | ||
|
|
||
| import com.sprint.mission.discodeit.dto.channel.ChannelResponseDto; | ||
| import com.sprint.mission.discodeit.entity.Channel; | ||
| import org.mapstruct.Mapper; | ||
| import org.mapstruct.Mapping; | ||
|
|
||
| import java.time.Instant; | ||
|
|
||
| @Mapper(componentModel = "spring") | ||
| public interface ChannelResponseMapper { | ||
|
|
||
| @Mapping(source = "lastMessageTime", target = "lastMessageTime") | ||
| ChannelResponseDto toDto(Instant lastMessageTime, Channel channel); | ||
| } |
Collaborator
There was a problem hiding this comment.
MapStruct 사용 및 Mapper로 별도로 분리하신 것 좋네요 👍
joonfluence
reviewed
Feb 14, 2026
| Channel channel = channelRepository.findById(updateRequestDto.channelId()) | ||
| .orElseThrow(() -> new NoSuchElementException("Channel with id " + updateRequestDto.channelId() + " not found")); | ||
|
|
||
| if(channel.getType()==PRIVATE) throw new AssertionError("Cannot update private channel"); |
Collaborator
There was a problem hiding this comment.
ChannelType.PRIVATE.equals(targetChannel.getType())
joonfluence
reviewed
Feb 14, 2026
src/main/java/com/sprint/mission/discodeit/service/basic/BasicChannelService.java
Show resolved
Hide resolved
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요구사항
기본
웹 API 구현
심화
API테스트
sprint 4.postman_collection.json
주요 변경사항
스크린샷
멘토에게