forked from 9oormthon-univ/2024_DANPOONG_TEAM_5_BE
-
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 branch 'develop' of https://github.com/LEEJaeHyeok97/2024_DANPO…
…ONG_TEAM_5_BE into develop
- Loading branch information
Showing
13 changed files
with
343 additions
and
101 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
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
22 changes: 22 additions & 0 deletions
22
src/main/java/com/jangburich/domain/payment/domain/TeamChargeHistoryResponse.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,22 @@ | ||
package com.jangburich.domain.payment.domain; | ||
|
||
import com.querydsl.core.annotations.QueryProjection; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record TeamChargeHistoryResponse( | ||
Long id, | ||
String transactionId, | ||
Integer paymentAmount, | ||
PaymentChargeStatus paymentChargeStatus | ||
) { | ||
@QueryProjection | ||
public TeamChargeHistoryResponse(Long id, String transactionId, Integer paymentAmount, | ||
PaymentChargeStatus paymentChargeStatus) { | ||
this.id = id; | ||
this.transactionId = transactionId; | ||
this.paymentAmount = paymentAmount; | ||
this.paymentChargeStatus = paymentChargeStatus; | ||
} | ||
} |
16 changes: 14 additions & 2 deletions
16
...ain/java/com/jangburich/domain/payment/domain/repository/TeamChargeHistoryRepository.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,11 +1,23 @@ | ||
package com.jangburich.domain.payment.domain.repository; | ||
|
||
import com.jangburich.domain.payment.domain.TeamChargeHistory; | ||
import java.util.Optional; | ||
|
||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import com.jangburich.domain.payment.domain.TeamChargeHistory; | ||
import com.jangburich.domain.payment.domain.TeamChargeHistoryResponse; | ||
import com.jangburich.domain.store.domain.Store; | ||
import com.jangburich.domain.store.domain.StoreChargeHistoryResponse; | ||
import com.jangburich.domain.team.domain.Team; | ||
|
||
@Repository | ||
public interface TeamChargeHistoryRepository extends JpaRepository<TeamChargeHistory, Long> { | ||
Optional<TeamChargeHistory> findByTransactionId(String tid); | ||
Optional<TeamChargeHistory> findByTransactionId(String tid); | ||
|
||
Page<TeamChargeHistoryResponse> findAllByTeam(Team team, Pageable pageable); | ||
|
||
Page<StoreChargeHistoryResponse> findAllByStore(Store store, Pageable pageable); | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/com/jangburich/domain/store/domain/StoreChargeHistoryResponse.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.jangburich.domain.store.domain; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalDateTime; | ||
|
||
import com.querydsl.core.annotations.QueryProjection; | ||
|
||
public record StoreChargeHistoryResponse( | ||
Long id, | ||
LocalDateTime createdAt, | ||
String teamName, | ||
Integer paymentAmount | ||
) { | ||
@QueryProjection | ||
public StoreChargeHistoryResponse(Long id, LocalDateTime createdAt, String teamName, Integer paymentAmount) { | ||
this.id = id; | ||
this.createdAt = createdAt; | ||
this.teamName = teamName; | ||
this.paymentAmount = paymentAmount; | ||
} | ||
} |
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
27 changes: 27 additions & 0 deletions
27
src/main/java/com/jangburich/domain/store/domain/StoreTeamResponseDTO.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,27 @@ | ||
package com.jangburich.domain.store.domain; | ||
|
||
import com.querydsl.core.annotations.QueryProjection; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record StoreTeamResponseDTO( | ||
Long id, | ||
Integer remainPoint, | ||
Long teamId, | ||
String teamName, | ||
String teamDescription, | ||
Long storeId | ||
|
||
) { | ||
@QueryProjection | ||
public StoreTeamResponseDTO(Long id, Integer remainPoint, Long teamId, String teamName, String teamDescription, | ||
Long storeId) { | ||
this.id = id; | ||
this.remainPoint = remainPoint; | ||
this.teamId = teamId; | ||
this.teamName = teamName; | ||
this.teamDescription = teamDescription; | ||
this.storeId = storeId; | ||
} | ||
} |
Oops, something went wrong.