|
|
|
@ -107,13 +107,22 @@ public class KkoTalkSender extends SendProcTemplate {
|
|
|
|
|
m -> (KkoTalkApiRespVO)m.get("value"), (k1, k2) -> k1));
|
|
|
|
|
|
|
|
|
|
list.stream()
|
|
|
|
|
.forEach(row -> this.modifyTalkSendRsltByExtDocUuid(row, mApiResp));
|
|
|
|
|
.forEach(row -> {
|
|
|
|
|
this.modifyTalkSendRsltByExtDocUuid(row, mApiResp);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
} catch (EnsException e) {
|
|
|
|
|
|
|
|
|
|
list.stream()
|
|
|
|
|
.forEach(row -> {
|
|
|
|
|
row.setStatus(KkoTalkStatusCd.SENT_FAIL);
|
|
|
|
|
row.setError(
|
|
|
|
|
FieldError.initBuilder()
|
|
|
|
|
.errorCode(e.getErrCd().getCode())
|
|
|
|
|
.errorMessage(e.getMessage())
|
|
|
|
|
.build()
|
|
|
|
|
);
|
|
|
|
|
row.setErrorCode(e.getErrCd().getCode());
|
|
|
|
|
row.setErrorMessage(e.getMessage());
|
|
|
|
|
});
|
|
|
|
@ -122,10 +131,20 @@ public class KkoTalkSender extends SendProcTemplate {
|
|
|
|
|
list.stream()
|
|
|
|
|
.forEach(row -> {
|
|
|
|
|
row.setStatus(KkoTalkStatusCd.SENT_FAIL);
|
|
|
|
|
row.setError(
|
|
|
|
|
FieldError.initBuilder()
|
|
|
|
|
.errorCode(EnsErrCd.SEND500.getCode())
|
|
|
|
|
.errorMessage(e.getMessage())
|
|
|
|
|
.build()
|
|
|
|
|
);
|
|
|
|
|
row.setErrorCode(EnsErrCd.SEND500.getCode());
|
|
|
|
|
row.setErrorMessage(e.getMessage());
|
|
|
|
|
});
|
|
|
|
|
} finally {
|
|
|
|
|
// FIXME: 카카오톡 추가 - 카카오톡 테이블 업데이트
|
|
|
|
|
list.stream()
|
|
|
|
|
.forEach(talkMapper::updateKakaotalkSendBulksResult);
|
|
|
|
|
|
|
|
|
|
if (!CmmnUtil.isEmpty(envelopes))
|
|
|
|
|
sendDetailKkoTalkReqHistRepository.saveAll(
|
|
|
|
|
this.toSendDetailReqHist(list, JsonUtils.toJson(envelopes), sendRespBody));
|
|
|
|
@ -139,7 +158,7 @@ public class KkoTalkSender extends SendProcTemplate {
|
|
|
|
|
if (cntSuccess.get() > 0)
|
|
|
|
|
respVO = EnsResponseVO.okBuilder()
|
|
|
|
|
.resultInfo(sendDetails.stream()
|
|
|
|
|
.map(row -> this.toResultInfo(row))
|
|
|
|
|
.map(this::toResultInfo)
|
|
|
|
|
.collect(Collectors.toList()))
|
|
|
|
|
.build();
|
|
|
|
|
else
|
|
|
|
@ -265,9 +284,13 @@ public class KkoTalkSender extends SendProcTemplate {
|
|
|
|
|
if (CmmnUtil.isEmpty(apiRespVO.getErrorCode())) {
|
|
|
|
|
row.setStatus(KkoTalkStatusCd.SENT);
|
|
|
|
|
row.setEnvelopeId(String.valueOf(apiRespVO.getData()));
|
|
|
|
|
//row.setErrorCode(FieldError.initBuilder().build());
|
|
|
|
|
row.setError(FieldError.initBuilder().build());
|
|
|
|
|
} else {
|
|
|
|
|
row.setStatus(KkoTalkStatusCd.valueOfEnum(apiRespVO.getErrorCode()));
|
|
|
|
|
row.setError(FieldError.initBuilder()
|
|
|
|
|
.errorCode(EnsErrCd.SEND630.getCode())
|
|
|
|
|
.errorMessage(String.format("%s %s", apiRespVO.getErrorCode(), apiRespVO.getErrorMessage()))
|
|
|
|
|
.build());
|
|
|
|
|
row.setErrorCode(EnsErrCd.SEND630.getCode());
|
|
|
|
|
row.setErrorMessage(String.format("%s %s", apiRespVO.getErrorCode(), apiRespVO.getErrorMessage()));
|
|
|
|
|
}
|
|
|
|
|