-
Notifications
You must be signed in to change notification settings - Fork 0
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 #24 from Mojacknong/feature_6/farmclub-기본-api
Feature 6/farmclub 기본 api
- Loading branch information
Showing
12 changed files
with
112 additions
and
13 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
21 changes: 21 additions & 0 deletions
21
...ain/java/com/modernfarmer/farmusspring/domain/farmclub/dto/res/GetHelpAllResponseDto.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,21 @@ | ||
package com.modernfarmer.farmusspring.domain.farmclub.dto.res; | ||
|
||
import com.modernfarmer.farmusspring.domain.veggieinfo.entity.VeggieInfo; | ||
import com.modernfarmer.farmusspring.domain.veggieinfo.vo.StepVo; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
|
||
import java.util.List; | ||
|
||
@Builder(access = AccessLevel.PRIVATE) | ||
public record GetHelpAllResponseDto( | ||
VeggieInfo.Help help, | ||
List<StepVo> steps | ||
) { | ||
public static GetHelpAllResponseDto of(VeggieInfo.Help help, List<StepVo> steps) { | ||
return builder() | ||
.help(help) | ||
.steps(steps) | ||
.build(); | ||
} | ||
} |
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
8 changes: 8 additions & 0 deletions
8
...om/modernfarmer/farmusspring/domain/farmclub/repository/UserFarmClubRepositoryCustom.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,8 @@ | ||
package com.modernfarmer.farmusspring.domain.farmclub.repository; | ||
|
||
import com.modernfarmer.farmusspring.domain.farmclub.entity.UserFarmClub; | ||
|
||
public interface UserFarmClubRepositoryCustom { | ||
|
||
UserFarmClub findByUserIdAndFarmClubId(Long userId, Long farmClubId); | ||
} |
23 changes: 23 additions & 0 deletions
23
.../com/modernfarmer/farmusspring/domain/farmclub/repository/UserFarmClubRepositoryImpl.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,23 @@ | ||
package com.modernfarmer.farmusspring.domain.farmclub.repository; | ||
|
||
import com.modernfarmer.farmusspring.domain.farmclub.entity.UserFarmClub; | ||
import com.querydsl.jpa.impl.JPAQueryFactory; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
import static com.modernfarmer.farmusspring.domain.farmclub.entity.QUserFarmClub.userFarmClub; | ||
|
||
@RequiredArgsConstructor | ||
public class UserFarmClubRepositoryImpl implements UserFarmClubRepositoryCustom { | ||
|
||
private final JPAQueryFactory queryFactory; | ||
|
||
@Override | ||
public UserFarmClub findByUserIdAndFarmClubId(Long userId, Long farmClubId) { | ||
return queryFactory | ||
.select(userFarmClub) | ||
.from(userFarmClub) | ||
.where(userFarmClub.userId.eq(userId) | ||
.and(userFarmClub.farmClub.id.eq(farmClubId))) | ||
.fetchOne(); | ||
} | ||
} |
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
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