Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

요구사항 수정 Feature/#67 junior dashboard #109

Merged
merged 13 commits into from
Oct 10, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public enum ProcessStatus {
WAITING_FOR_PAYMENT("입금 대기중", 0, "리뷰이의 입금을 대기중이에요.", "입금 완료 알리기"),
PAYMENT_CONFIRMATION("입금 확인중", 1, "입금 확인하기", "입금 확인 대기중"),
MISSION_PROCEEDING("미션 수행중", 2, "리뷰이가 미션 수행중이에요.", "리뷰 요청하기"),
CODE_REVIEW("코드 리뷰 작성", 3, "미션 리뷰 완료", ""),
CODE_REVIEW("코드 리뷰 작성", 3, "미션 리뷰 완료", "리뷰어의 코드리뷰 확인중"),
MISSION_FINISHED("미션 완료!", 4, "미션이 완료되었어요. \uD83C\uDF89", "후기 작성하기"),
FEEDBACK_REVIEWED("리뷰 완료!", 5, "후기 보러가기", "후기 보거가기");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ public static RegistrationSeniorResponse toRegistrationSeniorResponse(
}

public static RegistrationSeniorDetailResponse toRegistrationSeniorDetailResponse(Mission mission, Member junior, ProcessStatus status, List<MissionHistoryInfo> missionHistory, AdditionalInfo additionalInfo) {
RegistrationSeniorDetailResponse response = additionalInfo.createResponse();
RegistrationSeniorDetailResponse response = new RegistrationSeniorDetailResponse();

response.setMemberId(junior.getMemberId());
response.setNickname(junior.getNickName());
response.setGithubId(junior.getGithubId());
response.setStatus(status);
response.setMissionHistory(missionHistory);
response.setAdditionalInfo(additionalInfo.getAdditionalInfo());
response.setButtonTitle(status.getSeniorBottomTitle());

return response;
Expand All @@ -49,12 +50,13 @@ public static RegistrationJuniorResponse toRegistrationJuniorResponse(
ProcessStatus status,
JuniorAdditionalInfo additionalInfo
) {
RegistrationJuniorResponse response = additionalInfo.createResponse();
RegistrationJuniorResponse response = new RegistrationJuniorResponse();

response.setMissionName(mission.getTitle());
response.setTechTagList(techTagList);
response.setProcessStatus(status);
response.setMissionHistory(missinHistory);
response.setAdditionalInfo(additionalInfo.getAdditionalInfo());
response.setButtonTitle(status.getJuniorBottomTitle());

return response;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@
import lombok.Data;
import lombok.experimental.SuperBuilder;

import java.util.HashMap;
import java.util.Map;

@Data @SuperBuilder
public class JuniorAdditionalAccountInfo extends JuniorAdditionalInfo {
private String accountNumber;
private String bankName;
private int price;
private String sendTo;


public RegistrationJuniorResponse createResponse() {
RegistrationJuniorAccountResponse response = new RegistrationJuniorAccountResponse();
response.setAccountInfo(this);
return response;
@Override
public Map<String, Object> getAdditionalInfo() {
Map<String, Object> additionalInfo = new HashMap<>();
additionalInfo.put("accountNumber", this.accountNumber);
additionalInfo.put("bankName", this.bankName);
additionalInfo.put("price", this.price);
additionalInfo.put("sendTo", this.sendTo);
return additionalInfo;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
import lombok.Data;
import lombok.experimental.SuperBuilder;

import java.util.Map;

@Data
@SuperBuilder
public class JuniorAdditionalFeedbackInfo extends JuniorAdditionalInfo {
private Long reviewId;


public RegistrationJuniorResponse createResponse() {
RegistrationJuniorFeedbackResponse response = new RegistrationJuniorFeedbackResponse();
response.setReviewId(this.getReviewId());
return response;
@Override
public Map<String, Object> getAdditionalInfo() {
Map<String, Object> additionalInfo = super.getAdditionalInfo();
additionalInfo.put("feedbackId", reviewId);
return additionalInfo;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.HashMap;
import java.util.Map;

@SuperBuilder
@NoArgsConstructor
public class JuniorAdditionalInfo {

public RegistrationJuniorResponse createResponse() {
return new RegistrationJuniorResponse();
public Map<String, Object> getAdditionalInfo() {
return new HashMap<>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
import lombok.Data;
import lombok.experimental.SuperBuilder;

import java.util.Map;

@Data
@SuperBuilder
public class JuniorAdditionalPullRequestInfo extends JuniorAdditionalInfo {
private String githubPullRequestUrl;


public RegistrationJuniorResponse createResponse() {
RegistrationJuniorPullRequestResponse response = new RegistrationJuniorPullRequestResponse();
response.setPullRequestUrl(this.githubPullRequestUrl);
return response;
@Override
public Map<String, Object> getAdditionalInfo() {
Map<String, Object> additionalInfo = super.getAdditionalInfo();
additionalInfo.put("githubPullRequestUrl", githubPullRequestUrl);
return additionalInfo;
}
}

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ public class RegistrationJuniorResponse {
protected String missionName;
protected List<TechTag> techTagList;
protected ProcessStatus processStatus;
protected Map<ProcessStatus,String> missionHistory;
protected Map<String, Object> missionProcessInfo = new HashMap<>();
protected String buttonTitle;

public void setMissionHistory(List<MissionHistoryInfo> missionHistory) {
this.missionHistory = new HashMap<>();
for (MissionHistoryInfo history : missionHistory) {
this.missionHistory.put(history.getStatus(),history.getDateTime());
this.missionProcessInfo.put(history.getStatus().toString(), history.getDateTime());
}
}

public void setAdditionalInfo(Map<String, Object> additionalInfo) {
this.missionProcessInfo.putAll(additionalInfo);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
import lombok.Builder;
import lombok.Data;

import java.util.Map;

@Data
@Builder
public class AdditionalFeedbackInfo extends AdditionalInfo {
private Long reviewId;

@Override
public RegistrationSeniorDetailResponse createResponse() {
RegistrationSeniorDetailFeedbackResponse response = new RegistrationSeniorDetailFeedbackResponse();
response.setReviewId(reviewId);
return response;
public Map<String, Object> getAdditionalInfo() {
Map<String, Object> additionalInfo = super.getAdditionalInfo();
additionalInfo.put("feedbackId", reviewId);
return additionalInfo;
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package swm.hkcc.LGTM.app.modules.registration.dto.registrationSeniorDetailResponse;

import java.util.HashMap;
import java.util.Map;

public class AdditionalInfo {
public RegistrationSeniorDetailResponse createResponse() {
return new RegistrationSeniorDetailResponse();
public Map<String, Object> getAdditionalInfo() {
return new HashMap<>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
import lombok.Builder;
import lombok.Data;

import java.util.Map;

@Builder
@Data
public class AdditionalPayInfo extends AdditionalInfo {
private String realName;

@Override
public RegistrationSeniorDetailResponse createResponse() {
RegistrationSeniorDetailPayResponse response = new RegistrationSeniorDetailPayResponse();
response.setRealName(realName);
return response;
public Map<String, Object> getAdditionalInfo() {
Map<String, Object> additionalInfo = super.getAdditionalInfo();
additionalInfo.put("realName", realName);
return additionalInfo;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
import lombok.Builder;
import lombok.Data;

import java.util.Map;

@Data
@Builder
public class AdditionalPullRequestInfo extends AdditionalInfo {
private String githubPullRequestUrl;

@Override
public RegistrationSeniorDetailResponse createResponse() {
RegistrationSeniorDetailPullRequestResponse response = new RegistrationSeniorDetailPullRequestResponse();
response.setGithubPullRequestUrl(githubPullRequestUrl);
return response;
public Map<String, Object> getAdditionalInfo() {
Map<String, Object> additionalInfo = super.getAdditionalInfo();
additionalInfo.put("githubPullRequestUrl", githubPullRequestUrl);
return additionalInfo;
}
}

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ public class RegistrationSeniorDetailResponse {
protected String nickname;
protected String githubId;
protected ProcessStatus status;
protected Map<ProcessStatus,String> missionHistory;
protected Map<String,Object> missionProcessInfo = new HashMap<>();;
protected String buttonTitle;

public void setMissionHistory(List<MissionHistoryInfo> missionHistory) {
this.missionHistory = new HashMap<>();
for (MissionHistoryInfo history : missionHistory) {
this.missionHistory.put(history.getStatus(),history.getDateTime());
this.missionProcessInfo.put(history.getStatus().toString(),history.getDateTime());
}
}

public void setAdditionalInfo(Map<String, Object> additionalInfo) {
this.missionProcessInfo.putAll(additionalInfo);
}
}
Loading