문자 우선순위 랜덤 업데이트
@19ef923900dc64837142a4ca6fc9bcdd795aa819
--- src/main/java/itn/let/lett/service/LetterService.java
+++ src/main/java/itn/let/lett/service/LetterService.java
... | ... | @@ -19,6 +19,9 @@ |
| 19 | 19 |
// 단문/장문 문자 삭제 하기 |
| 20 | 20 |
public void deleteLetterMessage(String checkedIdForDel) throws Exception; |
| 21 | 21 |
|
| 22 |
+ // 문자 우선순위 랜덤 업데이트 All |
|
| 23 |
+ public void updateLetterPriorityAll() throws Exception; |
|
| 24 |
+ |
|
| 22 | 25 |
// 단문/장문 문자 상세보기 |
| 23 | 26 |
public LetterVO letterMessagesDetail(LetterVO letterVO) throws Exception; |
| 24 | 27 |
|
--- src/main/java/itn/let/lett/service/impl/LetterDAO.java
+++ src/main/java/itn/let/lett/service/impl/LetterDAO.java
... | ... | @@ -37,6 +37,11 @@ |
| 37 | 37 |
update("LetterDAO.deleteLetterMessage", checkedIdForDel);
|
| 38 | 38 |
} |
| 39 | 39 |
|
| 40 |
+ // 문자 우선순위 랜덤 업데이트 All |
|
| 41 |
+ public void updateLetterPriorityAll() throws Exception{
|
|
| 42 |
+ update("LetterDAO.updateLetterPriorityAll");
|
|
| 43 |
+ } |
|
| 44 |
+ |
|
| 40 | 45 |
public LetterVO letterMessagesDetail(LetterVO letterVO) throws Exception{
|
| 41 | 46 |
|
| 42 | 47 |
return (LetterVO) select("LetterDAO.letterMessagesDetail", letterVO);
|
--- src/main/java/itn/let/lett/service/impl/LetterServiceImpl.java
+++ src/main/java/itn/let/lett/service/impl/LetterServiceImpl.java
... | ... | @@ -61,6 +61,11 @@ |
| 61 | 61 |
|
| 62 | 62 |
} |
| 63 | 63 |
|
| 64 |
+ // 문자 우선순위 랜덤 업데이트 All |
|
| 65 |
+ public void updateLetterPriorityAll() throws Exception{
|
|
| 66 |
+ letterDAO.updateLetterPriorityAll(); |
|
| 67 |
+ } |
|
| 68 |
+ |
|
| 64 | 69 |
public LetterVO letterMessagesDetail(LetterVO letterVO) throws Exception{
|
| 65 | 70 |
|
| 66 | 71 |
return letterDAO.letterMessagesDetail(letterVO); |
--- src/main/java/itn/let/schdlr/service/SchedulerUtil.java
+++ src/main/java/itn/let/schdlr/service/SchedulerUtil.java
... | ... | @@ -23,6 +23,7 @@ |
| 23 | 23 |
import itn.let.fax.admin.service.FaxStatVO; |
| 24 | 24 |
import itn.let.kakao.admin.kakaoAt.service.MjonKakaoAtStatVO; |
| 25 | 25 |
import itn.let.kakao.admin.statistics.service.KakaoStatisticsService; |
| 26 |
+import itn.let.lett.service.LetterService; |
|
| 26 | 27 |
import itn.let.mail.service.MailTemplateService; |
| 27 | 28 |
import itn.let.mjo.msg.service.MjonMsgService; |
| 28 | 29 |
import itn.let.mjo.msg.service.MjonMsgStatVO; |
... | ... | @@ -71,6 +72,9 @@ |
| 71 | 72 |
|
| 72 | 73 |
@Resource(name = "faxAdmService") |
| 73 | 74 |
private FaxAdmService faxAdmService; |
| 75 |
+ |
|
| 76 |
+ @Resource(name = "LetterService") |
|
| 77 |
+ private LetterService letterService; |
|
| 74 | 78 |
|
| 75 | 79 |
/** 설정값 가져오기 */ |
| 76 | 80 |
@Value("#{globalSettings['Globals.Env']}")
|
... | ... | @@ -178,7 +182,7 @@ |
| 178 | 182 |
ex.printStackTrace(); |
| 179 | 183 |
} |
| 180 | 184 |
} |
| 181 |
- |
|
| 185 |
+ |
|
| 182 | 186 |
// 매일 오전 10시마다 실행 ex) 10:00 |
| 183 | 187 |
// 휴면회원 SMS발송 |
| 184 | 188 |
@Scheduled(cron = "0 0 10 * * *") |
... | ... | @@ -195,6 +199,21 @@ |
| 195 | 199 |
} |
| 196 | 200 |
} |
| 197 | 201 |
|
| 202 |
+ // 매일 오전 5시마다 실행 ex) 05:00 |
|
| 203 |
+ // 문자 우선순위 랜덤 업데이트 All |
|
| 204 |
+ @Scheduled(cron = "0 0 5 * * *") |
|
| 205 |
+ @SchedulerLock(name = "runLetterPriorityUpdateAll", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN) |
|
| 206 |
+ public void runLetterPriorityUpdateAll() throws Exception {
|
|
| 207 |
+ |
|
| 208 |
+ System.out.println("=============EgovSysLogScheduling=====runLetterPriorityUpdateAll =============>");
|
|
| 209 |
+ try {
|
|
| 210 |
+ |
|
| 211 |
+ letterService.updateLetterPriorityAll(); |
|
| 212 |
+ |
|
| 213 |
+ }catch(Exception ex) {
|
|
| 214 |
+ ex.printStackTrace(); |
|
| 215 |
+ } |
|
| 216 |
+ } |
|
| 198 | 217 |
|
| 199 | 218 |
// 매달 1일 0시 10분 실행 |
| 200 | 219 |
// "0 10 0 1 * *" |
--- src/main/java/itn/web/ContentController.java
+++ src/main/java/itn/web/ContentController.java
... | ... | @@ -7,7 +7,6 @@ |
| 7 | 7 |
import java.net.URLEncoder; |
| 8 | 8 |
import java.text.SimpleDateFormat; |
| 9 | 9 |
import java.util.Date; |
| 10 |
-import java.util.List; |
|
| 11 | 10 |
import java.util.Map; |
| 12 | 11 |
|
| 13 | 12 |
import javax.annotation.Resource; |
... | ... | @@ -33,11 +32,10 @@ |
| 33 | 32 |
|
| 34 | 33 |
import itn.com.uss.olh.hpc.service.HackIpService; |
| 35 | 34 |
import itn.com.uss.olh.hpc.service.HackIpVO; |
| 35 |
+import itn.let.lett.service.LetterService; |
|
| 36 | 36 |
import itn.let.lett.service.LetterVO; |
| 37 | 37 |
import itn.let.mjo.pay.service.MjonPayVO; |
| 38 | 38 |
import itn.let.schdlr.service.SchdlrManageService; |
| 39 |
-import itn.let.sym.grd.service.MberGrdService; |
|
| 40 |
-import itn.let.sym.grd.service.MberGrdVO; |
|
| 41 | 39 |
import itn.let.uss.ion.cnt.service.CntManageVO; |
| 42 | 40 |
import itn.let.uss.ion.cnt.service.EgovCntManageService; |
| 43 | 41 |
|
... | ... | @@ -52,6 +50,10 @@ |
| 52 | 50 |
|
| 53 | 51 |
@Resource(name = "SchdlrManageService") |
| 54 | 52 |
private SchdlrManageService schdlrManageService; |
| 53 |
+ |
|
| 54 |
+ @Resource(name = "LetterService") |
|
| 55 |
+ private LetterService letterService; |
|
| 56 |
+ |
|
| 55 | 57 |
|
| 56 | 58 |
/*인사말*/ |
| 57 | 59 |
@RequestMapping(value="/web/intro/intro.do") |
... | ... | @@ -694,11 +696,11 @@ |
| 694 | 696 |
|
| 695 | 697 |
return modelAndView; |
| 696 | 698 |
} |
| 697 |
- |
|
| 699 |
+ |
|
| 700 |
+ /* |
|
| 698 | 701 |
@Resource(name = "mberGrdService") |
| 699 | 702 |
MberGrdService mberGrdService; |
| 700 | 703 |
|
| 701 |
- /* |
|
| 702 | 704 |
// test |
| 703 | 705 |
@RequestMapping(value= {"/web/main/testAjax.do"})
|
| 704 | 706 |
public ModelAndView testAjax(HttpServletRequest request, |
... | ... | @@ -712,7 +714,6 @@ |
| 712 | 714 |
|
| 713 | 715 |
try {
|
| 714 | 716 |
|
| 715 |
- |
|
| 716 | 717 |
MberGrdVO mberGrdVO = new MberGrdVO(); |
| 717 | 718 |
mberGrdVO.setFirstIndex(0); |
| 718 | 719 |
mberGrdVO.setLastIndex(1000); |
... | ... | @@ -738,7 +739,6 @@ |
| 738 | 739 |
System.out.println("");
|
| 739 | 740 |
} |
| 740 | 741 |
|
| 741 |
- /* |
|
| 742 | 742 |
MberGrdVO mberGrdVO1 = new MberGrdVO(); |
| 743 | 743 |
if (!StringUtils.isEmpty(mberGrdVO1.getMberId())) {
|
| 744 | 744 |
System.out.println("mberGrdVO1 : NOT NULL");
|
... | ... | @@ -755,7 +755,6 @@ |
| 755 | 755 |
else {
|
| 756 | 756 |
System.out.println("mberGrdVO2 : NULL");
|
| 757 | 757 |
} |
| 758 |
- |
|
| 759 | 758 |
} |
| 760 | 759 |
catch(Exception e) {
|
| 761 | 760 |
isSuccess = false; |
--- src/main/resources/egovframework/sqlmap/let/letter/LetterMessages_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/letter/LetterMessages_SQL_Mysql.xml
... | ... | @@ -704,6 +704,19 @@ |
| 704 | 704 |
|
| 705 | 705 |
</update> |
| 706 | 706 |
|
| 707 |
+ <!-- 문자 우선순위 랜덤 업데이트 --> |
|
| 708 |
+ <update id="LetterDAO.updateLetterPriorityAll"> |
|
| 709 |
+ <![CDATA[ |
|
| 710 |
+ UPDATE TB_LETTER SET |
|
| 711 |
+ priority = (FLOOR(RAND() * 100000) + 10) |
|
| 712 |
+ , UPDATEDATE = NOW() |
|
| 713 |
+ WHERE 1=1 |
|
| 714 |
+ AND USE_YN = 'Y' |
|
| 715 |
+ AND LETTER_TYPE IN ('S', 'L', 'P')
|
|
| 716 |
+ AND priority >= 11 |
|
| 717 |
+ ]]> |
|
| 718 |
+ </update> |
|
| 719 |
+ |
|
| 707 | 720 |
<update id="LetterDAO.updateLetterMessages" parameterClass="letterVO"> |
| 708 | 721 |
|
| 709 | 722 |
UPDATE TB_LETTER SET CATEGORY_CODE = #categoryCode#, |
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?