발송결과, 예약문자관리 메뉴 검색일자 지정
- 검색일자가 없는 경우 전날 ~ 금일 기간으로 검색되도록 지정
This commit is contained in:
parent
3b59ecffc9
commit
730084f1fb
@ -106,6 +106,30 @@ public class KakaoSentController {
|
||||
|
||||
//기본 등록일자 정렬
|
||||
if(kakaoSentVO.getSearchSortCnd().equals("")) kakaoSentVO.setSearchSortCnd("regdate");
|
||||
|
||||
|
||||
String startDate = kakaoSentVO.getStartDate();
|
||||
String endDate = kakaoSentVO.getEndDate();
|
||||
|
||||
if(startDate == null && endDate == null ) {
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
Date now = new Date();
|
||||
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
||||
|
||||
//종료일은 오늘날짜
|
||||
cal.setTime(now);
|
||||
endDate = format.format(cal.getTime());
|
||||
|
||||
//시작일은 전날로 셋팅
|
||||
cal.add(Calendar.DATE, -1);
|
||||
startDate = format.format(cal.getTime());
|
||||
|
||||
kakaoSentVO.setStartDate(startDate);
|
||||
kakaoSentVO.setEndDate(endDate);
|
||||
|
||||
}
|
||||
|
||||
model.addAttribute("searchKeyword", kakaoSentVO.getSearchKeyword());
|
||||
model.addAttribute("kakaoSentVO", kakaoSentVO);
|
||||
|
||||
@ -225,6 +225,29 @@ private static final Logger logger = LoggerFactory.getLogger(MjonMsgSentControll
|
||||
|
||||
}
|
||||
|
||||
String startDate = mjonMsgSentVO.getStartDate();
|
||||
String endDate = mjonMsgSentVO.getEndDate();
|
||||
|
||||
if(startDate == null && endDate == null ) {
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
Date now = new Date();
|
||||
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
||||
|
||||
//종료일은 오늘날짜
|
||||
cal.setTime(now);
|
||||
endDate = format.format(cal.getTime());
|
||||
|
||||
//시작일은 전날로 셋팅
|
||||
cal.add(Calendar.DATE, -1);
|
||||
startDate = format.format(cal.getTime());
|
||||
|
||||
mjonMsgSentVO.setStartDate(startDate);
|
||||
mjonMsgSentVO.setEndDate(endDate);
|
||||
|
||||
}
|
||||
|
||||
model.addAttribute("searchKeyword", mjonMsgSentVO.getSearchKeyword());
|
||||
model.addAttribute("mjonMsgSentVO", mjonMsgSentVO);
|
||||
model.addAttribute("siteId", mjonMsgSentVO.getSiteId());
|
||||
@ -330,7 +353,11 @@ private static final Logger logger = LoggerFactory.getLogger(MjonMsgSentControll
|
||||
model.addAttribute("totalRecordCount", paginationInfo.getTotalRecordCount());
|
||||
|
||||
//발송 결과 성공 실패 건수 리스트 불러오기
|
||||
List<MjonMsgSentVO> resultMsgSucFailList = mjonMsgSentService.selectAllMsgSentSucFailList(resultAllSentList, mjonMsgSentVO);
|
||||
List<MjonMsgSentVO> resultMsgSucFailList = new ArrayList<MjonMsgSentVO>();
|
||||
|
||||
if(resultAllSentList.size() > 0) {
|
||||
resultMsgSucFailList = mjonMsgSentService.selectAllMsgSentSucFailList(resultAllSentList, mjonMsgSentVO);
|
||||
}
|
||||
model.addAttribute("resultMsgSucFailList", resultMsgSucFailList);
|
||||
|
||||
model.addAttribute("mjonMsgSentVO", mjonMsgSentVO);
|
||||
|
||||
@ -210,6 +210,30 @@ public class MjonReservMsgController {
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
model.addAttribute("totalRecordCount", paginationInfo.getTotalRecordCount());*/
|
||||
|
||||
|
||||
String startDate = mjonResvMsgVO.getStartDate();
|
||||
String endDate = mjonResvMsgVO.getEndDate();
|
||||
|
||||
if(startDate == null && endDate == null ) {
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
Date now = new Date();
|
||||
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
||||
|
||||
//종료일은 오늘날짜
|
||||
cal.setTime(now);
|
||||
endDate = format.format(cal.getTime());
|
||||
|
||||
//시작일은 전날로 셋팅
|
||||
cal.add(Calendar.DATE, -1);
|
||||
startDate = format.format(cal.getTime());
|
||||
|
||||
mjonResvMsgVO.setStartDate(startDate);
|
||||
mjonResvMsgVO.setEndDate(endDate);
|
||||
|
||||
}
|
||||
|
||||
model.addAttribute("searchKeyword", mjonResvMsgVO.getSearchKeyword());
|
||||
model.addAttribute("mjonResvMsgVO", mjonResvMsgVO);
|
||||
model.addAttribute("siteId", mjonResvMsgVO.getSiteId());
|
||||
@ -1417,6 +1441,29 @@ public class MjonReservMsgController {
|
||||
|
||||
//기본 등록일자 정렬
|
||||
if(kakaoSentVO.getSearchSortCnd().equals("")) kakaoSentVO.setSearchSortCnd("regdate");
|
||||
|
||||
String startDate = kakaoSentVO.getStartDate();
|
||||
String endDate = kakaoSentVO.getEndDate();
|
||||
|
||||
if(startDate == null && endDate == null ) {
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
Date now = new Date();
|
||||
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
||||
|
||||
//종료일은 오늘날짜
|
||||
cal.setTime(now);
|
||||
endDate = format.format(cal.getTime());
|
||||
|
||||
//시작일은 전날로 셋팅
|
||||
cal.add(Calendar.DATE, -1);
|
||||
startDate = format.format(cal.getTime());
|
||||
|
||||
kakaoSentVO.setStartDate(startDate);
|
||||
kakaoSentVO.setEndDate(endDate);
|
||||
|
||||
}
|
||||
|
||||
model.addAttribute("searchKeyword", kakaoSentVO.getSearchKeyword());
|
||||
model.addAttribute("kakaoSentVO", kakaoSentVO);
|
||||
|
||||
@ -446,11 +446,6 @@
|
||||
AND DATE_FORMAT(REGDATE, '%Y-%m-%d') <= DATE_FORMAT(#endDate#, '%Y-%m-%d')
|
||||
]]>
|
||||
</isNotEmpty>
|
||||
<isEmpty property="startDate">
|
||||
<isEmpty property="endDate">
|
||||
AND REGDATE BETWEEN DATE_ADD(DATE_FORMAT(NOW(), '%Y-%m-%d'), INTERVAL -1 DAY) and DATE_ADD(DATE_FORMAT(NOW(), '%Y-%m-%d'), INTERVAL 1 DAY)
|
||||
</isEmpty>
|
||||
</isEmpty>
|
||||
GROUP BY MSG_GROUP_ID
|
||||
ORDER BY 1=1
|
||||
<isNotEmpty property="searchSortCnd">
|
||||
@ -816,7 +811,7 @@
|
||||
AND DATE_FORMAT(REGDATE, '%Y-%m-%d') <= DATE_FORMAT(#endDate#, '%Y-%m-%d')
|
||||
]]>
|
||||
</isNotEmpty>
|
||||
ORDER BY 1=1, MSG_ID DESC
|
||||
ORDER BY 1=1, MSG_GROUP_ID DESC, MSG_ID DESC
|
||||
<isNotEmpty property="searchSortCnd">
|
||||
<isEqual property="searchSortCnd" compareValue="curState">
|
||||
, curState $searchSortOrd$
|
||||
|
||||
Loading…
Reference in New Issue
Block a user