-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
예시)
체험 디테일에 스크립트 찜버튼 색 바뀌도록 함수 만들고
버튼 누르면 ajax 요청
wishListController에서 요청받고
wishListServiceImpl에서
@Transactional
public ResponEntity<?> toggleWish(memberId, ExperienceId){
Optional<Wish> optWish = findbyMemberIdAndExperienceId;
if(optWish.isEmpty()){
exp.IncreaseWishCount();
save(exp);
save(new wish(memberId,ExpId));
} else{
exp.decreaseWishCount();
save(exp);
delete(optWish.get());
}
return ~~;
}detail 볼 때
wishService
retrun findByMemberIdAndExperienceId;- 찜 목록 기능 구현 - 찜 등록되어 있으면 테이블에서 삭제 및 체험 wishcount -1, 찜 등록 안되어 있으면 테이블에서 생성 및 체험 wishcount + 1
- 찜 목록 html, javascript - 이미 찜 등록된 체험이라면, 버튼 글씨(찜 해제), 찜 등록되어있지 않은 체험이라면, 버튼 글씨(찜 등록)
- 찜 목록 페이지 - 체험 업로드 페이지와 유사, 예약자 목록 보기 대신, 버튼형식(찜 해제)으로 버튼 클릭시 테이블에서 삭제 및 해당 체험 wishcount -1, 페이지 reload로 찜 목록 페이지 업데이트
- 세부적인 부분 수정 - dto 어떤 내용 추가로 담을것인지(보여줄 것인지)
- url 통일 및 url 연결(페이지 이동 연결)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request