diff --git a/src/main/java/com/onestep/server/service/question/GptService.java b/src/main/java/com/onestep/server/service/question/GptService.java index 68572dc..7308019 100644 --- a/src/main/java/com/onestep/server/service/question/GptService.java +++ b/src/main/java/com/onestep/server/service/question/GptService.java @@ -48,7 +48,7 @@ private HttpEntity getHttpEntity(ChatRequestDTO chatRequest) { public String getKeyword(){ Random random = new Random(); random.setSeed(System.currentTimeMillis()); - Long randomNum = (long) (random.nextInt(30) + 1); + Long randomNum = (long) (random.nextInt(70) + 1); Optional optionalKeyWord = iKeyWordRepository.findById(randomNum); return optionalKeyWord.get().getKeyword(); } @@ -153,7 +153,7 @@ public void getQuestions() { String query4 = "나를 잘 표현할 수 있는 질문을 1개 추천해줘."; query4 += "\n질문의 조건은 다음과 같아."; query4 += "\n1.내가 어떤 사람인지 표현할 수 있을 만한 질문이어야해"; - query4 += "\n2.조금은 유쾌한 질문이면 좋겠어."; + query4 += "\n2.장난스럽고 유쾌한 질문어어도 괜찮아."; query4 += "\n3.다음 키워드와 관련된 질문이어야돼: "; query4 += getKeyword(); query4 += "\n답변 형식은 '오늘의 질문: {오늘의 질문}' 이 형식으로 적어줘"; diff --git a/src/main/java/com/onestep/server/service/quiz/QuizService.java b/src/main/java/com/onestep/server/service/quiz/QuizService.java index 6dd117b..65d3f4c 100644 --- a/src/main/java/com/onestep/server/service/quiz/QuizService.java +++ b/src/main/java/com/onestep/server/service/quiz/QuizService.java @@ -12,7 +12,6 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; - import java.time.LocalTime; import java.util.ArrayList; import java.util.Date; @@ -72,17 +71,13 @@ public Boolean canQuiz(String family_id){ Boolean canQuiz = true; Date writeDate = new Date(); LocalTime now = LocalTime.now(); - log.info("Tset1 ={}",writeDate); if(now.getHour()<6){ Date dDate = new Date(); writeDate = new Date(dDate.getTime()+(1000*60*60*24*-1)); - log.info("Tset2 ={}",writeDate); } Optional optionalQuiz = iQuizRepository.findQuizByWriteDate(family_id,writeDate); - log.info("Tset3 ={}",optionalQuiz); // 같은 날에 퀴즈를 생성 했을 시 if(optionalQuiz.isPresent()){ - log.info("Tset4 ={}",optionalQuiz.get()); canQuiz = false; }