feat: 카카오톡 추가 반영 - send, status

- 다건발생결과 목록 key fix : envelopeIds > envelopes
main
Jonguk. Lim 2 months ago
parent 6dabc75a19
commit ba437e9254

@ -94,7 +94,7 @@ public class KkoTalkSender extends SendProcTemplate {
List<Map<String, Object>> envelopeIds = (List<Map<String, Object>>)((Map<String, Object>)mResponse.getResultInfo()).get(
"envelopeIds");
"envelopes");
Map<String, KkoTalkApiRespVO> mApiResp = envelopeIds.stream()
.map(this::toApiRespVOMap)
@ -316,8 +316,8 @@ public class KkoTalkSender extends SendProcTemplate {
if (EnsErrCd.OK.equals(respVO.getErrCode())) {
Map<String, Object> mRespBody = (Map<String, Object>)respVO.getResultInfo();
List<Map<String, String>> documents = (List<Map<String, String>>)mRespBody.get("envelopeIds");
Map<String, Map<String, String>> mRespMsg = documents.stream()
List<Map<String, String>> envelopeIds = (List<Map<String, String>>)mRespBody.get("envelopes");
Map<String, Map<String, String>> mRespMsg = envelopeIds.stream()
.map(row -> {
Map<String, Object> m = new HashMap<>();
m.put("key", String.valueOf(row.get("externalId")));
@ -403,8 +403,8 @@ public class KkoTalkSender extends SendProcTemplate {
Map<String, Object> mResp = null;
try {
mResp = gson.fromJson(respMsg, Map.class);
if (CmmnUtil.isEmpty(mResp.get("envelopeIds")))
throw new EnsException(EnsErrCd.SEND620, String.format("전송요청API 오류. envelopeIds 키값이 없습니다. %s", respMsg));
if (CmmnUtil.isEmpty(mResp.get("envelopes")))
throw new EnsException(EnsErrCd.SEND620, String.format("전송요청API 오류. envelopes 키값이 없습니다. %s", respMsg));
} catch (EnsException e) {
errCode = e.getErrCd();
errMsg = e.getMessage();

Loading…
Cancel
Save