-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from gutanbug/dev
feat #14 : 팀 상세 조회 로직 추가
- Loading branch information
Showing
7 changed files
with
109 additions
and
1 deletion.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...com/renew/sw/mentoring/domain/completedmission/repository/CompletedMissionRepository.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,14 @@ | ||
package com.renew.sw.mentoring.domain.completedmission.repository; | ||
|
||
import com.renew.sw.mentoring.domain.completedmission.model.entity.CompletedMission; | ||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
public interface CompletedMissionRepository extends JpaRepository<CompletedMission, Long> { | ||
|
||
@Query("select c from CompletedMission c where c.team.id = :teamId") | ||
Page<CompletedMission> findAllByTeamId(Pageable pageable, @Param("teamId") Long teamId); | ||
} |
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
33 changes: 33 additions & 0 deletions
33
src/main/java/com/renew/sw/mentoring/domain/team/model/dto/response/ResponseTeamInfoDto.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,33 @@ | ||
package com.renew.sw.mentoring.domain.team.model.dto.response; | ||
|
||
import com.renew.sw.mentoring.domain.team.model.entity.Team; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
|
||
import javax.validation.constraints.NotNull; | ||
import java.util.List; | ||
|
||
@Getter | ||
public class ResponseTeamInfoDto { | ||
|
||
@Schema(description = "팀명", example = "소웨1조") | ||
private final String teamName; | ||
|
||
@Schema(description = "총 점수", example = "100") | ||
private final int score; | ||
|
||
@Schema(description = "멘토", example = "김멘토") | ||
private final String mentor; | ||
|
||
@Schema(description = "팀원", example = "[김멘토, 김멘티, 김멘티2]") | ||
private final List<String> members; | ||
|
||
public ResponseTeamInfoDto(Team team, | ||
@NotNull String mentor, | ||
@NotNull List<String> members) { | ||
this.teamName = team.getTeamName(); | ||
this.score = team.getScore(); | ||
this.mentor = mentor; | ||
this.members = members; | ||
} | ||
} |
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