-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from potenday-project/develop
면접 재시작, 피드백 재생성, 이력서 등록제한, 면접 등록제한 추가
- Loading branch information
Showing
22 changed files
with
331 additions
and
77 deletions.
There are no files selected for viewing
Submodule server_config
updated
from 8ebfd1 to 50f312
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/main/java/com/chwipoClova/feedback/controller/FeedbackController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,40 @@ | ||
package com.chwipoClova.feedback.controller; | ||
|
||
import com.chwipoClova.common.response.CommonResponse; | ||
import com.chwipoClova.feedback.request.FeedbackGenerateReq; | ||
import com.chwipoClova.feedback.service.FeedbackService; | ||
import com.chwipoClova.qa.request.QaAnswerInsertReq; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@Slf4j | ||
@RestController | ||
@RequiredArgsConstructor | ||
@Tag(name = "Feedback", description = "피드백 API") | ||
@RequestMapping("feedback") | ||
public class FeedbackController { | ||
|
||
private final FeedbackService feedbackService; | ||
|
||
@Operation(summary = "피드백 재생성", description = "피드백 재생성") | ||
@PostMapping("/generateFeedback") | ||
@ApiResponses(value = { | ||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))) | ||
} | ||
) | ||
public CommonResponse generateFeedback (@RequestBody FeedbackGenerateReq feedbackGenerateReq) throws Exception { | ||
return feedbackService.generateFeedback(feedbackGenerateReq); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/com/chwipoClova/feedback/entity/FeedbackEditor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.chwipoClova.feedback.entity; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.util.Date; | ||
|
||
@Getter | ||
public class FeedbackEditor { | ||
|
||
private String content; | ||
|
||
@Builder | ||
public FeedbackEditor(String content) { | ||
this.content = content; | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/chwipoClova/feedback/repository/FeedbackRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
package com.chwipoClova.feedback.repository; | ||
|
||
import com.chwipoClova.feedback.entity.Feedback; | ||
import com.chwipoClova.interview.entity.Interview; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public interface FeedbackRepository extends JpaRepository<Feedback, Long> { | ||
|
||
List<Feedback> findByQaQaIdOrderByFeedbackId(Long qaId); | ||
|
||
Optional<Feedback> findByQaQaIdAndType(Long qaId, Integer Type); | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/chwipoClova/feedback/request/FeedbackGenerateReq.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.chwipoClova.feedback.request; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class FeedbackGenerateReq { | ||
|
||
@Schema(description = "유저 ID", example = "1", name = "userId") | ||
private Long userId; | ||
@Schema(description = "면접 ID", example = "1", name = "interviewId") | ||
private Long interviewId; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/com/chwipoClova/interview/response/InterviewNotCompRes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.chwipoClova.interview.response; | ||
|
||
import com.chwipoClova.qa.response.QaListRes; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
|
||
@Data | ||
@Builder | ||
public class InterviewNotCompRes { | ||
@Schema(description = "면접 ID", example = "1", name = "interviewId") | ||
private Long interviewId; | ||
|
||
@Schema(description = "유저 ID", example = "1", name = "userId") | ||
private Long userId; | ||
|
||
@Schema(description = "총개수", example = "10", name = "totalCnt") | ||
private Integer totalCnt; | ||
|
||
@Schema(description = "답변개수", example = "1", name = "useCnt") | ||
private Integer useCnt; | ||
|
||
@Schema(description = "마지막 질문 ID", example = "1", name = "lastQaId") | ||
private Long lastQaId; | ||
|
||
@Schema(description = "질문데이터", name = "qaData") | ||
private List<QaListRes> qaData; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.