Skip to content

Commit

Permalink
Merge pull request #47 from najasin/develop
Browse files Browse the repository at this point in the history
fix: #34 basicURL 설정 및 entity 필드 타입 수정
  • Loading branch information
lcomment authored Aug 20, 2023
2 parents d5a23c7 + 122322a commit 6657462
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<ApiResponse<?>> logout(@AccessToken String accessToken, @RefreshToken String refreshToken) {
Expand Down Expand Up @@ -151,13 +153,13 @@ public ResponseEntity<ApiResponse<?>> 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<>(
Expand All @@ -174,7 +176,7 @@ public ResponseEntity<ApiResponse<?>> 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));
Expand All @@ -192,7 +194,6 @@ public ResponseEntity<ApiResponse<?>> getMyPage(
@PathVariable String userTypeName,
@AuthorizeUser User user
) {
// User user = userService.findById(userId);
String userId = user.getId();
Page page = new Page();

Expand All @@ -203,7 +204,7 @@ public ResponseEntity<ApiResponse<?>> 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()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -63,8 +64,6 @@ public User updateNickname(String id, String nickname) {
}




public String generateUUID() {
String uuid = UUID.randomUUID().toString();

Expand Down

0 comments on commit 6657462

Please sign in to comment.