Skip to content

Commit

Permalink
[FIX] 리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
unanchoi committed Aug 8, 2023
1 parent 11d0c01 commit 0cb6eaf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

@Schema(description = "사용자 학습 계획 수정 요청")
public record MemberPlanUpdateRequestDTO(
@Schema(description = "목표 Enum DEVELOP, HOBBY, APPLY, BUSINESS, EXAM, NONE", example = "HOBBY")
@Schema(description = "목표 타입", example = "HOBBY")
GoalType target,

@Schema(description = "학습 시간")
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/smeme/server/service/MemberService.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;

import java.util.List;
import java.util.Objects;
Expand Down Expand Up @@ -87,8 +88,8 @@ public void updateMemberPlan(Long memberId, MemberPlanUpdateRequestDTO requestDT
member.updateHasAlarm(requestDTO.hasAlarm());
}

if (nonNull(requestDTO.trainingTime()) && (!"".equals(requestDTO.trainingTime().day()))) {
updateMemberTrainingTime(member, requestDTO);
if (nonNull(requestDTO.trainingTime()) && StringUtils.hasText(requestDTO.trainingTime().day())) {
updateMemberTrainingTime(member, requestDTO);
}
}

Expand Down

0 comments on commit 0cb6eaf

Please sign in to comment.