diff --git a/src/main/java/com/najasin/domain/character/body/entity/Body.java b/src/main/java/com/najasin/domain/character/body/entity/Body.java index 6874ae1..98653fb 100644 --- a/src/main/java/com/najasin/domain/character/body/entity/Body.java +++ b/src/main/java/com/najasin/domain/character/body/entity/Body.java @@ -19,9 +19,9 @@ public class Body { @Column(name = "body_name") private String name; - @Column(name = "body_show_url") + @Column(name = "body_show_url",columnDefinition = "TEXT") private String show_url; - @Column(name = "body_layout_url") + @Column(name = "body_layout_url",columnDefinition = "TEXT") private String layout_url; } diff --git a/src/main/java/com/najasin/domain/character/characterset/entity/CharacterSet.java b/src/main/java/com/najasin/domain/character/characterset/entity/CharacterSet.java index 0cdbf65..381148e 100644 --- a/src/main/java/com/najasin/domain/character/characterset/entity/CharacterSet.java +++ b/src/main/java/com/najasin/domain/character/characterset/entity/CharacterSet.java @@ -19,7 +19,7 @@ public class CharacterSet { @Column(name = "set_name") private String name; - @Column(name = "set_url") + @Column(name = "set_url",columnDefinition = "TEXT") private String url; } diff --git a/src/main/java/com/najasin/domain/character/expression/entity/Expression.java b/src/main/java/com/najasin/domain/character/expression/entity/Expression.java index eee205b..eb35ba8 100644 --- a/src/main/java/com/najasin/domain/character/expression/entity/Expression.java +++ b/src/main/java/com/najasin/domain/character/expression/entity/Expression.java @@ -19,10 +19,10 @@ public class Expression { @Column(name = "expression_name") private String name; - @Column(name = "expression_show_url") + @Column(name = "expression_show_url",columnDefinition = "TEXT") private String show_url; - @Column(name = "expression_layout_url") + @Column(name = "expression_layout_url",columnDefinition = "TEXT") private String layout_url; } diff --git a/src/main/java/com/najasin/domain/character/face/entity/Face.java b/src/main/java/com/najasin/domain/character/face/entity/Face.java index 59267e6..5bb02cd 100644 --- a/src/main/java/com/najasin/domain/character/face/entity/Face.java +++ b/src/main/java/com/najasin/domain/character/face/entity/Face.java @@ -19,9 +19,9 @@ public class Face { @Column(name = "face_name") private String name; - @Column(name = "face_show_url") + @Column(name = "face_show_url",columnDefinition = "TEXT") private String show_url; - @Column(name = "face_layout_url") + @Column(name = "face_layout_url",columnDefinition = "TEXT") private String layout_url; } diff --git a/src/main/java/com/najasin/domain/user/controller/UserController.java b/src/main/java/com/najasin/domain/user/controller/UserController.java index 8dfd61a..68a9428 100644 --- a/src/main/java/com/najasin/domain/user/controller/UserController.java +++ b/src/main/java/com/najasin/domain/user/controller/UserController.java @@ -8,6 +8,8 @@ import com.najasin.domain.character.dto.AllCharacterItems; import com.najasin.domain.character.dto.CharacterItems; import com.najasin.domain.comment.service.CommentService; +import com.najasin.domain.keyword.repository.KeywordRepository; +import com.najasin.domain.keyword.service.KeywordService; import com.najasin.domain.keyword.service.KeywordService; import com.najasin.domain.question.entity.QuestionType; import com.najasin.domain.question.service.QuestionService; @@ -46,7 +48,7 @@ public class UserController { private final UserKeywordService userKeywordService; private final CharacterService characterService; private final KeywordService keywordService; -// String userId = "63a47bcb-ebb1-4618-b357-fdd6681bd0fc"; + private String basicURL = "https://najasin-images.s3.ap-northeast-2.amazonaws.com/characters/base-character.svg"; @PostMapping("/logout") public ResponseEntity> logout(@AccessToken String accessToken, @RefreshToken String refreshToken) { @@ -151,13 +153,13 @@ public ResponseEntity> getMyManual( @AuthorizeUser User user ) { Manual manual = new Manual(); - + + String userId = user.getId(); if(!isNull(user)) { manual.setNickname(user.getId()); } - manual.setBaseImage("https://picsum.photos/200/300?random=1"); + manual.setBaseImage(basicURL); manual.setExampleKeywords(keywordService.getAllKeywords()); - manual.setBaseImage("https://picsum.photos/200/300?random=1"); manual.setCharacterItems(characterService.getAllCharacterItems().getCharacterItems()); manual.setQuestions(questionService.getQuestionByQuestionTypeAndUserType(QuestionType.FOR_USER, userTypeName)); return new ResponseEntity<>( @@ -174,7 +176,7 @@ public ResponseEntity> getOthersPage(@PathVariable String userTyp page.setQuestions(questionService.getQuestionByQuestionTypeAndUserType(QuestionType.FOR_OTHERS, userTypeName)); page.setNickname(user.getNickname()); - page.setBaseImage("https://picsum.photos/200/300?random=1"); + page.setBaseImage(basicURL); CharacterItems characterInfoDTO = userUserTypeService.getCharacter(userId, userTypeName); page.setCharacterItems(new CharacterItems(characterInfoDTO.getFace(), characterInfoDTO.getBody(), characterInfoDTO.getExpression(), characterInfoDTO.getSet())); page.setMyManualQAPair(userUserTypeService.getQAByUserIdAndUserTypeForUser(userId, userTypeName, QuestionType.FOR_USER)); @@ -192,7 +194,6 @@ public ResponseEntity> getMyPage( @PathVariable String userTypeName, @AuthorizeUser User user ) { -// User user = userService.findById(userId); String userId = user.getId(); Page page = new Page(); @@ -203,7 +204,7 @@ public ResponseEntity> getMyPage( page.setUserTypes(userTypes); page.setNickname(user.getNickname()); - page.setBaseImage("https://picsum.photos/200/300?random=1"); + page.setBaseImage(basicURL); CharacterItems characterInfoDTO = userUserTypeService.getCharacter(userId, userTypeName); page.setCharacterItems(new CharacterItems(characterInfoDTO.getFace(), characterInfoDTO.getBody(), characterInfoDTO.getExpression(), characterInfoDTO.getSet())); diff --git a/src/main/java/com/najasin/domain/user/service/UserService.java b/src/main/java/com/najasin/domain/user/service/UserService.java index 8d98497..757e997 100644 --- a/src/main/java/com/najasin/domain/user/service/UserService.java +++ b/src/main/java/com/najasin/domain/user/service/UserService.java @@ -47,6 +47,7 @@ public User save(Oauth2Entity oauth2Entity) { @Transactional(readOnly = true) public User findById(String id) { + System.out.println(id); return userRepository.findById(id).orElseThrow(EntityNotFoundException::new); } @@ -63,8 +64,6 @@ public User updateNickname(String id, String nickname) { } - - public String generateUUID() { String uuid = UUID.randomUUID().toString();