Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a998f2c
feat: responseDto 생성
1971123-seongmin Jan 4, 2026
b29d03a
feat: domain 모델 및 mapper 추가
1971123-seongmin Jan 4, 2026
4edc98f
feat: 서버통신 코드 추가 (repo/Impl, dataSource/Impl, service)
1971123-seongmin Jan 4, 2026
176cb25
feat: 서버통신 모듈 생성
1971123-seongmin Jan 4, 2026
768bbd4
feat: 앱잽탬프 팀 랭킹 ui 모델, State 생성
1971123-seongmin Jan 4, 2026
a960fed
feat: 앱잽탬프 팀 랭킹 뷰모델 추가
1971123-seongmin Jan 4, 2026
7b9da05
feat: AppjamtampRankingScreen api 연결
1971123-seongmin Jan 4, 2026
91b4e9e
feat: 앱잽탬프 팀 랭킹 컴포넌트 연결 및 각각의 파일 두개로 분리
1971123-seongmin Jan 4, 2026
c52633f
Merge branch 'develop' into feat/#1449-appjamtamp-api
1971123-seongmin Jan 4, 2026
e4afc4e
Merge branch 'develop' into feat/#1449-appjamtamp-api
1971123-seongmin Jan 5, 2026
6cdd693
mod: 브랜치 충돌 해결
1971123-seongmin Jan 5, 2026
20da69f
chore: api 설명 주석 추가
1971123-seongmin Jan 5, 2026
5c111ba
mod: 코드리뷰 반영, column + row 구조 수정
1971123-seongmin Jan 5, 2026
19c6409
mod: 코드리뷰 반영, UiModel ImmutableList 적용
1971123-seongmin Jan 5, 2026
d3e009f
feat: 코드리뷰 반영, AppjamtampRankingViewModel api 실패 시 에러 로그 추가
1971123-seongmin Jan 5, 2026
646725b
feat: AppjamtampMissionEntity nullable 빠진 부분 추가 및 AppjamtampMissionLi…
1971123-seongmin Jan 5, 2026
d6f16af
feat: AppjamtampMissionListUiModel 추가
1971123-seongmin Jan 5, 2026
af23a14
mod: AppjamtampMission 앱잼팀 이름 서버 응답 적용
1971123-seongmin Jan 5, 2026
14b0590
mod: AppjamtampTeamMissionList api 연결
1971123-seongmin Jan 5, 2026
87bca33
mod: 앱잼팀 랭킹 클릭 함수 추가
1971123-seongmin Jan 5, 2026
e43a2f5
Merge branch 'develop' into feat/#1449-appjamtamp-api
1971123-seongmin Jan 5, 2026
8217660
mod: 접근지정자 수정
1971123-seongmin Jan 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.sopt.official.data.appjamtamp.datasource

import org.sopt.official.data.appjamtamp.dto.response.AppjamtampTop10MissionScoreResponse
import org.sopt.official.data.appjamtamp.dto.response.AppjamtampTop3RecentMissionResponse

