문자 우선순위 랜덤 업데이트
This commit is contained in:
parent
2a4fbd9797
commit
19ef923900
@ -19,6 +19,9 @@ public interface LetterService {
|
||||
// 단문/장문 문자 삭제 하기
|
||||
public void deleteLetterMessage(String checkedIdForDel) throws Exception;
|
||||
|
||||
// 문자 우선순위 랜덤 업데이트 All
|
||||
public void updateLetterPriorityAll() throws Exception;
|
||||
|
||||
// 단문/장문 문자 상세보기
|
||||
public LetterVO letterMessagesDetail(LetterVO letterVO) throws Exception;
|
||||
|
||||
|
||||
@ -37,6 +37,11 @@ public class LetterDAO extends EgovAbstractDAO {
|
||||
update("LetterDAO.deleteLetterMessage", checkedIdForDel);
|
||||
}
|
||||
|
||||
// 문자 우선순위 랜덤 업데이트 All
|
||||
public void updateLetterPriorityAll() throws Exception{
|
||||
update("LetterDAO.updateLetterPriorityAll");
|
||||
}
|
||||
|
||||
public LetterVO letterMessagesDetail(LetterVO letterVO) throws Exception{
|
||||
|
||||
return (LetterVO) select("LetterDAO.letterMessagesDetail", letterVO);
|
||||
|
||||
@ -61,6 +61,11 @@ public class LetterServiceImpl extends EgovAbstractServiceImpl implements Letter
|
||||
|
||||
}
|
||||
|
||||
// 문자 우선순위 랜덤 업데이트 All
|
||||
public void updateLetterPriorityAll() throws Exception{
|
||||
letterDAO.updateLetterPriorityAll();
|
||||
}
|
||||
|
||||
public LetterVO letterMessagesDetail(LetterVO letterVO) throws Exception{
|
||||
|
||||
return letterDAO.letterMessagesDetail(letterVO);
|
||||
|
||||
@ -23,6 +23,7 @@ import itn.let.fax.admin.service.FaxAdmService;
|
||||
import itn.let.fax.admin.service.FaxStatVO;
|
||||
import itn.let.kakao.admin.kakaoAt.service.MjonKakaoAtStatVO;
|
||||
import itn.let.kakao.admin.statistics.service.KakaoStatisticsService;
|
||||
import itn.let.lett.service.LetterService;
|
||||
import itn.let.mail.service.MailTemplateService;
|
||||
import itn.let.mjo.msg.service.MjonMsgService;
|
||||
import itn.let.mjo.msg.service.MjonMsgStatVO;
|
||||
@ -72,6 +73,9 @@ public class SchedulerUtil {
|
||||
@Resource(name = "faxAdmService")
|
||||
private FaxAdmService faxAdmService;
|
||||
|
||||
@Resource(name = "LetterService")
|
||||
private LetterService letterService;
|
||||
|
||||
/** 설정값 가져오기 */
|
||||
@Value("#{globalSettings['Globals.Env']}")
|
||||
private String GlobalsEnv;
|
||||
@ -178,7 +182,7 @@ public class SchedulerUtil {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 매일 오전 10시마다 실행 ex) 10:00
|
||||
// 휴면회원 SMS발송
|
||||
@Scheduled(cron = "0 0 10 * * *")
|
||||
@ -195,6 +199,21 @@ public class SchedulerUtil {
|
||||
}
|
||||
}
|
||||
|
||||
// 매일 오전 5시마다 실행 ex) 05:00
|
||||
// 문자 우선순위 랜덤 업데이트 All
|
||||
@Scheduled(cron = "0 0 5 * * *")
|
||||
@SchedulerLock(name = "runLetterPriorityUpdateAll", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN)
|
||||
public void runLetterPriorityUpdateAll() throws Exception {
|
||||
|
||||
System.out.println("=============EgovSysLogScheduling=====runLetterPriorityUpdateAll =============>");
|
||||
try {
|
||||
|
||||
letterService.updateLetterPriorityAll();
|
||||
|
||||
}catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
// 매달 1일 0시 10분 실행
|
||||
// "0 10 0 1 * *"
|
||||
|
||||
@ -7,7 +7,6 @@ import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -33,11 +32,10 @@ import com.mashape.unirest.http.exceptions.UnirestException;
|
||||
|
||||
import itn.com.uss.olh.hpc.service.HackIpService;
|
||||
import itn.com.uss.olh.hpc.service.HackIpVO;
|
||||
import itn.let.lett.service.LetterService;
|
||||
import itn.let.lett.service.LetterVO;
|
||||
import itn.let.mjo.pay.service.MjonPayVO;
|
||||
import itn.let.schdlr.service.SchdlrManageService;
|
||||
import itn.let.sym.grd.service.MberGrdService;
|
||||
import itn.let.sym.grd.service.MberGrdVO;
|
||||
import itn.let.uss.ion.cnt.service.CntManageVO;
|
||||
import itn.let.uss.ion.cnt.service.EgovCntManageService;
|
||||
|
||||
@ -53,6 +51,10 @@ public class ContentController{
|
||||
@Resource(name = "SchdlrManageService")
|
||||
private SchdlrManageService schdlrManageService;
|
||||
|
||||
@Resource(name = "LetterService")
|
||||
private LetterService letterService;
|
||||
|
||||
|
||||
/*인사말*/
|
||||
@RequestMapping(value="/web/intro/intro.do")
|
||||
public String intro(@RequestParam Map<String, Object> commandMap, Model model) throws Exception {
|
||||
@ -694,11 +696,11 @@ public class ContentController{
|
||||
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@Resource(name = "mberGrdService")
|
||||
MberGrdService mberGrdService;
|
||||
|
||||
/*
|
||||
// test
|
||||
@RequestMapping(value= {"/web/main/testAjax.do"})
|
||||
public ModelAndView testAjax(HttpServletRequest request,
|
||||
@ -712,7 +714,6 @@ public class ContentController{
|
||||
|
||||
try {
|
||||
|
||||
|
||||
MberGrdVO mberGrdVO = new MberGrdVO();
|
||||
mberGrdVO.setFirstIndex(0);
|
||||
mberGrdVO.setLastIndex(1000);
|
||||
@ -738,7 +739,6 @@ public class ContentController{
|
||||
System.out.println("");
|
||||
}
|
||||
|
||||
/*
|
||||
MberGrdVO mberGrdVO1 = new MberGrdVO();
|
||||
if (!StringUtils.isEmpty(mberGrdVO1.getMberId())) {
|
||||
System.out.println("mberGrdVO1 : NOT NULL");
|
||||
@ -755,7 +755,6 @@ public class ContentController{
|
||||
else {
|
||||
System.out.println("mberGrdVO2 : NULL");
|
||||
}
|
||||
|
||||
}
|
||||
catch(Exception e) {
|
||||
isSuccess = false;
|
||||
|
||||
@ -704,6 +704,19 @@
|
||||
|
||||
</update>
|
||||
|
||||
<!-- 문자 우선순위 랜덤 업데이트 -->
|
||||
<update id="LetterDAO.updateLetterPriorityAll">
|
||||
<![CDATA[
|
||||
UPDATE TB_LETTER SET
|
||||
priority = (FLOOR(RAND() * 100000) + 10)
|
||||
, UPDATEDATE = NOW()
|
||||
WHERE 1=1
|
||||
AND USE_YN = 'Y'
|
||||
AND LETTER_TYPE IN ('S', 'L', 'P')
|
||||
AND priority >= 11
|
||||
]]>
|
||||
</update>
|
||||
|
||||
<update id="LetterDAO.updateLetterMessages" parameterClass="letterVO">
|
||||
|
||||
UPDATE TB_LETTER SET CATEGORY_CODE = #categoryCode#,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user