Skip to content

Commit

Permalink
Merge pull request #108 from RE-FIT/feature108
Browse files Browse the repository at this point in the history
[refactor] : 옷장 전체 조회 API 리팩토링
  • Loading branch information
choidongkuen authored Aug 12, 2023
2 parents e41783d + 39d4c73 commit 1f236af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/main/java/com/umc/refit/web/service/ClotheService.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
Expand Down Expand Up @@ -84,7 +83,7 @@ public List<GetClotheListResponseDto> showClotheMain(Integer category, Integer s
return Integer.compare(remainedDay2, remainedDay1);
} else if (isNegative1 && isNegative2) {
// 음수인 값들은 오름차순 정렬
return Integer.compare(remainedDay1, remainedDay2);
return Integer.compare(remainedDay2, remainedDay1);
} else if (isNegative1) {
// -7777 인 값들은 lastDate 기준으로 내림차순 정렬
// getLastDate() == null 인 경우에는 뒤로
Expand All @@ -106,7 +105,7 @@ public List<GetClotheListResponseDto> showClotheMain(Integer category, Integer s
.map(clothe -> clothe.from(this.calculateRemainedDay(clothe)))
.collect(Collectors.toList());

} else if (sort.equals("most_worn")) {
} else if (sort.equals("most-worn")) {
return this.closetRepository.findAllByCategoryAndSeasonOrderByCountDesc(category, season)
.stream()
.map(clothe -> clothe.from(this.calculateRemainedDay(clothe)))
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/umc/refit/web/service/MyInfoService.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.Objects;

import static com.umc.refit.exception.ExceptionType.*;
Expand Down

0 comments on commit 1f236af

Please sign in to comment.