Merge branch 'rosewiper'

This commit is contained in:
rosewiper 2024-02-07 11:09:16 +09:00
commit 58072f2791
4 changed files with 100 additions and 2 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -811,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$