Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] 질문 생성(ai 제외) 및 최신 질문 조회 완료 #30

Merged
merged 6 commits into from
May 29, 2024

Conversation

minwoo0419
Copy link
Contributor

Related issue 🛠

Work Description ✏️

  • ai 연결을 제외한 질문 생성기능 완성(매일 12시 마다 모든 room을 순회하며 질문을 생성한다)
  • 상대방이 보낸 가장 최신 질문(답장이 없는)을 조회하는 기능 완성
  • service layer test 완료
    image

Uncompleted Tasks 😅

  • ai 연결
  • fcm 연결

To Reviewers 📢

질문 생성을 할 때 12시 마다 모든 방의 사람들에게 질문을 생성하면 트래픽이 엄청날 것 같은데 나중에 모여서 얘기해봐요(ai까지 쓰면 엄청날듯)

Copy link
Contributor

@kmjenny kmjenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿입니당ヽ(•̀ω•́ )ゝ

Copy link
Contributor

@tkdwns414 tkdwns414 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 확인 부탁드립니다~

Comment on lines 16 to 23
// @PostMapping("/rooms/{roomId}/questions")
// public ResponseEntity<Void> createQuestion(
// @UserId Long userId,
// @PathVariable Long roomId
// ) {
// URI uri = URI.create("/question/" + questionService.create(userId, roomId).toString());
// return ResponseEntity.created(uri).build();
// }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이쪽 부분이 잘 이해가 안 가는데 어떤식으로 동작하는건가요?

cron으로 돌릴거라면 API가 굳이 필요하지 않을 것 같은데 질문 강제 생성인가요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

테스트해본다고 스케줄설정 전 했던건데 까먹고 안지웠네용

Comment on lines +84 to +86
} else {
return period.getYears() > 0 || period.getMonths() > 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 else문은 어떤걸 확인하기 위한건가요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

한 달 이상 또는 일 년 이상 차이날 경우 getDays를 했을 때 4보다 작게 나오는 경우가 있어서 이에 대한 예외처리 입니다

import org.mockito.MockitoAnnotations;


public class QuestionServiceTest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

다 좋은데 가독성 좋게 사이 줄바꿈이 있으면 남들이 보고 이해하기에 더 좋을 것 같아요!

@minwoo0419 minwoo0419 merged commit 0ffd1f9 into develop May 29, 2024
1 check passed
@minwoo0419 minwoo0419 deleted the feat/28 branch May 29, 2024 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] 질문 생성 및 확인 api 구현
3 participants