Merge branch '5361_알림톡_환불수정'
This commit is contained in:
commit
bbf5bf2d01
@ -93,6 +93,7 @@ public class MjonMsgVO extends ComDefaultVO{
|
||||
private String reserveYn ; //예약문자 여부
|
||||
private String reserveCYn ; //예약문자 취소 여부
|
||||
private String cancelDate; //예약 취소 일자
|
||||
private String msgResult; //문자 발송결과 10:성공 20:실패 30:대체문자 대기 40:대체문자 성공 50:대체문자 실패
|
||||
|
||||
|
||||
private String sendRate; // 전송 배분률
|
||||
@ -316,5 +317,8 @@ public class MjonMsgVO extends ComDefaultVO{
|
||||
private String detailType;
|
||||
|
||||
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) {
|
||||
try {
|
||||
|
||||
@ -6543,5 +6543,4 @@ public class MjonMsgDataController {
|
||||
|
||||
return "web/msgdata/MsgSentListAjax";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -51,4 +51,7 @@ public interface SchdlrManageService {
|
||||
public void payBack(String type, int limitCout) throws Exception;
|
||||
|
||||
public void payBack_advc(String p_type) throws Exception;
|
||||
|
||||
//대체문자 결과 반영 배치
|
||||
public void updateKakaoResendResult() throws Exception;
|
||||
}
|
||||
|
||||
@ -512,6 +512,21 @@ 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=====runUpdateKakaoResendResult =============>");
|
||||
schdlrManageService.updateKakaoResendResult();
|
||||
}catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//환불 실행
|
||||
private void PayBack(String p_type) throws Exception {
|
||||
|
||||
|
||||
@ -555,4 +555,37 @@ public class SchdlrManageServiceImpl extends EgovAbstractServiceImpl implements
|
||||
|
||||
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 {
|
||||
long startTime = System.currentTimeMillis();
|
||||
// 대체문자 대상 조회
|
||||
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);
|
||||
}
|
||||
long endTime = System.currentTimeMillis();
|
||||
long elapsedTime = (endTime - startTime) / 1000; // 초 단위 변환
|
||||
System.out.println("updateKakaoResendResult 실행 시간: " + elapsedTime + "초 (" + resendLogList.size() + "건 처리)");
|
||||
}
|
||||
}
|
||||
|
||||
@ -8263,5 +8263,35 @@
|
||||
|
||||
</update>
|
||||
|
||||
<select id="mjonMsgDataDAO.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="mjonMsgDataDAO.updateResendResult" parameterClass="mjonMsgVO" >
|
||||
|
||||
UPDATE MJ_MSG_DATA
|
||||
SET MSG_RESULT = #msgResult#
|
||||
WHERE USERDATA = #userData#
|
||||
|
||||
</update>
|
||||
|
||||
<delete id="mjonMsgDataDAO.deleteBizResendLog" parameterClass="mjonMsgVO" >
|
||||
|
||||
DELETE FROM BIZ_RESEND_LOG
|
||||
WHERE CMID = #cmId# OR UMID = #cmId#
|
||||
|
||||
</delete>
|
||||
|
||||
</sqlMap>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user