json Alias 적용 - json read시 대문자 필드(RESULT_CD) 적용

dev
Jonguk. Lim 7 months ago
parent 03a0cbbd45
commit 1506f9bda4

@ -2,15 +2,13 @@ package cokr.xit.adds.biz.nims.model;
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*;
import java.util.ArrayList;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern; import javax.validation.constraints.Pattern;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import cokr.xit.adds.core.model.AuditDto;
import cokr.xit.adds.inf.nims.model.NimsApiDto; import cokr.xit.adds.inf.nims.model.NimsApiDto;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -45,7 +43,7 @@ public class BizNimsRequest {
@AllArgsConstructor @AllArgsConstructor
@SuperBuilder @SuperBuilder
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public static class DsuseMgt extends NimsApiDto.DsuseRptInfo { public static class DsuseMgt extends AuditDto {
@Schema(requiredMode = AUTO, title = "폐기 관리 ID", example = " ") @Schema(requiredMode = AUTO, title = "폐기 관리 ID", example = " ")
private String dscdmngId; private String dscdmngId;
@ -53,47 +51,50 @@ public class BizNimsRequest {
@NotEmpty(message = "사용자 ID는 필수 입니다") @NotEmpty(message = "사용자 ID는 필수 입니다")
private String userId; private String userId;
/**
* <pre>
*
*
* > > >
* =>
* YYYYMMDD
* </pre>
*/
@Schema(requiredMode = REQUIRED, title = "원사용자보고식별번호", example = " ")
private String orgUsrRptIdNo;
/**
* <pre>
*
* update
* </pre>
*/
@Schema(requiredMode = REQUIRED, title = "사용자보고식별번호", example = " ")
private String usrRptIdNo;
/**
*
*/
@JsonProperty(value = "BSSH_CD", required = true)
private String bsshCd;
/** /**
* <pre> * <pre>
* *
* *
* 01- * 01-
* 02- * 02-
* 11-() * 11-()
* 21- * 21-
* 22- * 22-
* 31- * 31-
* 41- * 41-
* 42-?
* 99- * 99-
* </pre> * </pre>
*/ */
@Schema(requiredMode = REQUIRED, title = "진행 상태 코드", example = " ", allowableValues = {"01", "02", "11", "22", "31", "41", "42", "99"}) @Schema(requiredMode = REQUIRED, title = "진행 상태 코드", example = " ", allowableValues = {"01", "02", "11", "22", "31", "41", "99"})
@Pattern(regexp = "01|02|11|22|31|41|42|99", message = "진행 상태 코드는 필수 입니다") @Pattern(regexp = "01|02|11|22|31|41|99", message = "진행 상태 코드는 필수 입니다")
private String prgrsSttsCd = "01"; private String prgrsSttsCd = "01";
@Schema(requiredMode = REQUIRED)
@Builder.Default
@Valid
List<DsuseMgtDtl> dsuseMgtDtls = new ArrayList<>();
@JsonIgnore
@Builder.Default
private String useYn = "Y";
@JsonIgnore
private String regDt;
@JsonIgnore
@Setter
private String rgtr;
@JsonIgnore
private String mdfcnDt;
@JsonIgnore
@Setter
private String mdfr;
} }
/** /**

@ -0,0 +1,235 @@
package cokr.xit.adds.biz.nims.model;
import cokr.xit.adds.inf.nims.model.NimsApiDto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* <pre>
* description :
*
* author : limju
* date : 2024-04-08
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-04-08 limju
*
* </pre>
*/
public class BizNimsResponse {
/**
* response
*/
@Schema(name = "DsuseMgtResponse", description = "폐기관리정보 조회 response DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@EqualsAndHashCode(callSuper = true)
public static class DsuseMgtResponse extends NimsApiDto.DsuseRptInfo {
private String dscdmngId;
private String userId;
/**
* <pre>
*
*
* 01-
* 02-
* 11-()
* 21-
* 22-
* 31-
* 41-
* 99-
* </pre>
*/
private String prgrsSttsCd = "01";
/**
* <pre>
*
* </pre>
*/
private String rprsntvNm;
/**
*
*/
private String prmisnNo;
}
// @Schema(name = "BizDsuseRptInfo", description = "폐기관리정보 DTO")
// @Data
// @NoArgsConstructor
// @AllArgsConstructor
// @SuperBuilder
// @EqualsAndHashCode(callSuper = false)
// public static class BizDsuseRptInfo extends AuditDto {
// /**
// * 사용자 보고 식별 번호
// */
// private String usrRptIdNo;
//
// /**
// * 참조 사용자 보고 식별 번호
// * 취소|변경시 필수 - 사용자 보고 식별 번호
// */
// private String refUsrRptIdNo;
//
// /**
// * 마약류취급자식별번호
// */
// private String bsshCd;
//
// /**
// * 마약류취급자명업체명
// */
// private String bsshNm;
//
// /**
// * 업종명
// */
// private String indutyNm;
//
// /**
// * 보고 유형 코드(0-신규,1-취소,2-변경)
// */
// private String rptTyCd;
//
// /**
// * 수불 상세 보고 수
// */
// private Integer rndDtlRptCnt;
//
// /**
// * 취급 일자
// */
// private String hdrDe;
//
// /**
// * 보고 일자
// */
// private String rptDe;
//
// /**
// * 폐기 구분 코드
// * 1-보건소폐기, 2-공무원임회, 4-도난/분실/재해 발생 사고마약류
// */
// private String dsuseSeCd;
//
// /**
// * 폐기 사유 코드
// * 01~05, 07~09, 12
// */
// private String dsusePrvCd;
//
// /**
// * 폐기 방법 코드
// * 1 ~ 9
// */
// private String dsuseMthCd;
//
// /**
// * 폐기 장소
// */
// private String dsuseLoc;
//
// /**
// * 폐기 일자
// */
// private String dsuseDe;
//
// /**
// * 처리 상태 코드(0-정상,1-취소,2-변경)
// */
// private String status;
//
// /**
// * FIXME: 속성명 확정 필요
// * 보고 진행 상태 코드(0-정상,1-취소,2-변경)
// */
// private String rptPrgSttsCd;
//
// /**
// * 원사용자보고식별번호
// */
// private String orgUsrRptIdNo;
//
// /**
// * 폐기보고상세 목록
// */
// private List<BizDsuseRptInfoDtl> dsuseRptInfoDtls = new ArrayList<>();
// }
//
// @Schema(name = "BizDsuseRptInfo", description = "폐기관리정보 DTO")
// @Data
// @NoArgsConstructor
// @AllArgsConstructor
// @SuperBuilder
// @EqualsAndHashCode(callSuper = false)
// public static class BizDsuseRptInfoDtl extends AuditDto {
// /**
// * 사용자 보고 식별 번호
// */
// private String usrRptIdNo;
//
// /**
// * 사용자 보고 라인 식별 번호
// */
// private String usrRptLnIdNo;
//
// /**
// * 제품 코드
// */
// private String prductCd;
//
// /**
// * 제품 명
// */
// private String prductNm;
//
// /**
// * 최소 유통 단위 수량
// */
// private Integer minDistbQy;
//
// /**
// * 낱개 단위 수량
// */
// private Integer pceQy;
//
// /**
// * 제조 번호
// */
// private String mnfNo;
//
// /**
// * 제품 유효기한 일자
// */
// private String prdValidDe;
//
// /**
// * 제조 일련번호
// */
// private String mnfSeq;
//
// /**
// * 이동 유형 코드
// * 1102: 재고차감, 1170: 재고미차감
// */
// private String mvmnTyCd;
//
// /**
// * 폐기 수량
// */
// private Integer dsuseQy;
// }
}

@ -6,7 +6,7 @@ import java.util.List;
import javax.validation.Valid; import javax.validation.Valid;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.SerializerProvider;
@ -48,73 +48,73 @@ public class NimsApiDto {
/** /**
* *
*/ */
@JsonProperty(value = "BSSH_CD", required = true) @JsonAlias("BSSH_CD")
private String bsshCd; private String bsshCd;
/** /**
* *
*/ */
@JsonProperty(value = "BSSH_NM", required = true) @JsonAlias(value = "BSSH_NM")
private String bsshNm; private String bsshNm;
/** /**
* *
*/ */
@JsonProperty(value = "INDUTY_NM", required = true) @JsonAlias("INDUTY_NM")
private String indutyNm; private String indutyNm;
/** /**
* *
*/ */
@JsonProperty(value = "HDNT_CD", required = true) @JsonAlias("HDNT_CD")
private String hdntCd; private String hdntCd;
/** /**
* *
*/ */
@JsonProperty(value = "HDNT_NM", required = true) @JsonAlias("HDNT_NM")
private String hdntNm; private String hdntNm;
/** /**
* *
*/ */
@JsonProperty(value = "BIZRNO", required = true) @JsonAlias("BIZRNO")
private String bizrno; private String bizrno;
/** /**
* *
*/ */
@JsonProperty(value = "RPRSNTV_NM", required = true) @JsonAlias("RPRSNTV_NM")
private String rprsntvNm; private String rprsntvNm;
/** /**
* *
*/ */
@JsonProperty(value = "CHRG_NM", required = true) @JsonAlias("CHRG_NM")
private String chrgNm; private String chrgNm;
/** /**
* *
*/ */
@JsonProperty(value = "HPTL_NO", required = true) @JsonAlias("HPTL_NO")
private String hptlNo; private String hptlNo;
/** /**
* || * ||
*/ */
@JsonProperty(value = "JOIN_YN", required = true) @JsonAlias("JOIN_YN")
private String joinYn; private String joinYn;
/** /**
* *
*/ */
@JsonProperty(value = "BSSH_STTUS_NM", required = true) @JsonAlias("BSSH_STTUS_NM")
private String bsshSttusNm; private String bsshSttusNm;
/** /**
* *
*/ */
@JsonProperty(value = "PRMISN_NO", required = true) @JsonAlias("PRMISN_NO")
private String prmisnNo; private String prmisnNo;
} }
@ -129,74 +129,74 @@ public class NimsApiDto {
/** /**
* *
*/ */
@JsonProperty(value = "PRDUCT_CD", required = true) @JsonAlias("PRDUCT_CD")
private String prductCd; private String prductCd;
/** /**
* *
*/ */
@JsonProperty(value = "PRDLST_MST_CD") @JsonAlias("PRDLST_MST_CD")
private String prdlstMstCd; private String prdlstMstCd;
/** /**
* *
*/ */
@JsonProperty(value = "PRDUCT_NM", required = true) @JsonAlias("PRDUCT_NM")
private String prductNm; private String prductNm;
/** /**
* / * /
*/ */
@JsonProperty(value = "NRCD_SE_NM", required = true) @JsonAlias("NRCD_SE_NM")
private String nrcdSeNm; private String nrcdSeNm;
/** /**
* / * /
*/ */
@JsonProperty(value = "PRTM_SE_NM", required = true) @JsonAlias("PRTM_SE_NM")
private String prtmSeNm; private String prtmSeNm;
/** /**
* *
* ( = 1) * ( = 1)
*/ */
@JsonProperty(value = "PRD_MIN_DISTB_QY", required = true) @JsonAlias("PRD_MIN_DISTB_QY")
private Integer prdMinDistbQy; private Integer prdMinDistbQy;
/** /**
* *
*/ */
@JsonProperty(value = "STD_PACKNG_STLE_NM", required = true) @JsonAlias("STD_PACKNG_STLE_NM")
private String stdPackngStleNm; private String stdPackngStleNm;
/** /**
* *
*/ */
@JsonProperty(value = "PRD_TOT_PCE_QY", required = true) @JsonAlias("PRD_TOT_PCE_QY")
private Integer prdTotPceQy; private Integer prdTotPceQy;
/** /**
* *
*/ */
@JsonProperty(value = "PCE_CO_UNIT_NM", required = true) @JsonAlias("PCE_CO_UNIT_NM")
private String pceCoUnitNm; private String pceCoUnitNm;
/** /**
* *
*/ */
@JsonProperty(value = "BSSH_CD", required = true) @JsonAlias("BSSH_CD")
private String bsshCd; private String bsshCd;
/** /**
* *
*/ */
@JsonProperty(value = "RGS_DT") @JsonAlias("RGS_DT")
private String rgsDt; private String rgsDt;
/** /**
* *
*/ */
@JsonProperty(value = "UPD_DT") @JsonAlias("UPD_DT")
private String updDt; private String updDt;
} }
@ -213,108 +213,107 @@ public class NimsApiDto {
/** /**
* *
*/ */
@JsonProperty(value = "USR_RPT_ID_NO", required = true) @JsonAlias("USR_RPT_ID_NO")
private String usrRptIdNo; private String usrRptIdNo;
/** /**
* *
* | - * | -
*/ */
@JsonProperty(value = "REF_USR_RPT_ID_NO") @JsonAlias("REF_USR_RPT_ID_NO")
private String refUsrRptIdNo; private String refUsrRptIdNo;
/** /**
* *
*/ */
@JsonProperty(value = "BSSH_CD", required = true) @JsonAlias("BSSH_CD")
private String bsshCd; private String bsshCd;
/** /**
* *
*/ */
@JsonProperty(value = "BSSH_NM", required = true) @JsonAlias("BSSH_NM")
private String bsshNm; private String bsshNm;
/** /**
* *
*/ */
@JsonProperty(value = "INDUTY_NM", required = true) @JsonAlias("INDUTY_NM")
private String indutyNm; private String indutyNm;
/** /**
* (0-,1-,2-) * (0-,1-,2-)
*/ */
@JsonProperty(value = "RPT_TY_CD", required = true) @JsonAlias("RPT_TY_CD")
private String rptTyCd; private String rptTyCd;
/** /**
* *
*/ */
@JsonProperty(value = "RND_DTL_RPT_CNT", required = true) @JsonAlias("RND_DTL_RPT_CNT")
private Integer rndDtlRptCnt; private Integer rndDtlRptCnt;
/** /**
* *
*/ */
@JsonProperty(value = "HDR_DE", required = true) @JsonAlias("HDR_DE")
private String hdrDe; private String hdrDe;
/** /**
* *
*/ */
@JsonProperty(value = "RPT_DE", required = true) @JsonAlias("RPT_DE")
private String rptDe; private String rptDe;
/** /**
* *
* 1-, 2-, 4-// * 1-, 2-, 4-//
*/ */
@JsonProperty(value = "DSUSE_SE_CD", required = true) @JsonAlias("DSUSE_SE_CD")
private String dsuseSeCd; private String dsuseSeCd;
/** /**
* *
* 01~05, 07~09, 12 * 01~05, 07~09, 12
*/ */
@JsonProperty(value = "DSUSE_PRV_CD", required = true) @JsonAlias("DSUSE_PRV_CD")
private String dsusePrvCd; private String dsusePrvCd;
/** /**
* *
* 1 ~ 9 * 1 ~ 9
*/ */
@JsonProperty(value = "DSUSE_MTH_CD", required = true) @JsonAlias("DSUSE_MTH_CD")
private String dsuseMthCd; private String dsuseMthCd;
/** /**
* *
*/ */
@JsonProperty(value = "DSUSE_LOC", required = true) @JsonAlias("DSUSE_LOC")
private String dsuseLoc; private String dsuseLoc;
/** /**
* *
*/ */
@JsonProperty(value = "DSUSE_DE", required = true) @JsonAlias("DSUSE_DE")
private String dsuseDe; private String dsuseDe;
/** /**
* (0-,1-,2-) * (0-,1-,2-)
*/ */
@JsonProperty(value = "STATUS", required = true) @JsonAlias("STATUS")
private String status; private String status;
/** /**
* FIXME: * FIXME:
* (0-,1-,2-) * (0-,1-,2-)
*/ */
@JsonProperty(value = "RPT_PRG_STTS_CD", required = true) @JsonAlias("RPT_PRG_STTS_CD")
private String rptPrgSttsCd; private String rptPrgSttsCd;
/** /**
* *
*/ */
//@JsonProperty(value = "USR_RPT_ID_NO", required = true)
private String orgUsrRptIdNo; private String orgUsrRptIdNo;
/** /**
@ -334,68 +333,68 @@ public class NimsApiDto {
/** /**
* *
*/ */
@JsonProperty(value = "USR_RPT_ID_NO", required = true) @JsonAlias("USR_RPT_ID_NO")
private String usrRptIdNo; private String usrRptIdNo;
/** /**
* *
*/ */
@JsonProperty(value = "USR_RPT_LN_ID_NO", required = true) @JsonAlias("USR_RPT_LN_ID_NO")
private String usrRptLnIdNo; private String usrRptLnIdNo;
/** /**
* *
*/ */
@JsonProperty(value = "PRDUCT_CD", required = true) @JsonAlias("PRDUCT_CD")
private String prductCd; private String prductCd;
/** /**
* *
*/ */
@JsonProperty(value = "PRDCT_NM", required = true) @JsonAlias("PRDCT_NM")
private String prductNm; private String prductNm;
/** /**
* *
*/ */
@JsonProperty(value = "MIN_DISTB_QY", required = true) @JsonAlias("MIN_DISTB_QY")
private Integer minDistbQy; private Integer minDistbQy;
/** /**
* *
*/ */
@JsonProperty(value = "PCE_QY", required = true) @JsonAlias("PCE_QY")
private Integer pceQy; private Integer pceQy;
/** /**
* *
*/ */
@JsonProperty(value = "MNF_NO", required = true) @JsonAlias("MNF_NO")
private String mnfNo; private String mnfNo;
/** /**
* *
*/ */
@JsonProperty(value = "PRD_VALID_DE", required = true) @JsonAlias("PRD_VALID_DE")
private String prdValidDe; private String prdValidDe;
/** /**
* *
*/ */
@JsonProperty(value = "MNF_SEQ") @JsonAlias("MNF_SEQ")
private String mnfSeq; private String mnfSeq;
/** /**
* *
* 1102: , 1170: * 1102: , 1170:
*/ */
@JsonProperty(value = "MVMN_TY_CD", required = true) @JsonAlias("MVMN_TY_CD")
private String mvmnTyCd; private String mvmnTyCd;
/** /**
* *
*/ */
@JsonProperty(value = "DSUSE_QY", required = true) @JsonAlias("DSUSE_QY")
private Integer dsuseQy; private Integer dsuseQy;
} }
@ -411,31 +410,31 @@ public class NimsApiDto {
/** /**
* *
*/ */
@JsonProperty(value = "PRDUCT_CD", required = true) @JsonAlias("PRDUCT_CD")
private String prductCd; private String prductCd;
/** /**
* *
*/ */
@JsonProperty(value = "PRDUCT_NM", required = true) @JsonAlias("PRDUCT_NM")
private String prductNm; private String prductNm;
/** /**
* *
*/ */
@JsonProperty(value = "MNF_NO", required = true) @JsonAlias("MNF_NO")
private String mnfNo; private String mnfNo;
/** /**
* *
*/ */
@JsonProperty(value = "MNF_SEQ", required = true) @JsonAlias("MNF_SEQ")
private String mnfSeq; private String mnfSeq;
/** /**
* *
*/ */
@JsonProperty(value = "PRD_VALID_DE", required = true) @JsonAlias("PRD_VALID_DE")
private String prdValidDe; private String prdValidDe;
} }
@ -450,37 +449,37 @@ public class NimsApiDto {
/** /**
* *
*/ */
@JsonProperty(value = "OF_CD", required = true) @JsonAlias("OF_CD")
private String ofCd; private String ofCd;
/** /**
* *
*/ */
@JsonProperty(value = "OF_NM", required = true) @JsonAlias("OF_NM")
private String ofNm; private String ofNm;
/** /**
* *
*/ */
@JsonProperty(value = "UP_OF_NM", required = true) @JsonAlias("UP_OF_NM")
private String upOfNm; private String upOfNm;
/** /**
* *
*/ */
@JsonProperty(value = "TOP_OF_NM", required = true) @JsonAlias("TOP_OF_NM")
private String topOfNm; private String topOfNm;
/** /**
* *
*/ */
@JsonProperty(value = "BASS_ADRES", required = true) @JsonAlias("BASS_ADRES")
private String bassAdres; private String bassAdres;
/** /**
* *
*/ */
@JsonProperty(value = "BASS_DTL_ADRES", required = true) @JsonAlias("BASS_DTL_ADRES")
private String bassDtlAdres; private String bassDtlAdres;
} }
@ -495,49 +494,49 @@ public class NimsApiDto {
/** /**
* *
*/ */
@JsonProperty(value = "BSSH_CD", required = true) @JsonAlias("BSSH_CD")
private String bsshCd; private String bsshCd;
/** /**
* *
*/ */
@JsonProperty(value = "BSSH_NM", required = true) @JsonAlias("BSSH_NM")
private String bsshNm; private String bsshNm;
/** /**
* *
*/ */
@JsonProperty(value = "STORGE_NO", required = true) @JsonAlias("STORGE_NO")
private String storgeNo; private String storgeNo;
/** /**
* *
*/ */
@JsonProperty(value = "STORGE_NM", required = true) @JsonAlias("STORGE_NM")
private String storgeNm; private String storgeNm;
/** /**
* *
*/ */
@JsonProperty(value = "STORGE_SE_NM", required = true) @JsonAlias("STORGE_SE_NM")
private String storgeSeNm; private String storgeSeNm;
/** /**
* *
*/ */
@JsonProperty(value = "BASS_ADRES", required = true) @JsonAlias("BASS_ADRES")
private String bassAdres; private String bassAdres;
/** /**
* *
*/ */
@JsonProperty(value = "BASS_DTL_ADRES", required = true) @JsonAlias("BASS_DTL_ADRES")
private String bassDtlAdres; private String bassDtlAdres;
/** /**
* *
*/ */
@JsonProperty(value = "USE_AT", required = true) @JsonAlias("USE_AT")
private String useAt; private String useAt;
} }

