이지우 - 대체문자 처리 스케줄러 추가
This commit is contained in:
parent
ff935b0775
commit
fa55935029
@ -93,6 +93,7 @@ public class MjonMsgVO extends ComDefaultVO{
|
|||||||
private String reserveYn ; //예약문자 여부
|
private String reserveYn ; //예약문자 여부
|
||||||
private String reserveCYn ; //예약문자 취소 여부
|
private String reserveCYn ; //예약문자 취소 여부
|
||||||
private String cancelDate; //예약 취소 일자
|
private String cancelDate; //예약 취소 일자
|
||||||
|
private String msgResult; //문자 발송결과 10:성공 20:실패 30:대체문자 대기 40:대체문자 성공 50:대체문자 실패
|
||||||
|
|
||||||
|
|
||||||
private String sendRate; // 전송 배분률
|
private String sendRate; // 전송 배분률
|
||||||
@ -313,5 +314,8 @@ public class MjonMsgVO extends ComDefaultVO{
|
|||||||
private String detailType;
|
private String detailType;
|
||||||
|
|
||||||
private List<MjonMsgSendVO> mjonMsgSendVOList = new ArrayList<>();
|
private List<MjonMsgSendVO> mjonMsgSendVOList = new ArrayList<>();
|
||||||
|
|
||||||
|
private String cmId; //다우기술 cmId
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -463,6 +463,23 @@ public class MjonMsgDataDAO extends EgovAbstractDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//대체문자 대기 목록 조회
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<MjonMsgVO> selectBizResendLogList()throws Exception{
|
||||||
|
|
||||||
|
return (List<MjonMsgVO>) list("mjonMsgDataDAO.selectBizResendLogList");
|
||||||
|
}
|
||||||
|
//대체문자 결과 반영
|
||||||
|
public int updateResendResult(MjonMsgVO mjonMsgVO)throws Exception{
|
||||||
|
|
||||||
|
return update("MjonMsgDataDAO.updateResendResult", mjonMsgVO);
|
||||||
|
}
|
||||||
|
//대체문자 로그 삭제
|
||||||
|
public int deleteBizResendLog(MjonMsgVO mjonMsgVO)throws Exception{
|
||||||
|
|
||||||
|
return delete("MjonMsgDataDAO.deleteBizResendLog", mjonMsgVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public Timestamp convertToTimestamp(String reqDate) {
|
public Timestamp convertToTimestamp(String reqDate) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -54,4 +54,7 @@ public interface SchdlrManageService {
|
|||||||
public void payBack(String type, int limitCout) throws Exception;
|
public void payBack(String type, int limitCout) throws Exception;
|
||||||
|
|
||||||
public void payBack_advc(String p_type) throws Exception;
|
public void payBack_advc(String p_type) throws Exception;
|
||||||
|
|
||||||
|
//대체문자 결과 반영 배치
|
||||||
|
public void updateKakaoResendResult() throws Exception;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -479,6 +479,22 @@ public class SchedulerUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//대체문자 결과 반영
|
||||||
|
@Scheduled(cron = "0 0/2 * * * ?") // 2분마다 실행
|
||||||
|
@SchedulerLock(name = "updateKakaoResendResult", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN)
|
||||||
|
public void runUpdateKakaoResendResult() throws Exception {
|
||||||
|
|
||||||
|
try {
|
||||||
|
System.out.println("=============SchedulerUtil=====runKakaoResendUpdate =============>");
|
||||||
|
schdlrManageService.updateKakaoResendResult();
|
||||||
|
}catch(Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//환불 실행
|
//환불 실행
|
||||||
private void PayBack(String p_type) throws Exception {
|
private void PayBack(String p_type) throws Exception {
|
||||||
|
|
||||||
|
|||||||
@ -566,4 +566,35 @@ public class SchdlrManageServiceImpl extends EgovAbstractServiceImpl implements
|
|||||||
|
|
||||||
return msgFailList;
|
return msgFailList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @methodName : updateKakaoResendResult
|
||||||
|
* @author : 이지우
|
||||||
|
* @date : 2025.07.15
|
||||||
|
* @description : 대체문자 결과 반영
|
||||||
|
* @param p_type
|
||||||
|
* @param request
|
||||||
|
* @param model
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void updateKakaoResendResult() throws Exception {
|
||||||
|
|
||||||
|
// 대체문자 대상 조회
|
||||||
|
List<MjonMsgVO> resendLogList = mjonMsgDataDAO.selectBizResendLogList();
|
||||||
|
for(MjonMsgVO vo : resendLogList) {
|
||||||
|
if("4100".equals(vo.getResultCode())
|
||||||
|
|| "6600".equals(vo.getResultCode())
|
||||||
|
|| "7000".equals(vo.getResultCode())) {
|
||||||
|
vo.setMsgResult("40");
|
||||||
|
}else {
|
||||||
|
vo.setMsgResult("50");
|
||||||
|
}
|
||||||
|
mjonMsgDataDAO.updateResendResult(vo);
|
||||||
|
mjonMsgDataDAO.deleteBizResendLog(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8244,5 +8244,35 @@
|
|||||||
|
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="mjonMsgDAO.selectBizResendLogList" resultClass="mjonMsgVO">
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
BRLA.CMID AS cmId,
|
||||||
|
BRLA.CALL_STATUS AS resultCode,
|
||||||
|
BRLB.USER_KEY AS userData
|
||||||
|
FROM
|
||||||
|
BIZ_RESEND_LOG BRLA
|
||||||
|
JOIN
|
||||||
|
BIZ_RESEND_LOG BRLB
|
||||||
|
ON BRLB.UMID = BRLA.CMID
|
||||||
|
WHERE (BRLA.UMID = '' OR BRLA.UMID IS NULL);
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="mjonMsgDAO.updateResendResult" parameterClass="mjonMsgVO" >
|
||||||
|
|
||||||
|
UPDATE MJ_MSG_DATA
|
||||||
|
SET MSG_RESULT = #msgResult#
|
||||||
|
WHERE USERDATA = #userData#
|
||||||
|
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="mjonMsgDAO.deleteBizResendLog" parameterClass="mjonMsgVO" >
|
||||||
|
|
||||||
|
DELETE FROM BIZ_RESEND_LOG
|
||||||
|
WHERE CMID = #cmId# OR UMID = #cmId#
|
||||||
|
|
||||||
|
</delete>
|
||||||
|
|
||||||
</sqlMap>
|
</sqlMap>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user