Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

상품관련 컨트롤러 + 테스트코드작성 #29

Open
jjeda opened this issue Oct 8, 2019 · 1 comment
Open

상품관련 컨트롤러 + 테스트코드작성 #29

jjeda opened this issue Oct 8, 2019 · 1 comment
Assignees
Labels
Item Item Domain

Comments

@jjeda
Copy link
Collaborator

jjeda commented Oct 8, 2019

  • 상품 도메인에 컨트롤러 붙이기
  • 테스트코드 작성
@jjeda jjeda added the Item Item Domain label Oct 8, 2019
@jjeda jjeda self-assigned this Oct 8, 2019
@jjeda
Copy link
Collaborator Author

jjeda commented Oct 20, 2019

   public Item saveItem(ItemDto itemDto) {
        Item item = itemDto.toEntity();
        List<ItemCategory> itemCategories = item.getItemCategories();
//TODO 
        for (ItemCategory itemCategory : itemCategories) {
            itemCategory.setItem(item);
            Category category = itemCategory.getCategory();
            category.getItemCategories().add(itemCategory);
        }

        return itemRepository.save(item);
    }

아이템 <-> 카테고리 처리

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Item Item Domain
Projects
None yet
Development

No branches or pull requests

1 participant