|
|
@ -296,11 +296,11 @@ public class KkoTalkService {
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Transactional
|
|
|
|
@Transactional
|
|
|
|
public EnsResponseVO<?> tokenVerify(String orgCd, String envelopId, String token, String externalId) {
|
|
|
|
public EnsResponseVO<?> tokenVerify(String orgCd, String envelopeId, String token, String externalId) {
|
|
|
|
EnsResponseVO responseVO = null;
|
|
|
|
EnsResponseVO responseVO = null;
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (CmmnUtil.isEmpty(envelopId))
|
|
|
|
if (CmmnUtil.isEmpty(envelopeId))
|
|
|
|
throw new EnsException(EnsErrCd.ERR401, "문서식별번호(은)는 필수조건 입니다.");
|
|
|
|
throw new EnsException(EnsErrCd.ERR401, "문서식별번호(은)는 필수조건 입니다.");
|
|
|
|
if (CmmnUtil.isEmpty(token))
|
|
|
|
if (CmmnUtil.isEmpty(token))
|
|
|
|
throw new EnsException(EnsErrCd.ERR401, "토큰(은)는 필수조건 입니다.");
|
|
|
|
throw new EnsException(EnsErrCd.ERR401, "토큰(은)는 필수조건 입니다.");
|
|
|
@ -310,7 +310,7 @@ public class KkoTalkService {
|
|
|
|
ResponseEntity<String> resp = kkoTalkApi.validToken(
|
|
|
|
ResponseEntity<String> resp = kkoTalkApi.validToken(
|
|
|
|
orgMng,
|
|
|
|
orgMng,
|
|
|
|
KkotalkApiDTO.ValidTokenRequest.builder()
|
|
|
|
KkotalkApiDTO.ValidTokenRequest.builder()
|
|
|
|
.envelopeId(envelopId)
|
|
|
|
.envelopeId(envelopeId)
|
|
|
|
.token(token)
|
|
|
|
.token(token)
|
|
|
|
.build()
|
|
|
|
.build()
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -358,21 +358,19 @@ public class KkoTalkService {
|
|
|
|
Map<String, Object> resultInfo = (Map<String, Object>) responseVO.getResultInfo();
|
|
|
|
Map<String, Object> resultInfo = (Map<String, Object>) responseVO.getResultInfo();
|
|
|
|
// FIXME: 카카오톡 적용 확인 필요??
|
|
|
|
// FIXME: 카카오톡 적용 확인 필요??
|
|
|
|
sendDetailKkoTalkTokenHistRepository.save(SendDetailKkoTalkTokenHist.builder()
|
|
|
|
sendDetailKkoTalkTokenHistRepository.save(SendDetailKkoTalkTokenHist.builder()
|
|
|
|
.envelopeId(envelopId)
|
|
|
|
.envelopeId(envelopeId)
|
|
|
|
.envelopeId(externalId)
|
|
|
|
.externalId(externalId)
|
|
|
|
.token(token)
|
|
|
|
.token(token)
|
|
|
|
.tokenStatus((String) resultInfo.get("status"))
|
|
|
|
.tokenStatus((String) resultInfo.get("status"))
|
|
|
|
//.tokenUsedAt((String) resultInfo.get("used_at"))
|
|
|
|
|
|
|
|
.sentAt((String) resultInfo.get("sentAt"))
|
|
|
|
.sentAt((String) resultInfo.get("sentAt"))
|
|
|
|
.receivedAt((String) resultInfo.get("receivedAt"))
|
|
|
|
.receivedAt((String) resultInfo.get("receivedAt"))
|
|
|
|
.authenticatedAt((String) resultInfo.get("authenticatedAt"))
|
|
|
|
.authenticatedAt((String) resultInfo.get("authenticatedAt"))
|
|
|
|
.userNotifiedAt((String) resultInfo.get("userNotifiedAt"))
|
|
|
|
.userNotifiedAt((String) resultInfo.get("userNotifiedAt"))
|
|
|
|
.payload((String) resultInfo.get("payload"))
|
|
|
|
.payload((String) resultInfo.get("payload"))
|
|
|
|
//.signedAt((String) resultInfo.get("signed_at"))
|
|
|
|
|
|
|
|
.build());
|
|
|
|
.build());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
sendDetailKkoTalkTokenHistRepository.save(SendDetailKkoTalkTokenHist.builder()
|
|
|
|
sendDetailKkoTalkTokenHistRepository.save(SendDetailKkoTalkTokenHist.builder()
|
|
|
|
.envelopeId(envelopId)
|
|
|
|
.envelopeId(envelopeId)
|
|
|
|
.externalId(externalId)
|
|
|
|
.externalId(externalId)
|
|
|
|
.token(token)
|
|
|
|
.token(token)
|
|
|
|
.error(FieldError.initBuilder()
|
|
|
|
.error(FieldError.initBuilder()
|
|
|
|