-
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.
[FEAT] #262 마이페이지 구매목록 페이징 작업중 - 현재 포스트맨에서 페이징 안됨 + 내가 코드를 잘못짜서 무한 서버…
…통신됨 currentlist.size계속 커지다 터짐
- Loading branch information
Showing
28 changed files
with
196 additions
and
136 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
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
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
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
13 changes: 0 additions & 13 deletions
13
app/src/main/java/co/kr/bemyplan/data/entity/main/myplan/MyModel.kt
This file was deleted.
Oops, something went wrong.
14 changes: 6 additions & 8 deletions
14
app/src/main/java/co/kr/bemyplan/data/entity/main/myplan/ResponseMyPlan.kt
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,9 @@ | ||
package co.kr.bemyplan.data.entity.main.myplan | ||
|
||
import co.kr.bemyplan.domain.model.main.myplan.MyPlanData | ||
|
||
data class ResponseMyPlan( | ||
val data: Data | ||
) { | ||
data class Data( | ||
val items: List<MyModel>, | ||
val totalCount: Int, | ||
val totalPage: Int | ||
) | ||
} | ||
val data : MyPlanData, | ||
val message : String, | ||
val resultCode : String | ||
) |
6 changes: 6 additions & 0 deletions
6
app/src/main/java/co/kr/bemyplan/data/entity/main/myplan/User.kt
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,6 @@ | ||
package co.kr.bemyplan.data.entity.main.myplan | ||
|
||
data class User( | ||
val nickname: String, | ||
val userId: Int | ||
) |
7 changes: 0 additions & 7 deletions
7
app/src/main/java/co/kr/bemyplan/data/repository/main/myplan/MyPlanRepository.kt
This file was deleted.
Oops, something went wrong.
25 changes: 17 additions & 8 deletions
25
app/src/main/java/co/kr/bemyplan/data/repository/main/myplan/MyPlanRepositoryImpl.kt
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,18 +1,27 @@ | ||
package co.kr.bemyplan.data.repository.main.myplan | ||
|
||
import co.kr.bemyplan.data.api.ApiService | ||
import co.kr.bemyplan.data.api.MyPlanService | ||
import co.kr.bemyplan.data.entity.main.myplan.ResponseMyPlan | ||
import kotlinx.coroutines.Dispatchers | ||
import co.kr.bemyplan.domain.model.main.myplan.MyPlanData | ||
import co.kr.bemyplan.domain.repository.MyPlanRepository | ||
import kotlinx.coroutines.CoroutineDispatcher | ||
import kotlinx.coroutines.withContext | ||
import javax.inject.Inject | ||
|
||
class MyPlanRepositoryImpl @Inject constructor( | ||
private val service: MyPlanService | ||
): MyPlanRepository { | ||
override suspend fun getMyPlan(page: Int, pageSize: Int): ResponseMyPlan { | ||
return withContext(Dispatchers.IO) { | ||
service.getMyPlan(page, pageSize) | ||
private val myPlanService: MyPlanService, | ||
private val coroutineDispatcher: CoroutineDispatcher | ||
) : MyPlanRepository { | ||
override suspend fun getMyPlan(size: Int): MyPlanData { | ||
return withContext(coroutineDispatcher) { | ||
myPlanService.getMyPlan(size).data | ||
} | ||
} | ||
|
||
override suspend fun getMoreMyPlan(size: Int, lastPlanId: Int): MyPlanData { | ||
return withContext(coroutineDispatcher) { | ||
myPlanService.getMoreMyPlan(size, lastPlanId).data | ||
} | ||
} | ||
|
||
|
||
} |
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
19 changes: 19 additions & 0 deletions
19
app/src/main/java/co/kr/bemyplan/domain/model/main/myplan/MyPlanData.kt
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,19 @@ | ||
package co.kr.bemyplan.domain.model.main.myplan | ||
|
||
import co.kr.bemyplan.data.entity.main.myplan.User | ||
|
||
data class MyPlanData( | ||
val contents: List<Data>, | ||
val nextCursor: Int | ||
){ | ||
data class Data( | ||
val createdAt: String, | ||
val orderStatus: Boolean, | ||
val planId: Int, | ||
val scrapStatus: Boolean, | ||
val thumbnailUrl: String, | ||
val title: String, | ||
val updatedAt: String, | ||
val user: User | ||
) | ||
} |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/co/kr/bemyplan/domain/repository/MyPlanRepository.kt
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 co.kr.bemyplan.domain.repository | ||
|
||
import co.kr.bemyplan.domain.model.main.myplan.MyPlanData | ||
|
||
interface MyPlanRepository { | ||
suspend fun getMyPlan(size: Int): MyPlanData | ||
suspend fun getMoreMyPlan(size: Int, lastPlanId: Int): MyPlanData | ||
} |
Oops, something went wrong.