Skip to content

Commit d349223

Browse files
authored
Merge pull request #161 from Money-Touch/fix/#159
[#156] 🐛Fix: 고정비 목록 조회 응답값 content 수정
2 parents 35a8dcc + 8f5b9df commit d349223

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/main/java/com/server/money_touch/domain/fixedConsumption/converter/FixedConsumptionConverter.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ public static FixedConsumption toFixedConsumption(User user, FixedConsumptionReq
1616
.categoryName(requestDTO.getCategoryName())
1717
.fixedConsumptionAmount(requestDTO.getAmount())
1818
.fixedConsumptionContent(requestDTO.getContent())
19-
.fixedConsumptionMemo(requestDTO.getMemo())
19+
// ✅ 메모가 비어 있으면 null 로 처리
20+
.fixedConsumptionMemo(
21+
(requestDTO.getMemo() == null || requestDTO.getMemo().isBlank())
22+
? null
23+
: requestDTO.getMemo()
24+
)
2025
.appliedThisMonth(true)
2126
.build();
2227
}
@@ -34,7 +39,7 @@ public static FixedConsumptionResponse.FixedConsumptionDetailDTO toFixedConsumpt
3439
.fixedConsumptionId(entity.getId())
3540
.categoryName(entity.getCategoryName())
3641
.amount(entity.getFixedConsumptionAmount())
37-
.memo(entity.getFixedConsumptionMemo())
42+
.content(entity.getFixedConsumptionContent())
3843
.build();
3944
}
4045

src/main/java/com/server/money_touch/domain/fixedConsumption/dto/FixedConsumptionResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static class FixedConsumptionDetailDTO {
6161
@Schema(description = "고정비 금액", example = "23000")
6262
private Integer amount;
6363

64-
@Schema(description = "메모", example = "가족 공유 요금제")
65-
private String memo;
64+
@Schema(description = "항목명", example = "가족 공유 요금제")
65+
private String content;
6666
}
6767
}

0 commit comments

Comments
 (0)