@ -1,19 +1,17 @@
package cokr.xit.adds.inf.nims.model; package cokr.xit.adds.inf.nims.model;
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.*;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import cokr.xit.adds.core.model.ResultCode; import cokr.xit.adds.core.model.ResultCode;
import cokr.xit.adds.core.spring.exception.ApiCustomException; import cokr.xit.adds.core.spring.exception.ApiCustomException;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Getter; import lombok.Getter;
@ -35,14 +33,14 @@ import lombok.Setter;
* *
* </pre> * </pre>
*/ */
@Schema(name = "NimsApiResult", description = "마약류 관리 시스템 API response")
@Getter @Getter
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
public class NimsApiResult<T> { public class NimsApiResult<T> {
@Schema(description = "response", requiredMode = REQUIRED) /**
@JsonProperty(value = "response", required = true) * Nims API call (ROOT)
*/
private Response<T> response; private Response<T> response;
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@ -52,12 +50,14 @@ public class NimsApiResult<T> {
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
public static class Response<T> { public static class Response<T> {
@Schema(description = "header", requiredMode = REQUIRED) /**
@JsonProperty(value = "header", required = true) * API call
*/
private Header header; private Header header;
@Schema(description = "body", requiredMode = REQUIRED) /**
@JsonProperty(value = "body", required = true) * API call
*/
private Body<T> body; private Body<T> body;
/** /**
@ -105,11 +105,13 @@ public class NimsApiResult<T> {
* *
* 0 : , 1:, 8:, 9: * 0 : , 1:, 8:, 9:
*/ */
@Schema(description = "결과 코드: 0-성공, 1-실패, 8-인증완료, 9-인증실패", requiredMode = REQUIRED) @JsonAlias({"RESULT_CODE", "resultCd"})
@JsonProperty(value = "RESULT_CODE", required = true)
private Integer resultCd; private Integer resultCd;
@Schema(description = "결과메세지", requiredMode = REQUIRED)
@JsonProperty(value = "RESULT_MSG", required = true) /**
*
*/
@JsonAlias({"RESULT_MSG", "resultMsg"})
private String resultMsg; private String resultMsg;
} }
@ -120,23 +122,28 @@ public class NimsApiResult<T> {
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
public static class Body<T>{ public static class Body<T>{
@Schema(description = "결과 건수", requiredMode = REQUIRED) /**
@JsonProperty(value = "TOTAL_COUNT", required = true) *
*/
@JsonAlias("TOTAL_COUNT")
private Integer totalCount; private Integer totalCount;
/** /**
* *
* Y: , N : * Y: , N :
*/ */
@Schema(description = "마지막데이타 여부: Y-마지막 데이타, N-아님", requiredMode = REQUIRED) @JsonAlias(value = {"IS_END_YN", "isEndYn"})
@JsonProperty(value = "IS_END_YN", required = true)
private String isEndYn; private String isEndYn;
@Schema(description = "전체 데이타 건수", requiredMode = REQUIRED) /**
*
*/
@JsonProperty(value = "nRecord", required = true) @JsonProperty(value = "nRecord", required = true)
private Integer nRecord; private Integer nRecord;
@Schema(description = "요청 데이타 목록") /**
@JsonProperty(value = "list") *
*/
private List<T> list; private List<T> list;
} }
} }

Loading…
Cancel
Save