Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,18 @@ public static CenterResponseDTO.CenterMapRes toCenterMapRes(Center center) {
}
return CenterResponseDTO.CenterMapRes.builder()
.centerId(center.getId())
.name(center.getName())
.korName(center.getKorName())
.korAddress(center.getKorAddress())
.usaName(center.getUsaName())
.usaAddress(center.getUsaAddress())
.jpnName(center.getJpnName())
.jpnAddress(center.getJpnAddress())
.chnName(center.getChnName())
.chnAddress(center.getChnAddress())
.vnmName(center.getVnmName())
.vnmAddress(center.getVnmAddress())
.status(currentStatus)
.closed(center.getClosed().toString())
.address(center.getAddress())
.image(centerImg)
.latitude(center.getLatitude())
.longitude(center.getLongitude())
Expand Down Expand Up @@ -64,7 +72,7 @@ public static CenterResponseDTO.CounselorListRes toCounselorListRes(Page<Counsel
public static CenterResponseDTO.CounselorRes toCounselorRes(Counselor counselor) {
return CenterResponseDTO.CounselorRes.builder()
.name(counselor.getName())
.centerName(counselor.getCenter().getName())
.centerName(counselor.getCenter().getKorName())
.language(counselor.getCounselorLanguageList().stream().map(s -> s.getLanguage().getName()).collect(Collectors.toList()))
.start(counselor.getStart())
.end(counselor.getEnd())
Expand Down
28 changes: 26 additions & 2 deletions src/main/java/com/example/helloworldmvc/domain/Center.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,19 @@ public class Center {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false, length = 20)
private String name;
private String korName;

@Column(nullable = false, length = 100)
private String usaName;

@Column(nullable = false, length = 100)
private String jpnName;

@Column(nullable = false, length = 100)
private String chnName;

@Column(nullable = false, length = 100)
private String vnmName;

@Column(nullable = false)
private Double latitude;
Expand All @@ -39,7 +51,19 @@ public class Center {
private LocalTime opened;

@Column(nullable = false, length = 100)
private String address;
private String korAddress;

@Column(nullable = false, length = 100)
private String usaAddress;

@Column(nullable = false, length = 100)
private String jpnAddress;

@Column(nullable = false, length = 100)
private String chnAddress;

@Column(nullable = false, length = 100)
private String vnmAddress;

@Column(nullable = true, length = 255)
private String details;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public ApiResponse<CommunityResponseDTO.DeletedPostDTO> deleteCommunity(@Request
return ApiResponse.onSuccess(communityService.deleteCommunityPost(gmail, categoryId, communityId));
}

@PatchMapping(value = "/{category_id}/{community_id}/modify")
@PatchMapping(value = "/{community_id}/modify")
@Operation(summary = "커뮤니티 글 수정 API", description = "커뮤니티 게시판에 글을 수정하는 API입니다.")
@ApiResponses({
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "COMMON200", description = "OK, 성공"),
Expand All @@ -132,8 +132,8 @@ public ApiResponse<CommunityResponseDTO.DeletedPostDTO> deleteCommunity(@Request
@Parameter(name = "community_id", description = "PathVariable - 게시글 아이디"),
})
public ApiResponse<CommunityResponseDTO.ModifyPostDTO> modifyCommunity(@RequestHeader(name = "Authorization") String accessToken,
@PathVariable(name = "community_id") Long communityId,
@RequestBody @Valid CommunityRequestDTO.ModifyPostDTO modifyPostDTO
@PathVariable(name = "community_id") Long communityId,
@RequestBody @Valid CommunityRequestDTO.ModifyPostDTO modifyPostDTO
) {
String gmail = jwtTokenProvider.getGoogleEmail(accessToken);
return ApiResponse.onSuccess(communityService.modifyCommunityPost(gmail, communityId, modifyPostDTO));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,18 @@ public static class CenterMapListRes {
@AllArgsConstructor
public static class CenterMapRes {
Long centerId;
String name;
String korName;
String korAddress;
String usaName;
String usaAddress;
String jpnName;
String jpnAddress;
String chnName;
String chnAddress;
String vnmName;
String vnmAddress;
CenterStatus status;
String closed;
String address;
//MultipartFile 형으로 변경예정
String image;
Double latitude;
Expand Down
Loading