Merge branch 'master' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git into advc
This commit is contained in:
commit
59cb474616
@ -91,8 +91,8 @@ public class SchedulerUtil {
|
||||
/*
|
||||
* 2분 마다 1주일 데이터에서 환불 대상을 찾아서 환불 한다.
|
||||
* */
|
||||
// Schdule Lock (5분동안)
|
||||
@Scheduled(cron = "0 0/5 * * * ?")
|
||||
// Schdule Lock (10분동안)
|
||||
@Scheduled(cron = "0 0/10 * * * ?")
|
||||
@SchedulerLock(name = "runScenarioOneTime", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN)
|
||||
public void runScenarioOneTime() throws Exception {
|
||||
|
||||
@ -103,7 +103,7 @@ public class SchedulerUtil {
|
||||
//문자 환불, 팩스 환불
|
||||
|
||||
|
||||
//PayBack("");
|
||||
PayBack("");
|
||||
|
||||
/*
|
||||
// 문자 환불
|
||||
@ -484,32 +484,25 @@ public class SchedulerUtil {
|
||||
}else { //2분 마다는 7일을 대상으로 실행
|
||||
//어플리케이션 트랜잭션 문제가 있어 Util 단으로 DB 호출을 가져옴 - 2024-03-14
|
||||
//schdlrManageService.msgFailPayBack();
|
||||
MjonMsgVO mjonMsgVO = new MjonMsgVO();
|
||||
mjonMsgVO.setRecordCountPerPage(500);
|
||||
List<MjonMsgVO> msgFailList = mjonMsgDataDAO.selectMsgSentFailSchedulerList(mjonMsgVO);
|
||||
|
||||
List<MjonMsgVO> msgFailList = mjonMsgDataDAO.selectMsgSentFailList();
|
||||
|
||||
long forBeforeTime = System.currentTimeMillis(); // 코드 실행 전 시간
|
||||
int batchSize = 300;
|
||||
int totalSize = msgFailList.size();
|
||||
int endj =0;
|
||||
for (int i = 0; i < totalSize; i += batchSize) {
|
||||
int end = Math.min(i + batchSize, totalSize);
|
||||
long beforeTime = System.currentTimeMillis(); // 코드 실행 전 시간
|
||||
for(int j=endj; j < end; j++) {
|
||||
System.out.println(j+" : "+ end);
|
||||
try {
|
||||
mjonMsgDataDAO.updateMsgSentFailPayBack(msgFailList.get(j));
|
||||
}catch(Exception ex) {
|
||||
System.out.println("=============SchedulerUtil=====PayBack Catch =============>");
|
||||
System.out.println(msgFailList.get(j).getUserId()+" : "+ msgFailList.get(j).getMsgGroupId() +" : "+ msgFailList.get(j).getUserData());
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
endj = end;
|
||||
|
||||
long afterTime = System.currentTimeMillis(); // 코드 실행 후 시간
|
||||
long secDiffTime = (afterTime - beforeTime)/1000; // 코드 실행 전후 시간 차이 계산(초 단위)
|
||||
System.out.println("==PayBack for 1 =============> : " + secDiffTime +"초");
|
||||
}
|
||||
int count = 0;
|
||||
System.out.println("== msgFailList =============> : "+ msgFailList.size());
|
||||
for(MjonMsgVO vo : msgFailList) {
|
||||
System.out.println(count + " : "+ msgFailList.size());
|
||||
|
||||
try {
|
||||
mjonMsgDataDAO.updateMsgSentFailPayBack(vo);
|
||||
}catch(Exception ex) {
|
||||
System.out.println("=============SchedulerUtil=====PayBack Catch =============>");
|
||||
System.out.println(vo.getUserId()+" : "+ vo.getMsgGroupId() +" : "+ vo.getUserData());
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
count = count + 1;
|
||||
}
|
||||
long forAfterTime = System.currentTimeMillis(); // 코드 실행 후 시간
|
||||
long forSecDiffTime = (forAfterTime - forBeforeTime)/1000; // 코드 실행 전후 시간 차이 계산(초 단위)
|
||||
System.out.println("==PayBack for 2 =============> 수량 : "+msgFailList.size()+" ===== " + forSecDiffTime +"초");
|
||||
|
||||
@ -364,7 +364,8 @@
|
||||
ON A.IGNORE_IP = M2.CONECT_IP
|
||||
) M3
|
||||
WHERE M3.IGNORE_YN = 'N'
|
||||
AND M3.CONECT_IP!='119.193.215.98'
|
||||
AND M3.CONECT_IP != '119.193.215.98'
|
||||
AND M3.CONECT_IP != '139.150.70.79'
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
@ -4007,7 +4007,7 @@
|
||||
|
||||
</update>
|
||||
<!-- 문자발송 실패건에 대한 환불 대상 리스트 : 발송 완료되었고, 결과코드가 실패이고, 예약 취소가 아닌건들 -->
|
||||
<select id="MjonMsgDataDAO.selectMsgSentFailList">
|
||||
<select id="MjonMsgDataDAO.selectMsgSentFailList" resultClass="mjonMsgVO">
|
||||
|
||||
SELECT USER_ID AS userId,
|
||||
MSG_GROUP_ID AS msgGroupId,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user