halucinor / b-shop

0 stars 0 forks source link

feat: item CRUD 기능 구현 - [merged] #50

Closed halucinor closed 1 year ago

halucinor commented 1 year ago

_Merges feature/item_curd2 -> develop

작업 내용

Issues #20 #21 #22 #37 #36

halucinor commented 1 year ago

requested review from @rkdud1108

halucinor commented 1 year ago

added 1 commit

Compare with previous version

halucinor commented 1 year ago

added 1 commit

Compare with previous version

halucinor commented 1 year ago

In GitLab by @rkdud1108 on Feb 17, 2023, 10:52

Commented on src/main/java/com/gabia/bshop/controller/ItemController.java line 28

final 키워드 추가 부탁드립니다~

halucinor commented 1 year ago

In GitLab by @rkdud1108 on Feb 17, 2023, 11:24

Commented on src/main/java/com/gabia/bshop/entity/ItemOption.java line 96

이 부분 merge가 잘못된 거 같아요ㅠ
추가된 코드부분이 삭제 되어야 되고 this.stockQuantity -= orderCount; 이게 맞는 코드입니다.

halucinor commented 1 year ago

In GitLab by @rkdud1108 on Feb 17, 2023, 11:32

Commented on src/main/java/com/gabia/bshop/exception/ErrorCode.java line 31

ITEMOPTION 사이의 _는 빼는 게 맞을 것 같습니당

halucinor commented 1 year ago

In GitLab by @rkdud1108 on Feb 17, 2023, 11:35

Commented on src/main/java/com/gabia/bshop/exception/ErrorCode.java line 35

위에 삭제된 에러메세지는 제가 작성한 에러메세지 같은데..
주문 생성할 때 item과 itemoption id값 모두 검증해서 이름을 저렇게 사용했던 건데
혹시 수정하신 에러메세지를 아이템 로직쪽에서도 사용하는 부분이 있으신 걸까요?

halucinor commented 1 year ago

In GitLab by @rkdud1108 on Feb 17, 2023, 13:46

Commented on src/test/java/com/gabia/bshop/service/ItemServiceTest.java line 130

동사형으로 변경 부탁드립니다.

halucinor commented 1 year ago

In GitLab by @rkdud1108 on Feb 17, 2023, 13:52

Commented on src/main/java/com/gabia/bshop/dto/response/ItemOptionResponse.java line 5

카멜케이스가 적용되지 않았습니당

halucinor commented 1 year ago

In GitLab by @rkdud1108 on Feb 17, 2023, 14:54

Commented on src/main/java/com/gabia/bshop/dto/request/ItemImageCreateRequest.java line 11

@Builder
public record ItemImageDto(
    @NotNull(message = "이미지 ID는 필수 입니다.")
    Long id,

    @NotNull(message = "url 은 필수 입니다.")
    String url) {
}

ItemImageDto는 url값이 Not Null인데 List에 대해서는 null체크를 하지 않은 이유가 있나요?

halucinor commented 1 year ago

added 7 commits

Compare with previous version

halucinor commented 1 year ago

marked the checklist item Item CRUD 기능 개선 as completed

halucinor commented 1 year ago

marked the checklist item ItemOption CRUD 기능 구현 as completed

halucinor commented 1 year ago

marked the checklist item ItemImage CRUD 기능 구현 as completed

halucinor commented 1 year ago

marked the checklist item imageupload 기능 구현 as completed

halucinor commented 1 year ago

marked the checklist item 인증/인가 기능 추가 as completed

halucinor commented 1 year ago

optionId Not found 에러를 처리하기 위해 excepion을 작성했는데 말씀하신 기능을 적용하기 위해 필요할거 같네요 제가 지운부분은 복구해놓고 ITEM_ITEMOPTION_NOT_FOUND_EXCEPTION을 사용하는 부분도 다시 복원해 놓겠습니다

halucinor commented 1 year ago

NotNull 이 누락된거 같습니다 수정해서 반영하겠습니다

halucinor commented 1 year ago

changed this line in version 5 of the diff

halucinor commented 1 year ago

changed this line in version 5 of the diff

halucinor commented 1 year ago

added 4 commits

Compare with previous version

halucinor commented 1 year ago

In GitLab by @rkdud1108 on Feb 18, 2023, 14:45

Commented on src/main/java/com/gabia/bshop/service/ItemOptionService.java line 72

변경 감지 기능을 이용하면 save를 하지 않아도 될 거 같아요.

    public OrderUpdateStatusResponse updateOrderStatus(final OrderUpdateStatusRequest orderUpdateStatusRequest){
        final Order order = findOrderById(orderUpdateStatusRequest.orderId());
        order.updateOrderStatus(orderUpdateStatusRequest.status());

        return OrderMapper.INSTANCE.orderToOrderUpdateStatusResponse(order);
    }

참고 코드 남겨 놓겠습니다.

halucinor commented 1 year ago

이미지 업로드 시 일반사용자도 업로드가 가능해야함

halucinor commented 1 year ago

공백 제거

halucinor commented 1 year ago

생성자에서 false 로 넣어주기

halucinor commented 1 year ago

id -> itemId
TODO : N + 1 query

halucinor commented 1 year ago

added 1 commit

Compare with previous version

halucinor commented 1 year ago

네 수정해서 반영하겠습니다.

halucinor commented 1 year ago

36 에서 수정하겠습니다.=

halucinor commented 1 year ago

changed this line in version 7 of the diff

halucinor commented 1 year ago

changed this line in version 7 of the diff

halucinor commented 1 year ago

changed this line in version 7 of the diff

halucinor commented 1 year ago

changed this line in version 7 of the diff

halucinor commented 1 year ago

changed this line in version 7 of the diff

halucinor commented 1 year ago

added 1 commit

Compare with previous version

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 20, 2023, 11:31

Commented on src/main/java/com/gabia/bshop/controller/ImageController.java line 25

final 키워드 추가욥!

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 20, 2023, 11:31

Commented on src/main/java/com/gabia/bshop/controller/ItemImageController.java line 48

requestBody에 itemId가 담기는 것이 아닌 PathVariable로 뺴는 것이 RESTFul 에 더 적합한 것 같습니다!

halucinor commented 1 year ago

36 다음 이슈에서 해당내용 모든 컨트롤러에서 수정하는걸로 하겠습니다

halucinor commented 1 year ago

changed this line in version 8 of the diff

halucinor commented 1 year ago

changed this line in version 8 of the diff

halucinor commented 1 year ago

changed this line in version 8 of the diff

halucinor commented 1 year ago

added 2 commits

Compare with previous version

halucinor commented 1 year ago

확인 감사합니다~ 수정했습니다 :)

halucinor commented 1 year ago

해당 내용 적용해서 컨트롤러 수정했습니다.

halucinor commented 1 year ago

참고해서 update에 관련된 내용들 더티채킹을 사용할 수 있도록 수정했습니다.

halucinor commented 1 year ago

확인 감사합니다. 적용 후 수정했습니다.

halucinor commented 1 year ago

변경했습니다!

halucinor commented 1 year ago

added 1 commit

Compare with previous version

halucinor commented 1 year ago

added 1 commit

Compare with previous version

halucinor commented 1 year ago

In GitLab by @haaeee on Feb 20, 2023, 16:56

Commented on src/main/java/com/gabia/bshop/controller/ItemImageController.java line 48

확인하였습니다!