260710_01_ENH: SID 별 발송 결과 조회 구현, 발송 결과 코드 표 조회 구현
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
package com.kri.notihub.server.dto.report;
|
||||
|
||||
import com.kri.notihub.server.persistence.entity.TSendResultCodeEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "발송 결과 코드")
|
||||
public class SendResultCodeDto {
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "결과 코드")
|
||||
private Short resultCode;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "결과 타입")
|
||||
private Short resultTy;
|
||||
|
||||
@Size(max = 128)
|
||||
@NotBlank
|
||||
@Schema(description = "결과 라벨")
|
||||
private String resultLabel;
|
||||
|
||||
@Size(max = 128)
|
||||
@NotBlank
|
||||
@Schema(description = "결과 표시 라벨")
|
||||
private String resultViewLabel;
|
||||
|
||||
public static SendResultCodeDto from(TSendResultCodeEntity entity) {
|
||||
if (entity == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return SendResultCodeDto.builder()
|
||||
.resultCode(entity.getResultCode())
|
||||
.resultTy(entity.getResultTy())
|
||||
.resultLabel(entity.getResultLabel())
|
||||
.resultViewLabel(entity.getResultViewLabel())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.kri.notihub.server.dto.report;
|
||||
|
||||
import com.kri.notihub.server.persistence.entity.TSendEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(description = "발송 결과 정보")
|
||||
public class SendResultInfoDto {
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "CMID")
|
||||
private String cmid;
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "대량 발송 키")
|
||||
private String bulkSendKey;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "발송 타입")
|
||||
private Short sendTy;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "예약 여부")
|
||||
private Boolean resve;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "결과 코드")
|
||||
private Short resultCode;
|
||||
|
||||
@Schema(description = "템플릿 인덱스")
|
||||
private Long tmplatIdx;
|
||||
|
||||
@Size(max = 64)
|
||||
@Schema(description = "카카오 템플릿 코드")
|
||||
private String kkoTmplatCd;
|
||||
|
||||
@Size(max = 64)
|
||||
@Schema(description = "발신 이메일")
|
||||
private String sendEml;
|
||||
|
||||
@Size(max = 16)
|
||||
@Schema(description = "발신 전화번호")
|
||||
private String sendTel;
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "발신자명")
|
||||
private String sendNm;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "발송 일시")
|
||||
private LocalDateTime sendDt;
|
||||
|
||||
@Size(max = 64)
|
||||
@Schema(description = "수신 이메일")
|
||||
private String destEml;
|
||||
|
||||
@Size(max = 32)
|
||||
@Schema(description = "수신자명")
|
||||
private String destNm;
|
||||
|
||||
@Size(max = 16)
|
||||
@Schema(description = "수신 전화번호")
|
||||
private String destTel;
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "등록 회사")
|
||||
private String regCmpn;
|
||||
|
||||
@Size(max = 32)
|
||||
@NotBlank
|
||||
@Schema(description = "등록자")
|
||||
private String regUser;
|
||||
|
||||
@NotNull
|
||||
@Schema(description = "등록 일시")
|
||||
private LocalDateTime regDt;
|
||||
|
||||
public static SendResultInfoDto from(TSendEntity entity) {
|
||||
if (entity == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return SendResultInfoDto.builder()
|
||||
.cmid(entity.getCmid())
|
||||
.bulkSendKey(entity.getBulkSendKey())
|
||||
.sendTy(entity.getSendTy())
|
||||
.resve(entity.isResve())
|
||||
.resultCode(entity.getResultCode())
|
||||
.tmplatIdx(entity.getTmplatIdx())
|
||||
.kkoTmplatCd(entity.getKkoTmplatCd())
|
||||
.sendEml(entity.getSendEml())
|
||||
.sendTel(entity.getSendTel())
|
||||
.sendNm(entity.getSendNm())
|
||||
.sendDt(entity.getSendDt())
|
||||
.destEml(entity.getDestEml())
|
||||
.destNm(entity.getDestNm())
|
||||
.destTel(entity.getDestTel())
|
||||
.regCmpn(entity.getRegCmpn())
|
||||
.regUser(entity.getRegUser())
|
||||
.regDt(entity.getRegDt())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user