payverse 적용 #344

Merged
klaus merged 44 commits from test into main 2025-10-10 07:44:07 +00:00
3 changed files with 6 additions and 22 deletions
Showing only changes of commit 2ab2a04748 - Show all commits

View File

@@ -26,7 +26,8 @@ class AdminCanQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) : A
can1.can, can1.can,
can1.rewardCan, can1.rewardCan,
can1.price, can1.price,
can1.currency can1.currency,
can1.price.stringValue()
) )
) )
.from(can1) .from(can1)

View File

@@ -23,7 +23,6 @@ import org.springframework.stereotype.Repository
interface CanRepository : JpaRepository<Can, Long>, CanQueryRepository interface CanRepository : JpaRepository<Can, Long>, CanQueryRepository
interface CanQueryRepository { interface CanQueryRepository {
fun findAllByStatus(status: CanStatus): List<CanResponse>
fun findAllByStatusAndCurrency(status: CanStatus, currency: String): List<CanResponse> fun findAllByStatusAndCurrency(status: CanStatus, currency: String): List<CanResponse>
fun getCanUseStatus(member: Member, pageable: Pageable): List<UseCan> fun getCanUseStatus(member: Member, pageable: Pageable): List<UseCan>
fun getCanChargeStatus(member: Member, pageable: Pageable, container: String): List<Charge> fun getCanChargeStatus(member: Member, pageable: Pageable, container: String): List<Charge>
@@ -33,24 +32,6 @@ interface CanQueryRepository {
@Repository @Repository
class CanQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) : CanQueryRepository { class CanQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) : CanQueryRepository {
override fun findAllByStatus(status: CanStatus): List<CanResponse> {
return queryFactory
.select(
QCanResponse(
can1.id,
can1.title,
can1.can,
can1.rewardCan,
can1.price,
can1.currency
)
)
.from(can1)
.where(can1.status.eq(status))
.orderBy(can1.can.asc())
.fetch()
}
override fun findAllByStatusAndCurrency(status: CanStatus, currency: String): List<CanResponse> { override fun findAllByStatusAndCurrency(status: CanStatus, currency: String): List<CanResponse> {
return queryFactory return queryFactory
.select( .select(
@@ -60,7 +41,8 @@ class CanQueryRepositoryImpl(private val queryFactory: JPAQueryFactory) : CanQue
can1.can, can1.can,
can1.rewardCan, can1.rewardCan,
can1.price, can1.price,
can1.currency can1.currency,
can1.price.stringValue()
) )
) )
.from(can1) .from(can1)

View File

@@ -9,5 +9,6 @@ data class CanResponse @QueryProjection constructor(
val can: Int, val can: Int,
val rewardCan: Int, val rewardCan: Int,
val price: BigDecimal, val price: BigDecimal,
val currency: String val currency: String,
val priceStr: String
) )