Skip to content

Commit

Permalink
Merge pull request #110 from Mojacknong/fix_99/팜클럽-버그수정
Browse files Browse the repository at this point in the history
[fix] 내 팜클럽 단일 조회 시 팜클럽id 추가 반환
  • Loading branch information
MinchoGreenT authored Aug 23, 2024
2 parents 2704fca + f2d07df commit f28f9cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

@Builder
public record GetMyFarmClubResponseDto(
Long farmClubId,
String farmClubName,
String farmClubImage,
Long wholeMemberCount,
Expand All @@ -21,6 +22,7 @@ public record GetMyFarmClubResponseDto(

public static GetMyFarmClubResponseDto of(GetMyFarmClubVo farmClubInfo, List<Step> steps, String advice) {
return GetMyFarmClubResponseDto.builder()
.farmClubId(farmClubInfo.farmClubId())
.farmClubName(farmClubInfo.farmClubName())
.farmClubImage(farmClubInfo.farmClubImage())
.wholeMemberCount(farmClubInfo.wholeMemberCount())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.time.temporal.ChronoUnit;

public record GetMyFarmClubVo(

Long farmClubId,
String farmClubName,
String farmClubImage,
String veggieInfoId,
Expand All @@ -18,6 +18,7 @@ public record GetMyFarmClubVo(
) {
public static GetMyFarmClubVo of(BaseInfo baseInfo, Long wholeMemberCount, Integer currentStep,LocalDate dayRegister) {
return new GetMyFarmClubVo(
baseInfo.farmClubId(),
baseInfo.farmClubName(),
baseInfo.farmClubImage(),
baseInfo.veggieInfoId(),
Expand All @@ -28,6 +29,7 @@ public static GetMyFarmClubVo of(BaseInfo baseInfo, Long wholeMemberCount, Integ
}

public record BaseInfo(
Long farmClubId,
String farmClubName,
String farmClubImage,
String veggieInfoId
Expand All @@ -36,6 +38,7 @@ public record BaseInfo(
@QueryProjection
public BaseInfo(FarmClub farmClub) {
this(
farmClub.getId(),
farmClub.getName(),
farmClub.getVeggieImage(),
farmClub.getVeggieInfoId()
Expand Down

0 comments on commit f28f9cd

Please sign in to comment.