diff --git a/data/src/main/java/com/fakedevelopers/data/di/MainModule.kt b/data/src/main/java/com/fakedevelopers/data/di/MainModule.kt index f800bd7f..98fd1f89 100644 --- a/data/src/main/java/com/fakedevelopers/data/di/MainModule.kt +++ b/data/src/main/java/com/fakedevelopers/data/di/MainModule.kt @@ -3,13 +3,16 @@ package com.fakedevelopers.data.di import android.content.Context import com.fakedevelopers.data.repository.ImageRepositoryImpl import com.fakedevelopers.data.repository.LocalStorageRepositoryImpl +import com.fakedevelopers.data.repository.ProductDetailRepositoryImpl import com.fakedevelopers.data.repository.ProductEditorRepositoryImpl import com.fakedevelopers.data.repository.ProductListRepositoryImpl +import com.fakedevelopers.data.service.ProductDetailService import com.fakedevelopers.data.service.ProductEditorService import com.fakedevelopers.data.service.ProductListService import com.fakedevelopers.data.source.LocalStorageDataSource import com.fakedevelopers.domain.repository.ImageRepository import com.fakedevelopers.domain.repository.LocalStorageRepository +import com.fakedevelopers.domain.repository.ProductDetailRepository import com.fakedevelopers.domain.repository.ProductEditorRepository import com.fakedevelopers.domain.repository.ProductListRepository import dagger.Module @@ -44,6 +47,16 @@ object MainModule { fun provideProductEditorRepository(service: ProductEditorService): ProductEditorRepository = ProductEditorRepositoryImpl(service) + @Singleton + @Provides + fun provideProductDetailService(@DataObject retrofit: Retrofit): ProductDetailService = + retrofit.create(ProductDetailService::class.java) + + @Singleton + @Provides + fun provideProductDetailRepository(service: ProductDetailService): ProductDetailRepository = + ProductDetailRepositoryImpl(service) + @Singleton @Provides fun provideImageRepository(@ApplicationContext context: Context): ImageRepository = diff --git a/data/src/main/java/com/fakedevelopers/data/repository/ProductDetailRepositoryImpl.kt b/data/src/main/java/com/fakedevelopers/data/repository/ProductDetailRepositoryImpl.kt new file mode 100644 index 00000000..630cba31 --- /dev/null +++ b/data/src/main/java/com/fakedevelopers/data/repository/ProductDetailRepositoryImpl.kt @@ -0,0 +1,25 @@ +package com.fakedevelopers.data.repository + +import com.fakedevelopers.data.service.ProductDetailService +import com.fakedevelopers.domain.model.ProductDetailInfo +import com.fakedevelopers.domain.repository.ProductDetailRepository +import javax.inject.Inject + +class ProductDetailRepositoryImpl @Inject constructor( + private val service: ProductDetailService +) : ProductDetailRepository { + + override suspend fun getProductDetail(productId: Long): Result = + runCatching { + service.getProductDetail(productId) + } + + override suspend fun postProductBid( + productId: Long, + userId: Long, + bid: Long + ): Result = + runCatching { + service.postProductBid(productId, userId, bid) + } +} diff --git a/presentation/src/main/java/com/fakedevelopers/presentation/api/service/ProductDetailService.kt b/data/src/main/java/com/fakedevelopers/data/service/ProductDetailService.kt similarity index 70% rename from presentation/src/main/java/com/fakedevelopers/presentation/api/service/ProductDetailService.kt rename to data/src/main/java/com/fakedevelopers/data/service/ProductDetailService.kt index e5b5dd83..11a95b7e 100644 --- a/presentation/src/main/java/com/fakedevelopers/presentation/api/service/ProductDetailService.kt +++ b/data/src/main/java/com/fakedevelopers/data/service/ProductDetailService.kt @@ -1,7 +1,6 @@ -package com.fakedevelopers.presentation.api.service +package com.fakedevelopers.data.service -import com.fakedevelopers.presentation.ui.productDetail.ProductDetailDto -import retrofit2.Response +import com.fakedevelopers.domain.model.ProductDetailInfo import retrofit2.http.Field import retrofit2.http.FormUrlEncoded import retrofit2.http.GET @@ -9,10 +8,11 @@ import retrofit2.http.POST import retrofit2.http.Path interface ProductDetailService { + @GET("product/getProductInfo/{productId}") suspend fun getProductDetail( @Path("productId") productId: Long - ): Response + ): ProductDetailInfo @FormUrlEncoded @POST("product/{productId}/bid") @@ -20,5 +20,5 @@ interface ProductDetailService { @Path("productId") productId: Long, @Field("userId") userId: Long, @Field("bid") bid: Long - ): Response + ): String } diff --git a/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/BidInfo.kt b/domain/src/main/java/com/fakedevelopers/domain/model/BidInfo.kt similarity index 61% rename from presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/BidInfo.kt rename to domain/src/main/java/com/fakedevelopers/domain/model/BidInfo.kt index 6242669d..4142ae0e 100644 --- a/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/BidInfo.kt +++ b/domain/src/main/java/com/fakedevelopers/domain/model/BidInfo.kt @@ -1,4 +1,4 @@ -package com.fakedevelopers.presentation.ui.productDetail +package com.fakedevelopers.domain.model data class BidInfo( val bid: Long, diff --git a/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/ProductDetailDto.kt b/domain/src/main/java/com/fakedevelopers/domain/model/ProductDetailInfo.kt similarity index 80% rename from presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/ProductDetailDto.kt rename to domain/src/main/java/com/fakedevelopers/domain/model/ProductDetailInfo.kt index 1efee15b..13b1f2a0 100644 --- a/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/ProductDetailDto.kt +++ b/domain/src/main/java/com/fakedevelopers/domain/model/ProductDetailInfo.kt @@ -1,6 +1,6 @@ -package com.fakedevelopers.presentation.ui.productDetail +package com.fakedevelopers.domain.model -data class ProductDetailDto( +data class ProductDetailInfo( val bidderCount: Int = 0, val bids: List = emptyList(), val createdDate: String = "", diff --git a/domain/src/main/java/com/fakedevelopers/domain/repository/ProductDetailRepository.kt b/domain/src/main/java/com/fakedevelopers/domain/repository/ProductDetailRepository.kt new file mode 100644 index 00000000..f620d853 --- /dev/null +++ b/domain/src/main/java/com/fakedevelopers/domain/repository/ProductDetailRepository.kt @@ -0,0 +1,15 @@ +package com.fakedevelopers.domain.repository + +import com.fakedevelopers.domain.model.ProductDetailInfo + +interface ProductDetailRepository { + suspend fun getProductDetail( + productId: Long + ): Result + + suspend fun postProductBid( + productId: Long, + userId: Long, + bid: Long + ): Result +} diff --git a/domain/src/main/java/com/fakedevelopers/domain/usecase/GetProductDetailUseCase.kt b/domain/src/main/java/com/fakedevelopers/domain/usecase/GetProductDetailUseCase.kt new file mode 100644 index 00000000..c436fc1a --- /dev/null +++ b/domain/src/main/java/com/fakedevelopers/domain/usecase/GetProductDetailUseCase.kt @@ -0,0 +1,10 @@ +package com.fakedevelopers.domain.usecase + +import com.fakedevelopers.domain.repository.ProductDetailRepository +import javax.inject.Inject + +class GetProductDetailUseCase @Inject constructor( + private val repository: ProductDetailRepository +) { + suspend operator fun invoke(productId: Long) = repository.getProductDetail(productId) +} diff --git a/domain/src/main/java/com/fakedevelopers/domain/usecase/PostProductBidUseCase.kt b/domain/src/main/java/com/fakedevelopers/domain/usecase/PostProductBidUseCase.kt new file mode 100644 index 00000000..beac6c42 --- /dev/null +++ b/domain/src/main/java/com/fakedevelopers/domain/usecase/PostProductBidUseCase.kt @@ -0,0 +1,10 @@ +package com.fakedevelopers.domain.usecase + +import com.fakedevelopers.domain.repository.ProductDetailRepository +import javax.inject.Inject + +class PostProductBidUseCase @Inject constructor( + private val repository: ProductDetailRepository +) { + suspend operator fun invoke(productId: Long, userId: Long, bid: Long) = repository.postProductBid(productId, userId, bid) +} diff --git a/presentation/src/main/java/com/fakedevelopers/presentation/api/di/ApiModule.kt b/presentation/src/main/java/com/fakedevelopers/presentation/api/di/ApiModule.kt index c8c1c954..998b9cfc 100644 --- a/presentation/src/main/java/com/fakedevelopers/presentation/api/di/ApiModule.kt +++ b/presentation/src/main/java/com/fakedevelopers/presentation/api/di/ApiModule.kt @@ -1,7 +1,6 @@ package com.fakedevelopers.presentation.api.di import com.fakedevelopers.domain.secret.Constants.Companion.BASE_URL -import com.fakedevelopers.presentation.api.util.LoginAuthInterceptor import com.google.firebase.auth.FirebaseAuth import com.google.gson.Gson import com.google.gson.GsonBuilder @@ -19,18 +18,10 @@ import java.util.Locale import javax.inject.Qualifier import javax.inject.Singleton -@Qualifier -@Retention(AnnotationRetention.BINARY) -annotation class AuthOkHttpClient - @Qualifier @Retention(AnnotationRetention.BINARY) annotation class NormalOkHttpClient -@Qualifier -@Retention(AnnotationRetention.BINARY) -annotation class AuthRetrofit - @Qualifier @Retention(AnnotationRetention.BINARY) annotation class NormalRetrofit @@ -42,22 +33,6 @@ object ApiModule { @Provides fun provideBaseUrl() = BASE_URL - @Singleton - @Provides - @AuthOkHttpClient - fun provideAuthOkHttpClient(authInterceptor: LoginAuthInterceptor) = if (BuildConfig.DEBUG.not()) { - val loggingInterceptor = HttpLoggingInterceptor() - loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.HEADERS) - OkHttpClient.Builder() - .addInterceptor(authInterceptor) - .addInterceptor(loggingInterceptor) - .build() - } else { - OkHttpClient.Builder() - .addInterceptor(authInterceptor) - .build() - } - @Singleton @Provides @NormalOkHttpClient @@ -75,18 +50,6 @@ object ApiModule { @Provides fun provideGson(): Gson = GsonBuilder().setLenient().create() - @Singleton - @Provides - @AuthRetrofit - fun provideAuthRetrofit(@AuthOkHttpClient okHttpClient: OkHttpClient, gson: Gson, baseUrl: String): Retrofit { - return Retrofit.Builder() - .client(okHttpClient) - .baseUrl(baseUrl) - .addConverterFactory(ScalarsConverterFactory.create()) - .addConverterFactory(GsonConverterFactory.create(gson)) - .build() - } - @Singleton @Provides @NormalRetrofit @@ -107,8 +70,4 @@ object ApiModule { setLanguageCode(Locale.getDefault().language) } } - - @Singleton - @Provides - fun provideAuthInterceptor(auth: FirebaseAuth) = LoginAuthInterceptor(auth) } diff --git a/presentation/src/main/java/com/fakedevelopers/presentation/api/di/MainModule.kt b/presentation/src/main/java/com/fakedevelopers/presentation/api/di/MainModule.kt index 1cd926a3..abccc797 100644 --- a/presentation/src/main/java/com/fakedevelopers/presentation/api/di/MainModule.kt +++ b/presentation/src/main/java/com/fakedevelopers/presentation/api/di/MainModule.kt @@ -2,11 +2,9 @@ package com.fakedevelopers.presentation.api.di import com.fakedevelopers.presentation.api.repository.ChatRepository import com.fakedevelopers.presentation.api.repository.ProductCategoryRepository -import com.fakedevelopers.presentation.api.repository.ProductDetailRepository import com.fakedevelopers.presentation.api.repository.ProductSearchRepository import com.fakedevelopers.presentation.api.service.ChatService import com.fakedevelopers.presentation.api.service.ProductCategoryService -import com.fakedevelopers.presentation.api.service.ProductDetailService import com.fakedevelopers.presentation.api.service.ProductSearchService import dagger.Module import dagger.Provides @@ -29,17 +27,6 @@ class MainModule { fun provideProductCategoryRepository(service: ProductCategoryService): ProductCategoryRepository = ProductCategoryRepository(service) - // 상품 상세 정보, 입찰 - @ActivityRetainedScoped - @Provides - fun provideProductDetailService(@NormalRetrofit retrofit: Retrofit): ProductDetailService = - retrofit.create(ProductDetailService::class.java) - - @ActivityRetainedScoped - @Provides - fun provideProductDetailRepository(service: ProductDetailService): ProductDetailRepository = - ProductDetailRepository(service) - // 스트림 유저 토큰 @ActivityRetainedScoped @Provides diff --git a/presentation/src/main/java/com/fakedevelopers/presentation/api/repository/ProductDetailRepository.kt b/presentation/src/main/java/com/fakedevelopers/presentation/api/repository/ProductDetailRepository.kt deleted file mode 100644 index 52bf0766..00000000 --- a/presentation/src/main/java/com/fakedevelopers/presentation/api/repository/ProductDetailRepository.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.fakedevelopers.presentation.api.repository - -import com.fakedevelopers.presentation.api.service.ProductDetailService -import com.fakedevelopers.presentation.ui.productDetail.ProductDetailDto -import retrofit2.Response -import javax.inject.Inject - -class ProductDetailRepository @Inject constructor( - private val service: ProductDetailService -) { - suspend fun getProductDetail( - productId: Long - ): Response { - return service.getProductDetail(productId) - } - - suspend fun postProductBid( - productId: Long, - userId: Long, - bid: Long - ): Response { - return service.postProductBid(productId, userId, bid) - } -} diff --git a/presentation/src/main/java/com/fakedevelopers/presentation/api/repository/UserLoginRepository.kt b/presentation/src/main/java/com/fakedevelopers/presentation/api/repository/UserLoginRepository.kt deleted file mode 100644 index 641d3bb4..00000000 --- a/presentation/src/main/java/com/fakedevelopers/presentation/api/repository/UserLoginRepository.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.fakedevelopers.presentation.api.repository - -import com.fakedevelopers.presentation.api.service.UserLoginService -import retrofit2.Response -import javax.inject.Inject - -class UserLoginRepository @Inject constructor( - private val service: UserLoginService -) { - suspend fun postLogin(email: String, passwd: String): Response { - return service.postLogin(email, passwd) - } -} diff --git a/presentation/src/main/java/com/fakedevelopers/presentation/api/service/UserLoginService.kt b/presentation/src/main/java/com/fakedevelopers/presentation/api/service/UserLoginService.kt deleted file mode 100644 index f15f4ebd..00000000 --- a/presentation/src/main/java/com/fakedevelopers/presentation/api/service/UserLoginService.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.fakedevelopers.presentation.api.service - -import retrofit2.Response -import retrofit2.http.Field -import retrofit2.http.FormUrlEncoded -import retrofit2.http.POST - -interface UserLoginService { - @FormUrlEncoded - @POST("user/login") - suspend fun postLogin(@Field("email") email: String, @Field("password") passwd: String): Response -} diff --git a/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/BidInfoAdapter.kt b/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/BidInfoAdapter.kt index d63cfa2a..9bfa8bd1 100644 --- a/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/BidInfoAdapter.kt +++ b/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/BidInfoAdapter.kt @@ -5,6 +5,7 @@ import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter import androidx.recyclerview.widget.RecyclerView +import com.fakedevelopers.domain.model.BidInfo import com.fakedevelopers.domain.secret.Constants.Companion.dec import com.fakedevelopers.presentation.R import com.fakedevelopers.presentation.databinding.RecyclerBidInfoBinding diff --git a/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/ProductDetailFragment.kt b/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/ProductDetailFragment.kt index 3f2b039e..cbd75e33 100644 --- a/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/ProductDetailFragment.kt +++ b/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/ProductDetailFragment.kt @@ -13,6 +13,7 @@ import androidx.fragment.app.viewModels import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.navArgs import androidx.viewpager2.widget.ViewPager2 +import com.fakedevelopers.domain.model.ProductDetailInfo import com.fakedevelopers.presentation.R import com.fakedevelopers.presentation.databinding.FragmentProductDetailBinding import com.fakedevelopers.presentation.model.RemainTime @@ -72,14 +73,14 @@ class ProductDetailFragment : BaseFragment( findNavController().popBackStack() } binding.toolbarProductDetail.buttonToolbarOption.setOnClickListener { - navigateEditProduct(viewModel.productDetailDto.value) + navigateEditProduct(viewModel.productDetailInfo.value) } } - private fun navigateEditProduct(productDetailDto: ProductDetailDto) { + private fun navigateEditProduct(productDetailInfo: ProductDetailInfo) { findNavController().navigate( ProductDetailFragmentDirections.actionProductDetailFragmentToProductModificationFragment( - ProductEditorDto(viewModel.productId, productDetailDto), + ProductEditorDto(viewModel.productId, productDetailInfo), viewModel.productId ) ) diff --git a/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/ProductDetailViewModel.kt b/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/ProductDetailViewModel.kt index 9f74969a..352106c6 100644 --- a/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/ProductDetailViewModel.kt +++ b/presentation/src/main/java/com/fakedevelopers/presentation/ui/productDetail/ProductDetailViewModel.kt @@ -2,7 +2,8 @@ package com.fakedevelopers.presentation.ui.productDetail import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.fakedevelopers.presentation.api.repository.ProductDetailRepository +import com.fakedevelopers.domain.model.ProductDetailInfo +import com.fakedevelopers.domain.usecase.GetProductDetailUseCase import com.fakedevelopers.presentation.model.RemainTime import com.fakedevelopers.presentation.ui.util.ApiErrorHandler import com.fakedevelopers.presentation.ui.util.DateUtil @@ -10,6 +11,7 @@ import com.fakedevelopers.presentation.ui.util.ExpirationTimerTask import com.fakedevelopers.presentation.ui.util.MutableEventFlow import com.fakedevelopers.presentation.ui.util.asEventFlow import dagger.hilt.android.lifecycle.HiltViewModel +import io.getstream.logging.helper.stringify import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.launch @@ -18,11 +20,11 @@ import javax.inject.Inject @HiltViewModel class ProductDetailViewModel @Inject constructor( private val dateUtil: DateUtil, - private val repository: ProductDetailRepository + private val getProductDetailUseCase: GetProductDetailUseCase ) : ViewModel() { - private val _productDetailDto = MutableStateFlow(ProductDetailDto()) - val productDetailDto: StateFlow get() = _productDetailDto + private val _productDetailInfo = MutableStateFlow(ProductDetailInfo()) + val productDetailInfo: StateFlow get() = _productDetailInfo private val _eventFlow = MutableEventFlow() val eventFlow = _eventFlow.asEventFlow() @@ -38,10 +40,10 @@ class ProductDetailViewModel @Inject constructor( fun productDetailRequest(productId: Long) { this.productId = productId viewModelScope.launch { - val result = repository.getProductDetail(productId) - if (result.isSuccessful) { - val detail = result.body() ?: ProductDetailDto() - _productDetailDto.emit(detail) + val result = getProductDetailUseCase(productId) + if (result.isSuccess) { + val detail = result.getOrDefault(ProductDetailInfo()) + _productDetailInfo.emit(detail) if (detail.images.isEmpty()) { event(Event.ProductImages(listOf(""))) } else { @@ -51,7 +53,7 @@ class ProductDetailViewModel @Inject constructor( startTimerTask(detail.expirationDate) bidInfoAdapter.submitList(detail.bids) } else { - ApiErrorHandler.printErrorMessage(result.errorBody()) + ApiErrorHandler.printMessage(result.exceptionOrNull()?.stringify().toString()) } } } diff --git a/presentation/src/main/java/com/fakedevelopers/presentation/ui/productEditor/ProductEditorDto.kt b/presentation/src/main/java/com/fakedevelopers/presentation/ui/productEditor/ProductEditorDto.kt index a6008433..ca634170 100644 --- a/presentation/src/main/java/com/fakedevelopers/presentation/ui/productEditor/ProductEditorDto.kt +++ b/presentation/src/main/java/com/fakedevelopers/presentation/ui/productEditor/ProductEditorDto.kt @@ -1,7 +1,7 @@ package com.fakedevelopers.presentation.ui.productEditor import android.os.Parcelable -import com.fakedevelopers.presentation.ui.productDetail.ProductDetailDto +import com.fakedevelopers.domain.model.ProductDetailInfo import com.fakedevelopers.presentation.ui.productEditor.albumList.SelectedImageInfo import kotlinx.parcelize.Parcelize @@ -16,14 +16,14 @@ data class ProductEditorDto( val content: String, val categoryId: Long ) : Parcelable { - constructor(categoryId: Long, productDetailDto: ProductDetailDto) : this( + constructor(categoryId: Long, productDetailInfo: ProductDetailInfo) : this( selectedImageInfo = SelectedImageInfo(), - title = productDetailDto.productTitle, - hopePrice = productDetailDto.hopePrice.toString(), - openingBid = productDetailDto.openingBid.toString(), - tick = productDetailDto.tick.toString(), - expiration = productDetailDto.expirationDate, - content = productDetailDto.productContent, + title = productDetailInfo.productTitle, + hopePrice = productDetailInfo.hopePrice.toString(), + openingBid = productDetailInfo.openingBid.toString(), + tick = productDetailInfo.tick.toString(), + expiration = productDetailInfo.expirationDate, + content = productDetailInfo.productContent, categoryId = categoryId ) } diff --git a/presentation/src/main/res/layout/fragment_product_detail.xml b/presentation/src/main/res/layout/fragment_product_detail.xml index fff3acc0..fbc55a50 100644 --- a/presentation/src/main/res/layout/fragment_product_detail.xml +++ b/presentation/src/main/res/layout/fragment_product_detail.xml @@ -180,7 +180,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginTop="24dp" - android:text="@{vm.productDetailDto.productTitle}" + android:text="@{vm.productDetailInfo.productTitle}" android:textColor="@color/black" android:textSize="18sp" android:textStyle="bold" @@ -245,7 +245,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4dp" - android:text="@{@string/price_format(vm.productDetailDto.openingBid)}" + android:text="@{@string/price_format(vm.productDetailInfo.openingBid)}" android:textColor="@color/black" android:textSize="18sp" android:textStyle="bold" @@ -260,7 +260,7 @@ android:text="@string/product_detail_hope_price" android:textColor="@color/bidderbidder_primary" android:textSize="12sp" - android:visibility="@{vm.productDetailDto.hopePrice == 0 ? View.GONE : View.VISIBLE}" + android:visibility="@{vm.productDetailInfo.hopePrice == 0 ? View.GONE : View.VISIBLE}" app:layout_constraintBottom_toBottomOf="@+id/textview_product_detail_label_minumum_bid" app:layout_constraintStart_toStartOf="@id/textview_product_detail_hope_price" app:layout_constraintTop_toTopOf="@+id/textview_product_detail_label_minumum_bid" /> @@ -269,11 +269,11 @@ android:id="@+id/textview_product_detail_hope_price" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@{@string/price_format(vm.productDetailDto.hopePrice)}" + android:text="@{@string/price_format(vm.productDetailInfo.hopePrice)}" android:textColor="@color/black" android:textSize="18sp" android:textStyle="bold" - android:visibility="@{vm.productDetailDto.hopePrice == 0 ? View.GONE : View.VISIBLE}" + android:visibility="@{vm.productDetailInfo.hopePrice == 0 ? View.GONE : View.VISIBLE}" app:layout_constraintBottom_toBottomOf="@id/textview_product_detail_minumum_bid" app:layout_constraintEnd_toEndOf="@id/guideline_product_detail_end" app:layout_constraintHorizontal_bias="0.3" @@ -287,7 +287,7 @@ android:layout_height="wrap_content" android:layout_marginTop="24sp" android:lineSpacingExtra="8dp" - android:text="@{vm.productDetailDto.productContent}" + android:text="@{vm.productDetailInfo.productContent}" android:textColor="@color/black" android:textSize="13sp" app:layout_constraintEnd_toEndOf="@id/guideline_product_detail_end" @@ -309,7 +309,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="16sp" - android:text="@{@string/product_detail_bidder_count(vm.productDetailDto.bidderCount)}" + android:text="@{@string/product_detail_bidder_count(vm.productDetailInfo.bidderCount)}" android:textColor="@color/black" android:textSize="13sp" android:textStyle="bold" @@ -323,7 +323,7 @@ android:layout_height="wrap_content" android:textSize="11sp" android:textColor="@color/medium_gray" - android:text="@{@string/product_detail_tick(vm.productDetailDto.tick)}" + android:text="@{@string/product_detail_tick(vm.productDetailInfo.tick)}" app:layout_constraintBottom_toBottomOf="@id/textview_product_detail_current_bidding" app:layout_constraintEnd_toEndOf="@id/guideline_product_detail_end" app:layout_constraintTop_toTopOf="@id/textview_product_detail_current_bidding"