261022_02_ENH: 발송 결과·벌크 상세·벌크 목록 응답에 예약 취소 가능 여부(cancelable) 추가

This commit is contained in:
2026-10-22 15:17:57 +09:00
parent f2a9d6bfc6
commit 3162b52a35
4 changed files with 61 additions and 6 deletions

View File

@@ -44,6 +44,9 @@ public class BulkSendInfoDto {
@Schema(description = "예약 여부")
private Boolean resve;
@Schema(description = "조회 시점에 취소 가능한 예약 상세 건이 하나 이상인지 여부. 최종 판단은 취소 API 응답 기준")
private boolean cancelable;
@NotNull
@Schema(description = "발송일시")
private LocalDateTime sendDt;

View File

@@ -51,6 +51,9 @@ public record SendResultInfoDto(
@Schema(description = "예약 여부")
Boolean resve,
@Schema(description = "조회 시점의 상태 기준 예약 취소 가능 여부. 최종 판단은 취소 API 응답 기준")
boolean cancelable,
@NotNull
@Schema(description = "결과 코드")
Short resultCode,
@@ -118,6 +121,11 @@ public record SendResultInfoDto(
public static SendResultInfoDto from(TSendEntity entity,
List<TSendResultCodeEntity> resultCodeEntity) {
return from(entity, resultCodeEntity, false);
}
public static SendResultInfoDto from(TSendEntity entity,
List<TSendResultCodeEntity> resultCodeEntity, boolean cancelable) {
if (entity == null) {
return null;
}
@@ -137,6 +145,7 @@ public record SendResultInfoDto(
.sid(entity.getSid())
.sendTy(entity.getSendTy())
.resve(entity.isResve())
.cancelable(cancelable)
.resultCode(entity.getResultCode())
.resultLabel(canceled ? NotihubConst.CANCELED_LABEL
: resultCode != null ? resultCode.getResultLabel() : null)