Skip to content

Commit

Permalink
[refactor/#74] Rename shippingDetailsDto to ShippingDetailsDto
Browse files Browse the repository at this point in the history
  • Loading branch information
hershyYJ committed Nov 26, 2024
1 parent e3a7754 commit bb617bb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.api.jaebichuri.global.response.ApiResponse;
import com.api.jaebichuri.member.entity.Member;
import com.api.jaebichuri.shipping.dto.shippingDetailsDto;
import com.api.jaebichuri.shipping.dto.ShippingDetailsDto;
import com.api.jaebichuri.shipping.dto.ShippingStatusCountDto;
import com.api.jaebichuri.shipping.service.ShippingService;
import io.swagger.v3.oas.annotations.Operation;
Expand Down Expand Up @@ -50,12 +50,12 @@ public ResponseEntity<ApiResponse<ShippingStatusCountDto>> getShippingStatusCoun
@io.swagger.v3.oas.annotations.responses.ApiResponse(
responseCode = "COMMON200",
description = "배송 중인 물품 정보 조회 결과",
content = @Content(schema = @Schema(implementation = shippingDetailsDto.class))
content = @Content(schema = @Schema(implementation = ShippingDetailsDto.class))
)
}
)
@GetMapping("/details")
public ResponseEntity<ApiResponse<List<shippingDetailsDto>>> getShippingDetails(@AuthenticationPrincipal Member member) {
public ResponseEntity<ApiResponse<List<ShippingDetailsDto>>> getShippingDetails(@AuthenticationPrincipal Member member) {
return ResponseEntity.ok(ApiResponse.onSuccess(shippingService.getShippingDetails(member)));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.api.jaebichuri.shipping.mapper;

import com.api.jaebichuri.product.entity.AuctionProductImage;
import com.api.jaebichuri.shipping.dto.shippingDetailsDto;
import com.api.jaebichuri.shipping.dto.ShippingDetailsDto;
import com.api.jaebichuri.shipping.entity.Shipping;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
Expand All @@ -19,9 +19,9 @@ public interface ShippingMapper {
@Mapping(source = "auction.auctionCategory", target = "auctionCategory")
@Mapping(source = "auction.finalBidPrice", target = "finalBidPrice")
@Mapping(target = "imageUrl", expression = "java(getRepresentativeImageUrl(shipping.getAuction().getProduct().getImages()))")
shippingDetailsDto toShippingDetailsDto(Shipping shipping);
ShippingDetailsDto toShippingDetailsDto(Shipping shipping);

List<shippingDetailsDto> toShippingDetailsDtoList(List<Shipping> shippings);
List<ShippingDetailsDto> toShippingDetailsDtoList(List<Shipping> shippings);

default String getRepresentativeImageUrl(List<AuctionProductImage> images) {
return images.stream()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.api.jaebichuri.shipping.service;

import com.api.jaebichuri.member.entity.Member;
import com.api.jaebichuri.shipping.dto.shippingDetailsDto;
import com.api.jaebichuri.shipping.dto.ShippingDetailsDto;
import com.api.jaebichuri.shipping.dto.ShippingStatusCountDto;
import com.api.jaebichuri.shipping.entity.Shipping;
import com.api.jaebichuri.shipping.enums.ShippingStatus;
Expand Down Expand Up @@ -31,7 +31,7 @@ public ShippingStatusCountDto getShippingStatusCount(Member member) {
}

@Transactional(readOnly = true)
public List<shippingDetailsDto> getShippingDetails(Member member) {
public List<ShippingDetailsDto> getShippingDetails(Member member) {
List<Shipping> shipping = shippingRepository.findByAuction_Seller(member);

return shippingMapper.toShippingDetailsDtoList(shipping);
Expand Down

0 comments on commit bb617bb

Please sign in to comment.