interface AppjamtampDataSource {
suspend fun getAppjamtampMissionTop3(size: Int): AppjamtampTop3RecentMissionResponse
suspend fun getAppjamtampMissionRanking(size: Int): AppjamtampTop10MissionScoreResponse
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.sopt.official.data.appjamtamp.datasourceimpl

import org.sopt.official.data.appjamtamp.datasource.AppjamtampDataSource
import org.sopt.official.data.appjamtamp.dto.response.AppjamtampTop10MissionScoreResponse
import org.sopt.official.data.appjamtamp.dto.response.AppjamtampTop3RecentMissionResponse
import org.sopt.official.data.appjamtamp.service.AppjamtampService
import javax.inject.Inject

internal class AppjamtampDataSourceImpl @Inject constructor(
private val appjamtampService: AppjamtampService
) : AppjamtampDataSource {

override suspend fun getAppjamtampMissionTop3(size: Int): AppjamtampTop3RecentMissionResponse {
return appjamtampService.getAppjamtampMissionTop3(size = size)
}

override suspend fun getAppjamtampMissionRanking(size: Int): AppjamtampTop10MissionScoreResponse {
return appjamtampService.getAppjamtampMissionRanking(size = size)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.sopt.official.data.appjamtamp.di

import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import org.sopt.official.data.appjamtamp.datasource.AppjamtampDataSource
import org.sopt.official.data.appjamtamp.datasourceimpl.AppjamtampDataSourceImpl
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
internal abstract class DataSourceModule {
@Binds
@Singleton
abstract fun bindAppjamtampDataSource(appjamtampDataSourceImpl: AppjamtampDataSourceImpl): AppjamtampDataSource
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.sopt.official.data.appjamtamp.di

import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import org.sopt.official.data.appjamtamp.repository.AppjamtampRepositoryImpl
import org.sopt.official.domain.appjamtamp.repository.AppjamtampRepository
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
abstract class RepositoryModule {

@Binds
@Singleton
abstract fun bindAppjamtampRepository(
appjamtampRepositoryImpl: AppjamtampRepositoryImpl
): AppjamtampRepository


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

진짜 정말 아주 사소한건데.. 빈줄이 2줄이나 들어감!!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앗 이거는 민성님이 만들어둔 것 그대로 가져온거라 (나중에 충돌 안나게 하기 위함 입니다) 그런 것 같아요 나중에 수정하도록 할게요

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.sopt.official.data.appjamtamp.di

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import org.sopt.official.common.di.AppRetrofit
import org.sopt.official.data.appjamtamp.service.AppjamtampService
import retrofit2.Retrofit
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
internal object ServiceModule {
@Provides
@Singleton
fun provideAppjamtampService(@AppRetrofit(true) retrofit: Retrofit): AppjamtampService =
retrofit.create(AppjamtampService::class.java)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package org.sopt.official.data.appjamtamp.dto.response

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class AppjamtampTop10MissionScoreResponse(
@SerialName("ranks")
val ranks: List<AppjamtampMissionScoreResponse>
)

@Serializable
data class AppjamtampMissionScoreResponse(
@SerialName("rank")
val rank: Int,

@SerialName("teamName")
val teamName: String,

@SerialName("todayPoints")
val todayPoints: Int,

@SerialName("totalPoints")
val totalPoints: Int
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package org.sopt.official.data.appjamtamp.dto.response

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class AppjamtampTop3RecentMissionResponse(
@SerialName("ranks")
val ranks: List<AppjamtampRecentMissionResponse>
)

@Serializable
data class AppjamtampRecentMissionResponse(
@SerialName("stampId")
val stampId: Long,

@SerialName("missionId")
val missionId: Long,

@SerialName("userId")
val userId: Long,

@SerialName("imageUrl")
val imageUrl: String,

@SerialName("createdAt")
val createdAt: String?,

@SerialName("userName")
val userName: String,

@SerialName("userProfileImage")
val userProfileImage: String?,

@SerialName("teamName")
val teamName: String,

@SerialName("teamNumber")
val teamNumber: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package org.sopt.official.data.appjamtamp.mapper

import org.sopt.official.data.appjamtamp.dto.response.AppjamtampMissionScoreResponse
import org.sopt.official.data.appjamtamp.dto.response.AppjamtampRecentMissionResponse
import org.sopt.official.data.appjamtamp.dto.response.AppjamtampTop3RecentMissionResponse
import org.sopt.official.data.appjamtamp.dto.response.AppjamtampTop10MissionScoreResponse
import org.sopt.official.domain.appjamtamp.entity.AppjamtampMissionScore
import org.sopt.official.domain.appjamtamp.entity.AppjamtampRecentMission


internal fun AppjamtampTop3RecentMissionResponse.toDomain(): List<AppjamtampRecentMission> {
return this.ranks.map { it.toDomain() }
}

internal fun AppjamtampRecentMissionResponse.toDomain(): AppjamtampRecentMission {
return AppjamtampRecentMission(
stampId = this.stampId,
missionId = this.missionId,
userId = this.userId,
imageUrl = this.imageUrl,
createdAt = this.createdAt,
userName = this.userName,
userProfileImage = this.userProfileImage,
teamName = this.teamName,
teamNumber = this.teamNumber
)
}

internal fun AppjamtampTop10MissionScoreResponse.toDomain(): List<AppjamtampMissionScore> {
return this.ranks.map { it.toDomain() }
}

internal fun AppjamtampMissionScoreResponse.toDomain(): AppjamtampMissionScore {
return AppjamtampMissionScore(
rank = this.rank,
teamName = this.teamName,
todayPoints = this.todayPoints,
totalPoints = this.todayPoints
)
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.sopt.official.data.appjamtamp.repository

import org.sopt.official.common.coroutines.suspendRunCatching
import org.sopt.official.data.appjamtamp.datasource.AppjamtampDataSource
import org.sopt.official.data.appjamtamp.mapper.toDomain
import org.sopt.official.data.appjamtamp.service.AppjamtampService
import org.sopt.official.domain.appjamtamp.entity.AppjamtampMissionScore
import org.sopt.official.domain.appjamtamp.entity.AppjamtampRecentMission
import org.sopt.official.domain.appjamtamp.repository.AppjamtampRepository
import javax.inject.Inject

class AppjamtampRepositoryImpl @Inject constructor(
private val appjamtampDataSource: AppjamtampDataSource
): AppjamtampRepository {
override suspend fun getAppjamtampMissionRanking(
size: Int
): Result<List<AppjamtampMissionScore>> = suspendRunCatching {
appjamtampDataSource.getAppjamtampMissionRanking(size = size).toDomain()
}

override suspend fun getAppjamtampMissionTop3(
size: Int
): Result<List<AppjamtampRecentMission>> = suspendRunCatching {
appjamtampDataSource.getAppjamtampMissionTop3(size = size).toDomain()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.sopt.official.data.appjamtamp.service

import org.sopt.official.data.appjamtamp.dto.response.AppjamtampTop3RecentMissionResponse
import org.sopt.official.data.appjamtamp.dto.response.AppjamtampTop10MissionScoreResponse
import retrofit2.http.GET
import retrofit2.http.Query

interface AppjamtampService {

// 자신의 앱잼 정보 조회
// /user/appjam-info

// 앱잼팀 오늘의 득점 랭킹 TOP10 조회하기
@GET("appjamrank/today")
suspend fun getAppjamtampMissionRanking(
@Query("size") size: Int? = 10
): AppjamtampTop10MissionScoreResponse

// 앱잼팀 랭킹 최근 인증한 미션 TOP3 조회하기
@GET("appjamrank/recent")
suspend fun getAppjamtampMissionTop3(
@Query("size") size: Int? = 3
): AppjamtampTop3RecentMissionResponse

// 앱잼탬프 미션 목록 조회하기
// /appjamtamp/mission?teamNumber={teamNumber}&isCompleted=true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package org.sopt.official.domain.appjamtamp.entity

data class AppjamtampMissionScore(
val rank: Int,
val teamName: String,
val todayPoints: Int,
val totalPoints: Int
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.sopt.official.domain.appjamtamp.entity

data class AppjamtampRecentMission(
val stampId: Long,
val missionId: Long,
val userId: Long,
val imageUrl: String,
val createdAt: String?,
val userName: String,
val userProfileImage: String?,
val teamName: String,
val teamNumber: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.sopt.official.domain.appjamtamp.repository

import org.sopt.official.domain.appjamtamp.entity.AppjamtampMissionScore
import org.sopt.official.domain.appjamtamp.entity.AppjamtampRecentMission

interface AppjamtampRepository {
suspend fun getAppjamtampMissionRanking(
size: Int
): Result<List<AppjamtampMissionScore>>
suspend fun getAppjamtampMissionTop3(
size: Int
): Result<List<AppjamtampRecentMission>>
}
Loading
Loading