Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.juu.juulabel.common.response.CommonResponse;
import com.juu.juulabel.common.dto.request.*;
import com.juu.juulabel.common.dto.response.*;
import com.juu.juulabel.alcohol.service.TastingNoteService;
import com.juu.juulabel.tastingnote.service.TastingNoteService;
import com.juu.juulabel.member.domain.Member;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
Expand Down
528 changes: 0 additions & 528 deletions src/main/java/com/juu/juulabel/alcohol/service/TastingNoteService.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ public enum ErrorCode {
/**
* DailyLife
*/
DAILY_LIFE_NOT_FOUND(HttpStatus.BAD_REQUEST, "일상생활 게시글을 찾을 수 없습니다."),
DAILY_LIFE_NOT_FOUND(HttpStatus.NOT_FOUND, "일상생활 게시글을 찾을 수 없습니다."),
DAILY_LIFE_ALREADY_DELETED(HttpStatus.BAD_REQUEST, "이미 삭제된 일상생활 게시글입니다."),
DAILY_LIFE_NOT_WRITER(HttpStatus.BAD_REQUEST, "게시글 작성자가 아닙니다."),
DAILY_LIFE_COMMENT_NOT_FOUND(HttpStatus.NOT_FOUND, "일상생활 댓글을 찾을 수 없습니다."),

/**
* FILE
Expand All @@ -97,7 +98,14 @@ public enum ErrorCode {

TASTING_NOTE_NOT_FOUND(HttpStatus.BAD_REQUEST, "시음노트 게시글을 찾을 수 없습니다."),
TASTING_NOTE_ALREADY_DELETED(HttpStatus.BAD_REQUEST, "이미 삭제된 시음노트 게시글입니다."),
TASTING_NOTE_NOT_WRITER(HttpStatus.BAD_REQUEST, "게시글 작성자가 아닙니다.")
TASTING_NOTE_NOT_WRITER(HttpStatus.BAD_REQUEST, "게시글 작성자가 아닙니다."),

TASTING_NOTE_COMMENT_NOT_FOUND(HttpStatus.NOT_FOUND, "시음노트 댓글을 찾을 수 없습니다."),

/**
* Report
*/
REPORT_PROCESSOR_NOT_FOUND(HttpStatus.BAD_REQUEST, "처리할 수 있는 신고 유형이 아닙니다."),
;

private final HttpStatus httpStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.juu.juulabel.dailylife.service;

import com.juu.juulabel.common.exception.BaseException;
import com.juu.juulabel.common.exception.code.ErrorCode;
import com.juu.juulabel.dailylife.domain.DailyLifeComment;
import com.juu.juulabel.dailylife.repository.jpa.DailyLifeCommentJpaRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@RequiredArgsConstructor
@Transactional(readOnly = true)
public class DailyLifeCommentService {
private final DailyLifeCommentJpaRepository dailyLifeCommentJpaRepository;

public DailyLifeComment findById(long id) {
return dailyLifeCommentJpaRepository.findById(id)
.orElseThrow(() -> new BaseException(ErrorCode.DAILY_LIFE_COMMENT_NOT_FOUND));
}
}

Loading