/*
package cokr.xit.ens.modules.kkomydoc.service.event;

import cokr.xit.ens.modules.kkomydoc.service.support.KkoMydocRsltFetcher;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.transaction.event.TransactionPhase;
import org.springframework.transaction.event.TransactionalEventListener;

@Slf4j
@Component
@RequiredArgsConstructor
public class KkoMydocSentEventListener {
    private final KkoMydocRsltFetcher kkoMydocRsltFetcher;


    @Async
    @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
    public void kkoMydocSent(KkoMydocSentEvent event) {
        StringBuffer sb = new StringBuffer();
        sb.append("\n=======================================================")
                .append("\n[ENS] 카카오 내문서함(인증톡) 전송 후 상태갱신")
                .append("\n요청ID: " + event.getSendMastId())
                .append("\n상태갱신 결과: " + kkoMydocRsltFetcher.execute(event.getSendMastId()).toString())
                .append("\n=======================================================");
        log.info(sb.toString());
    }
}
*/
