-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Controller 분리 병합 HomeController를 alarmController로 분리 UserController를 ProjectController에 병합 ComplimentMarkController를 ReviewController에 병합 - Service 분리 병합 UserService를 ProjectService에 병합 HashtagService, PositionService을 SignupSerivce에 병합 ComplimentMarkService를 ReviewService에 병합
- Loading branch information
1 parent
d63cc2c
commit 845e7a8
Showing
122 changed files
with
348 additions
and
1,965 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
src/main/java/MakeUs/Moira/advice/exception/CustomException.java
This file was deleted.
Oops, something went wrong.
69 changes: 0 additions & 69 deletions
69
src/main/java/MakeUs/Moira/advice/exception/ErrorCode.java
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
src/main/java/MakeUs/Moira/config/SwaggerConfiguration.java
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
src/main/java/MakeUs/Moira/config/security/CustomAccessDeniedHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
src/main/java/MakeUs/Moira/config/security/CustomAuthEntryPoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
src/main/java/MakeUs/Moira/controller/alarm/AlarmController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
package MakeUs.Moira.controller.alarm; | ||
|
||
import MakeUs.Moira.config.security.JwtTokenProvider; | ||
import MakeUs.Moira.controller.alarm.dto.AlarmReadStatusUpdateResponseDto; | ||
import MakeUs.Moira.controller.alarm.dto.AlarmResponseDto; | ||
import MakeUs.Moira.service.home.HomeService; | ||
import MakeUs.Moira.util.response.ResponseService; | ||
import MakeUs.Moira.util.response.model.ListResult; | ||
import MakeUs.Moira.util.response.model.SingleResult; | ||
import io.swagger.annotations.*; | ||
import lombok.RequiredArgsConstructor; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
import java.util.List; | ||
|
||
@Api(tags = {"1.알람"}) | ||
@RequiredArgsConstructor | ||
@RestController | ||
public class AlarmController { | ||
|
||
private final HomeService homeService; | ||
private final ResponseService responseService; | ||
private final JwtTokenProvider jwtTokenProvider; | ||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
|
||
|
||
@ApiImplicitParams({ | ||
@ApiImplicitParam( | ||
name = "X-AUTH-TOKEN", | ||
value = "로그인 성공 후 JWT_TOKEN", | ||
required = true, dataType = "String", paramType = "header") | ||
}) | ||
@ApiOperation( | ||
value = "홈화면 - 알람 목록", | ||
notes = "### 홈화면에서 알람 목록을 확인합니다.\n" + | ||
"### 페이징이 적용되며 10개씩 목록을 가져옵니다.\n\n" + | ||
"### 알람 타입으로 PROJECT, APPLY(지원서), APPLY_ANSWER(지원서 응답), INVITE_ANSWER(팀장 초대 응답), REVIEW(리뷰), CHATROOM(채팅방)이 있습니다.\n\n" + | ||
"### PROJECT\n" + | ||
"- alarmTargetId를 projectId로 사용하여 /project/{projectId} 팀원 모집 - 팀 모집글 상세로 리다이렉팅 시킵니다.\n" + | ||
"### REVIEW\n" + | ||
"- alarmTargetId를 userId로 사용하여 /review/detail/{userId} 유저의 모든 리뷰 내용 조회로 리다이렉팅 시킵니다.\n" + | ||
"### CHATROOM\n" + | ||
"- alarmTargetId를 chatRoomId로 사용하여 /chatroom/{chatRoomId} 유저와 채팅 내용 불러오기로 리다이렉팅 시킵니다.\n" + | ||
"### APPLY\n" + | ||
"- alarmTargetId를 projectApplyId로 사용하여 /apply/{projectApplyId} 마이페이지 - 지원한 글 - 지원 목록 - 지원 내역로 리다이렉팅 시킵니다.\n" + | ||
"### APPLY_ANSWER\n" + | ||
"- 지원자를 수락할지 거절할지 선택하여 alarmTargetId를 projectApplyId로 사용하여 /apply/{projectApplyId} 지원서의 상태를 변경을 통해 상태를 변경시킬 수 있도록 합니다.\n" + | ||
"### INVITE_ANSWER\n" + | ||
"- 팀장의 초대를 수락할지 거절할지 선택하여 alarmTargetId를 projectApplyId로 사용하여 /apply/{projectApplyId} 지원서의 상태를 변경을 통해 상태를 변경시킬 수 있도록 합니다." | ||
) | ||
@GetMapping("/alarm") | ||
public ListResult<AlarmResponseDto> getAlarm(@RequestHeader(value = "X-AUTH-TOKEN") String token, | ||
@ApiParam(value = "페이지 Ex) page=1", required = true) @RequestParam int page) | ||
{ | ||
Long userId = Long.parseLong(jwtTokenProvider.getUserPk(token)); | ||
List<AlarmResponseDto> alarmResponseDtoList = homeService.getAlarm(userId, page); | ||
logger.info(alarmResponseDtoList.toString()); | ||
return responseService.mappingListResult(alarmResponseDtoList, "홈화면 - 알람 목록"); | ||
} | ||
|
||
|
||
@ApiImplicitParams({ | ||
@ApiImplicitParam( | ||
name = "X-AUTH-TOKEN", | ||
value = "로그인 성공 후 JWT_TOKEN", | ||
required = true, dataType = "String", paramType = "header") | ||
}) | ||
@ApiOperation( | ||
value = "홈화면 - 알람목록 - 특정 알람 읽음 처리", | ||
notes = "### 알람으로 리다이렉션이 일어날 때, 해당 알람을 읽음 처리합니다.\n" | ||
) | ||
@PatchMapping("/alarm/{alarmId}") | ||
public SingleResult<AlarmReadStatusUpdateResponseDto> updateReadStatus(@RequestHeader(value = "X-AUTH-TOKEN") String token, | ||
@ApiParam(value = "읽음 처리할 alarmId", required = true) @PathVariable Long alarmId ) | ||
{ | ||
AlarmReadStatusUpdateResponseDto alarmReadStatusUpdateResponseDto = homeService.updateReadStatus(alarmId); | ||
logger.info(alarmReadStatusUpdateResponseDto.toString()); | ||
return responseService.mappingSingleResult(alarmReadStatusUpdateResponseDto, "홈화면 - 알람목록 - 특정 알람 읽음 처리"); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...dto/AlarmReadStatusUpdateResponseDto.java → ...dto/AlarmReadStatusUpdateResponseDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...controller/home/dto/AlarmResponseDto.java → ...ontroller/alarm/dto/AlarmResponseDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/java/MakeUs/Moira/controller/chat/dto/ChatMessageSendRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.