feat: 카카오톡 반영

main
Jonguk. Lim 2 months ago
parent 062b5fd06a
commit 1c53ef9622

@ -1,22 +1,28 @@
package cokr.xit.ens.core.model; package cokr.xit.ens.core.model;
import cokr.xit.ens.modules.common.ctgy.intgrnbill.support.code.BillSeCd; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
import cokr.xit.ens.modules.common.ctgy.intgrnbill.support.code.BillSeCd;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Builder @Builder
@Getter @Getter
@Setter @Setter
@Schema(name = "EnsBillAcptReqDTO") @Schema(name = "EnsBillAcptReqDTO")
@NoArgsConstructor
@AllArgsConstructor
public class EnsBillAcptReqDTO { public class EnsBillAcptReqDTO {
// @NotNull(message = "청구서ID 사용 여부는 필수 입력값 입니다.") // @NotNull(message = "청구서ID 사용 여부는 필수 입력값 입니다.")
@ -24,14 +30,14 @@ public class EnsBillAcptReqDTO {
// private Boolean use_bill_uid; // private Boolean use_bill_uid;
@Schema(hidden = true, required = false, title = "청구서 유니크ID", example = " ") @Schema(hidden = true, required = false, title = "청구서 유니크ID", example = " ")
@JsonProperty("billUid") @JsonProperty("billUid")
@JsonAlias({"bill_uid"}) @JsonAlias({"bill_uid"})
@SerializedName(value = "billUid", alternate = {"bill_uid"}) @SerializedName(value = "billUid", alternate = {"bill_uid"})
private String billUid; private String billUid;
@NotNull(message = "청구서 타입은 필수 입력값 입니다.") @NotNull(message = "청구서 타입은 필수 입력값 입니다.")
@Schema(required = true, title = "청구서 타입", example = "all") @Schema(required = true, title = "청구서 타입", example = "all")
@JsonProperty("billSe") @JsonProperty("billSe")
@JsonAlias({"bill_se"}) @JsonAlias({"bill_se"})
@SerializedName(value = "billSe", alternate = {"bill_se"}) @SerializedName(value = "billSe", alternate = {"bill_se"})
private BillSeCd billSe; private BillSeCd billSe;
@ -39,9 +45,9 @@ public class EnsBillAcptReqDTO {
@NotBlank(message = "빌러유저키는 필수 입력값 입니다.") @NotBlank(message = "빌러유저키는 필수 입력값 입니다.")
@Length(max = 40, message = "빌러유저키의 최대 길이를 초과 했습니다.") @Length(max = 40, message = "빌러유저키의 최대 길이를 초과 했습니다.")
@Schema(required = true, title = "기관에서 관리하는 해당 고객번호 혹은 계약번호", example = " ") @Schema(required = true, title = "기관에서 관리하는 해당 고객번호 혹은 계약번호", example = " ")
@JsonProperty("billerUserKey") @JsonProperty("billerUserKey")
@JsonAlias({"biller_user_key"}) @JsonAlias({"biller_user_key"})
@SerializedName(value = "billerUserKey", alternate = {"biller_user_key"}) @SerializedName(value = "billerUserKey", alternate = {"biller_user_key"})
private String billerUserKey; private String billerUserKey;

@ -131,20 +131,20 @@ public class IntgrnNotiAcceptor implements EnsPhaseProcSupport<EnsResponseVO, In
if (!CmmnUtil.isEmpty(document.getAcpt_data().getKko_talk())) { if (!CmmnUtil.isEmpty(document.getAcpt_data().getKko_talk())) {
if (!CmmnUtil.isEmpty(document.getAcpt_data().getKko_talk().getReadExpiresAt())) { if (!CmmnUtil.isEmpty(document.getAcpt_data().getKko_talk().getReadExpiresAt())) {
if(document.getAcpt_data().getKko_talk().getReviewExpiresAt().compareTo(document.getAcpt_data().getKko_talk().getReadExpiresAt()) < 0){ if(document.getAcpt_data().getKko_talk().getReviewExpiresAt().compareTo(document.getAcpt_data().getKko_talk().getReadExpiresAt()) < 0){
result.add(String.format("재열람 만료일시가 최초 열람 만료일시 보다 느립니다. [ document[%d].acpt_data.kko_talk.review_expires_at ]", i.get())); result.add(String.format("재열람 만료일시가 최초 열람 만료일시 보다 느립니다. [ document[%d].acpt_data.kko_talk.reviewExpiresAt ]", i.get()));
} }
} }
if (!CmmnUtil.isEmpty(document.getAcpt_data().getKko_talk().getReadExpiresAt())) { if (!CmmnUtil.isEmpty(document.getAcpt_data().getKko_talk().getReadExpiresAt())) {
String expDate = DateUtil.getTimeOfTimeT(document.getAcpt_data().getKko_talk().getReadExpiresAt(), "yyyyMMddHHmmss"); String expDate = DateUtil.getTimeOfTimeT(document.getAcpt_data().getKko_talk().getReadExpiresAt(), "yyyyMMddHHmmss");
int sec = DateUtil.secByFromBetweenTo(DateUtil.toLocalDateTime(expDate), DateUtil.toLocalDateTime(reqDTO.getClose_dt())); int sec = DateUtil.secByFromBetweenTo(DateUtil.toLocalDateTime(expDate), DateUtil.toLocalDateTime(reqDTO.getClose_dt()));
if (sec < 0) if (sec < 0)
result.add(String.format("마감일시보다 \"최초열람마감시간\"이 느립니다. [ document[%d].acpt_data.kko_talk.read_expires_at ]", i.get())); result.add(String.format("마감일시보다 \"최초열람마감시간\"이 느립니다. [ document[%d].acpt_data.kko_talk.readExpiresAt ]", i.get()));
} }
if (!CmmnUtil.isEmpty(document.getAcpt_data().getKko_talk().getReviewExpiresAt())) { if (!CmmnUtil.isEmpty(document.getAcpt_data().getKko_talk().getReviewExpiresAt())) {
String expDate = DateUtil.getTimeOfTimeT(document.getAcpt_data().getKko_talk().getReviewExpiresAt(), "yyyyMMddHHmmss"); String expDate = DateUtil.getTimeOfTimeT(document.getAcpt_data().getKko_talk().getReviewExpiresAt(), "yyyyMMddHHmmss");
int sec = DateUtil.secByFromBetweenTo(DateUtil.toLocalDateTime(expDate), DateUtil.toLocalDateTime(reqDTO.getClose_dt())); int sec = DateUtil.secByFromBetweenTo(DateUtil.toLocalDateTime(expDate), DateUtil.toLocalDateTime(reqDTO.getClose_dt()));
if (sec < 0) if (sec < 0)
result.add(String.format("마감일시보다 \"재열람마감시간\"이 느립니다. [ document[%d].acpt_data.kko_talk.review_expires_at ]", i.get())); result.add(String.format("마감일시보다 \"재열람마감시간\"이 느립니다. [ document[%d].acpt_data.kko_talk.reviewExpiresAt ]", i.get()));
} }
} }

@ -116,6 +116,7 @@ public class KkotalkDTO extends KkotalkApiDTO {
@Data @Data
@Schema(name = "KkoTalkAcceptReqDTO") @Schema(name = "KkoTalkAcceptReqDTO")
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public static class KkoTalkAcceptReqDTO extends EnsAcceptReqDTO { public static class KkoTalkAcceptReqDTO extends EnsAcceptReqDTO {
@ -127,6 +128,7 @@ public class KkotalkDTO extends KkotalkApiDTO {
@Data @Data
@Schema(name = "SendDetailKkoTalkDTO") @Schema(name = "SendDetailKkoTalkDTO")
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public static class SendDetailKkoTalkDTO extends Envelope { public static class SendDetailKkoTalkDTO extends Envelope {
private String envelopeId; private String envelopeId;

@ -119,13 +119,13 @@ public class KkoTalkAcceptor implements EnsPhaseProcSupport<EnsResponseVO<?>, Kk
String expDate = DateUtil.getTimeOfTimeT(document.getReadExpiresAt(), "yyyyMMddHHmmss"); String expDate = DateUtil.getTimeOfTimeT(document.getReadExpiresAt(), "yyyyMMddHHmmss");
int sec = DateUtil.secByFromBetweenTo(DateUtil.toLocalDateTime(expDate), DateUtil.toLocalDateTime(reqDTO.getClose_dt())); int sec = DateUtil.secByFromBetweenTo(DateUtil.toLocalDateTime(expDate), DateUtil.toLocalDateTime(reqDTO.getClose_dt()));
if (sec < 0) if (sec < 0)
result.add(String.format("마감일시보다 \"처리마감시간\"이 느립니다. [ document[%d].acpt_data.kko_talk.read_expires_at ]", i.get())); result.add(String.format("마감일시보다 \"최초열람 마감시간\"이 느립니다. [ document[%d].acpt_data.kko_talk.readExpiresAt ]", i.get()));
} }
if (!CmmnUtil.isEmpty(document.getReviewExpiresAt())) { if (!CmmnUtil.isEmpty(document.getReviewExpiresAt())) {
String expDate = DateUtil.getTimeOfTimeT(document.getReviewExpiresAt(), "yyyyMMddHHmmss"); String expDate = DateUtil.getTimeOfTimeT(document.getReviewExpiresAt(), "yyyyMMddHHmmss");
int sec = DateUtil.secByFromBetweenTo(DateUtil.toLocalDateTime(expDate), DateUtil.toLocalDateTime(reqDTO.getClose_dt())); int sec = DateUtil.secByFromBetweenTo(DateUtil.toLocalDateTime(expDate), DateUtil.toLocalDateTime(reqDTO.getClose_dt()));
if (sec < 0) if (sec < 0)
result.add(String.format("마감일시보다 \"처리마감시간\"이 느립니다. [ document[%d].acpt_data.kko_talk.read_expires_at ]", i.get())); result.add(String.format("마감일시보다 \"재열람 만료일시\"가 느립니다. [ document[%d].acpt_data.kko_talk.readExpiresAt ]", i.get()));
} }
} }
i.getAndIncrement(); i.getAndIncrement();

@ -37,7 +37,7 @@
#{payload}, #{payload},
#{readExpiresAt}, #{readExpiresAt},
#{reviewExpiresAt}, #{reviewExpiresAt},
#{useNonPersonalizedNoti}, #{useNonPersonalizedNotification},
#{ci}, #{ci},
#{phoneNumber}, #{phoneNumber},
#{name}, #{name},
@ -61,7 +61,7 @@
payload, payload,
read_expires_at, read_expires_at,
review_expires_at, review_expires_at,
use_non_personalized_noti, use_non_personalized_noti AS useNonPersonalizedNotification,
ci, ci,
phone_number, phone_number,
name, name,

Loading…
Cancel
Save