Skip to content

Commit

Permalink
refactor: 멘트 입력 시 프론트에 꽃 3개 반환 하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ss7622 committed Jun 29, 2024
1 parent 4d08e00 commit 8e7fbc1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,22 @@ public ResponseEntity<List<ResponseMentDto>> inputMentNotMember(@RequestBody Str
String url = "http://localhost:8080/model/test";

int value = LocalDateTime.now().getMonth().getValue();
System.out.println("value = " + value);

List<ModelMentResponseDto> re = CallApiService.mentApi(url, new MentDto(ment, value));
System.out.println("re.get(0).getName() = " + re.get(0).getName());
System.out.println("re.get(0).getFlowerLanguage() = " + re.get(0).getFlowerLanguage());

Flower byName0 = flowerService.findByNameAndFlowerLanguage(re.get(0).getName(),re.get(0).getFlowerLanguage());
Flower byName1 = flowerService.findByNameAndFlowerLanguage(re.get(1).getName(),re.get(1).getFlowerLanguage());
Flower byName2 = flowerService.findByNameAndFlowerLanguage(re.get(2).getName(),re.get(2).getFlowerLanguage());


List<ResponseMentDto> re2 = new ArrayList<>();
ResponseMentDto responseMentDto0 = new ResponseMentDto(byName0);
ResponseMentDto responseMentDto1 = new ResponseMentDto(byName1);
ResponseMentDto responseMentDto2 = new ResponseMentDto(byName2);

re2.add(responseMentDto0);
re2.add(responseMentDto1);
re2.add(responseMentDto2);


return ResponseEntity.ok(re2);
Expand All @@ -99,9 +100,12 @@ public List<ModelMentResponseDto> modelTest(@RequestBody MentDto mentDto) {
List<ModelMentResponseDto> re = new ArrayList<>();
ModelMentResponseDto modelMentResponseDto0 = new ModelMentResponseDto("토레니아", "가련한 욕망");
ModelMentResponseDto modelMentResponseDto1 = new ModelMentResponseDto("토마토", "완성된 아름다움");
ModelMentResponseDto modelMentResponseDto2 = new ModelMentResponseDto("겹 캄파눌라", "따뜻한 사람");


re.add(modelMentResponseDto0);
re.add(modelMentResponseDto1);
re.add(modelMentResponseDto2);

return re;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class JwtVerifyFilter extends OncePerRequestFilter {
//Swagger
"/swagger-ui/index.html", "/swagger-ui/**", "/v3/api-docs/**", "/swagger-resources/**", "/v3/api-docs",
//비회원 전용 api
"/main/today","/main/season","model/ment"};
"/main/today","/main/season","/model/ment"};
private final RedisUtil redisUtil;


Expand Down

0 comments on commit 8e7fbc1

Please sign in to comment.