Merge branch 'master' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git into advc
@59cb4746160ba0e6663b22a4e155781eb4de9c1e
--- src/main/java/itn/let/schdlr/service/SchedulerUtil.java
+++ src/main/java/itn/let/schdlr/service/SchedulerUtil.java
... | ... | @@ -91,8 +91,8 @@ |
| 91 | 91 |
/* |
| 92 | 92 |
* 2분 마다 1주일 데이터에서 환불 대상을 찾아서 환불 한다. |
| 93 | 93 |
* */ |
| 94 |
- // Schdule Lock (5분동안) |
|
| 95 |
- @Scheduled(cron = "0 0/5 * * * ?") |
|
| 94 |
+ // Schdule Lock (10분동안) |
|
| 95 |
+ @Scheduled(cron = "0 0/10 * * * ?") |
|
| 96 | 96 |
@SchedulerLock(name = "runScenarioOneTime", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN) |
| 97 | 97 |
public void runScenarioOneTime() throws Exception {
|
| 98 | 98 |
|
... | ... | @@ -103,7 +103,7 @@ |
| 103 | 103 |
//문자 환불, 팩스 환불 |
| 104 | 104 |
|
| 105 | 105 |
|
| 106 |
- //PayBack("");
|
|
| 106 |
+ PayBack("");
|
|
| 107 | 107 |
|
| 108 | 108 |
/* |
| 109 | 109 |
// 문자 환불 |
... | ... | @@ -484,32 +484,25 @@ |
| 484 | 484 |
}else { //2분 마다는 7일을 대상으로 실행
|
| 485 | 485 |
//어플리케이션 트랜잭션 문제가 있어 Util 단으로 DB 호출을 가져옴 - 2024-03-14 |
| 486 | 486 |
//schdlrManageService.msgFailPayBack(); |
| 487 |
- MjonMsgVO mjonMsgVO = new MjonMsgVO(); |
|
| 488 |
- mjonMsgVO.setRecordCountPerPage(500); |
|
| 489 |
- List<MjonMsgVO> msgFailList = mjonMsgDataDAO.selectMsgSentFailSchedulerList(mjonMsgVO); |
|
| 487 |
+ |
|
| 488 |
+ List<MjonMsgVO> msgFailList = mjonMsgDataDAO.selectMsgSentFailList(); |
|
| 489 |
+ |
|
| 490 | 490 |
long forBeforeTime = System.currentTimeMillis(); // 코드 실행 전 시간 |
| 491 |
- int batchSize = 300; |
|
| 492 |
- int totalSize = msgFailList.size(); |
|
| 493 |
- int endj =0; |
|
| 494 |
- for (int i = 0; i < totalSize; i += batchSize) {
|
|
| 495 |
- int end = Math.min(i + batchSize, totalSize); |
|
| 496 |
- long beforeTime = System.currentTimeMillis(); // 코드 실행 전 시간 |
|
| 497 |
- for(int j=endj; j < end; j++) {
|
|
| 498 |
- System.out.println(j+" : "+ end); |
|
| 499 |
- try {
|
|
| 500 |
- mjonMsgDataDAO.updateMsgSentFailPayBack(msgFailList.get(j)); |
|
| 501 |
- }catch(Exception ex) {
|
|
| 502 |
- System.out.println("=============SchedulerUtil=====PayBack Catch =============>");
|
|
| 503 |
- System.out.println(msgFailList.get(j).getUserId()+" : "+ msgFailList.get(j).getMsgGroupId() +" : "+ msgFailList.get(j).getUserData()); |
|
| 504 |
- ex.printStackTrace(); |
|
| 505 |
- } |
|
| 506 |
- } |
|
| 507 |
- endj = end; |
|
| 508 |
- |
|
| 509 |
- long afterTime = System.currentTimeMillis(); // 코드 실행 후 시간 |
|
| 510 |
- long secDiffTime = (afterTime - beforeTime)/1000; // 코드 실행 전후 시간 차이 계산(초 단위) |
|
| 511 |
- System.out.println("==PayBack for 1 =============> : " + secDiffTime +"초");
|
|
| 512 |
- } |
|
| 491 |
+ int count = 0; |
|
| 492 |
+ System.out.println("== msgFailList =============> : "+ msgFailList.size());
|
|
| 493 |
+ for(MjonMsgVO vo : msgFailList) {
|
|
| 494 |
+ System.out.println(count + " : "+ msgFailList.size()); |
|
| 495 |
+ |
|
| 496 |
+ try {
|
|
| 497 |
+ mjonMsgDataDAO.updateMsgSentFailPayBack(vo); |
|
| 498 |
+ }catch(Exception ex) {
|
|
| 499 |
+ System.out.println("=============SchedulerUtil=====PayBack Catch =============>");
|
|
| 500 |
+ System.out.println(vo.getUserId()+" : "+ vo.getMsgGroupId() +" : "+ vo.getUserData()); |
|
| 501 |
+ ex.printStackTrace(); |
|
| 502 |
+ } |
|
| 503 |
+ |
|
| 504 |
+ count = count + 1; |
|
| 505 |
+ } |
|
| 513 | 506 |
long forAfterTime = System.currentTimeMillis(); // 코드 실행 후 시간 |
| 514 | 507 |
long forSecDiffTime = (forAfterTime - forBeforeTime)/1000; // 코드 실행 전후 시간 차이 계산(초 단위) |
| 515 | 508 |
System.out.println("==PayBack for 2 =============> 수량 : "+msgFailList.size()+" ===== " + forSecDiffTime +"초");
|
--- src/main/resources/egovframework/sqlmap/com/uss/olh/hpc/EgovHpcm_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/com/uss/olh/hpc/EgovHpcm_SQL_mysql.xml
... | ... | @@ -364,7 +364,8 @@ |
| 364 | 364 |
ON A.IGNORE_IP = M2.CONECT_IP |
| 365 | 365 |
) M3 |
| 366 | 366 |
WHERE M3.IGNORE_YN = 'N' |
| 367 |
- AND M3.CONECT_IP!='119.193.215.98' |
|
| 367 |
+ AND M3.CONECT_IP != '119.193.215.98' |
|
| 368 |
+ AND M3.CONECT_IP != '139.150.70.79' |
|
| 368 | 369 |
|
| 369 | 370 |
</select> |
| 370 | 371 |
|
--- src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml
... | ... | @@ -4007,7 +4007,7 @@ |
| 4007 | 4007 |
|
| 4008 | 4008 |
</update> |
| 4009 | 4009 |
<!-- 문자발송 실패건에 대한 환불 대상 리스트 : 발송 완료되었고, 결과코드가 실패이고, 예약 취소가 아닌건들 --> |
| 4010 |
- <select id="MjonMsgDataDAO.selectMsgSentFailList"> |
|
| 4010 |
+ <select id="MjonMsgDataDAO.selectMsgSentFailList" resultClass="mjonMsgVO"> |
|
| 4011 | 4011 |
|
| 4012 | 4012 |
SELECT USER_ID AS userId, |
| 4013 | 4013 |
MSG_GROUP_ID AS msgGroupId, |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?