발송결과, 예약문자관리 메뉴 검색일자 지정 - 검색일자가 없는 경우 전날 ~ 금일 기간으로 검색되도록 지정
- 검색일자가 없는 경우 전날 ~ 금일 기간으로 검색되도록 지정
@730084f1fbf0bda13d8604d2569b135e0eff17d3
--- src/main/java/itn/let/kakao/user/sent/web/KakaoSentController.java
+++ src/main/java/itn/let/kakao/user/sent/web/KakaoSentController.java
... | ... | @@ -106,6 +106,30 @@ |
| 106 | 106 |
|
| 107 | 107 |
//기본 등록일자 정렬 |
| 108 | 108 |
if(kakaoSentVO.getSearchSortCnd().equals("")) kakaoSentVO.setSearchSortCnd("regdate");
|
| 109 |
+ |
|
| 110 |
+ |
|
| 111 |
+ String startDate = kakaoSentVO.getStartDate(); |
|
| 112 |
+ String endDate = kakaoSentVO.getEndDate(); |
|
| 113 |
+ |
|
| 114 |
+ if(startDate == null && endDate == null ) {
|
|
| 115 |
+ |
|
| 116 |
+ Calendar cal = Calendar.getInstance(); |
|
| 117 |
+ Date now = new Date(); |
|
| 118 |
+ |
|
| 119 |
+ SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
|
| 120 |
+ |
|
| 121 |
+ //종료일은 오늘날짜 |
|
| 122 |
+ cal.setTime(now); |
|
| 123 |
+ endDate = format.format(cal.getTime()); |
|
| 124 |
+ |
|
| 125 |
+ //시작일은 전날로 셋팅 |
|
| 126 |
+ cal.add(Calendar.DATE, -1); |
|
| 127 |
+ startDate = format.format(cal.getTime()); |
|
| 128 |
+ |
|
| 129 |
+ kakaoSentVO.setStartDate(startDate); |
|
| 130 |
+ kakaoSentVO.setEndDate(endDate); |
|
| 131 |
+ |
|
| 132 |
+ } |
|
| 109 | 133 |
|
| 110 | 134 |
model.addAttribute("searchKeyword", kakaoSentVO.getSearchKeyword());
|
| 111 | 135 |
model.addAttribute("kakaoSentVO", kakaoSentVO);
|
--- src/main/java/itn/let/mjo/msgsent/web/MjonMsgSentController.java
+++ src/main/java/itn/let/mjo/msgsent/web/MjonMsgSentController.java
... | ... | @@ -225,6 +225,29 @@ |
| 225 | 225 |
|
| 226 | 226 |
} |
| 227 | 227 |
|
| 228 |
+ String startDate = mjonMsgSentVO.getStartDate(); |
|
| 229 |
+ String endDate = mjonMsgSentVO.getEndDate(); |
|
| 230 |
+ |
|
| 231 |
+ if(startDate == null && endDate == null ) {
|
|
| 232 |
+ |
|
| 233 |
+ Calendar cal = Calendar.getInstance(); |
|
| 234 |
+ Date now = new Date(); |
|
| 235 |
+ |
|
| 236 |
+ SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
|
| 237 |
+ |
|
| 238 |
+ //종료일은 오늘날짜 |
|
| 239 |
+ cal.setTime(now); |
|
| 240 |
+ endDate = format.format(cal.getTime()); |
|
| 241 |
+ |
|
| 242 |
+ //시작일은 전날로 셋팅 |
|
| 243 |
+ cal.add(Calendar.DATE, -1); |
|
| 244 |
+ startDate = format.format(cal.getTime()); |
|
| 245 |
+ |
|
| 246 |
+ mjonMsgSentVO.setStartDate(startDate); |
|
| 247 |
+ mjonMsgSentVO.setEndDate(endDate); |
|
| 248 |
+ |
|
| 249 |
+ } |
|
| 250 |
+ |
|
| 228 | 251 |
model.addAttribute("searchKeyword", mjonMsgSentVO.getSearchKeyword());
|
| 229 | 252 |
model.addAttribute("mjonMsgSentVO", mjonMsgSentVO);
|
| 230 | 253 |
model.addAttribute("siteId", mjonMsgSentVO.getSiteId());
|
... | ... | @@ -330,7 +353,11 @@ |
| 330 | 353 |
model.addAttribute("totalRecordCount", paginationInfo.getTotalRecordCount());
|
| 331 | 354 |
|
| 332 | 355 |
//발송 결과 성공 실패 건수 리스트 불러오기 |
| 333 |
- List<MjonMsgSentVO> resultMsgSucFailList = mjonMsgSentService.selectAllMsgSentSucFailList(resultAllSentList, mjonMsgSentVO); |
|
| 356 |
+ List<MjonMsgSentVO> resultMsgSucFailList = new ArrayList<MjonMsgSentVO>(); |
|
| 357 |
+ |
|
| 358 |
+ if(resultAllSentList.size() > 0) {
|
|
| 359 |
+ resultMsgSucFailList = mjonMsgSentService.selectAllMsgSentSucFailList(resultAllSentList, mjonMsgSentVO); |
|
| 360 |
+ } |
|
| 334 | 361 |
model.addAttribute("resultMsgSucFailList", resultMsgSucFailList);
|
| 335 | 362 |
|
| 336 | 363 |
model.addAttribute("mjonMsgSentVO", mjonMsgSentVO);
|
--- src/main/java/itn/let/mjo/reservmsg/web/MjonReservMsgController.java
+++ src/main/java/itn/let/mjo/reservmsg/web/MjonReservMsgController.java
... | ... | @@ -210,6 +210,30 @@ |
| 210 | 210 |
model.addAttribute("paginationInfo", paginationInfo);
|
| 211 | 211 |
model.addAttribute("totalRecordCount", paginationInfo.getTotalRecordCount());*/
|
| 212 | 212 |
|
| 213 |
+ |
|
| 214 |
+ String startDate = mjonResvMsgVO.getStartDate(); |
|
| 215 |
+ String endDate = mjonResvMsgVO.getEndDate(); |
|
| 216 |
+ |
|
| 217 |
+ if(startDate == null && endDate == null ) {
|
|
| 218 |
+ |
|
| 219 |
+ Calendar cal = Calendar.getInstance(); |
|
| 220 |
+ Date now = new Date(); |
|
| 221 |
+ |
|
| 222 |
+ SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
|
| 223 |
+ |
|
| 224 |
+ //종료일은 오늘날짜 |
|
| 225 |
+ cal.setTime(now); |
|
| 226 |
+ endDate = format.format(cal.getTime()); |
|
| 227 |
+ |
|
| 228 |
+ //시작일은 전날로 셋팅 |
|
| 229 |
+ cal.add(Calendar.DATE, -1); |
|
| 230 |
+ startDate = format.format(cal.getTime()); |
|
| 231 |
+ |
|
| 232 |
+ mjonResvMsgVO.setStartDate(startDate); |
|
| 233 |
+ mjonResvMsgVO.setEndDate(endDate); |
|
| 234 |
+ |
|
| 235 |
+ } |
|
| 236 |
+ |
|
| 213 | 237 |
model.addAttribute("searchKeyword", mjonResvMsgVO.getSearchKeyword());
|
| 214 | 238 |
model.addAttribute("mjonResvMsgVO", mjonResvMsgVO);
|
| 215 | 239 |
model.addAttribute("siteId", mjonResvMsgVO.getSiteId());
|
... | ... | @@ -1417,6 +1441,29 @@ |
| 1417 | 1441 |
|
| 1418 | 1442 |
//기본 등록일자 정렬 |
| 1419 | 1443 |
if(kakaoSentVO.getSearchSortCnd().equals("")) kakaoSentVO.setSearchSortCnd("regdate");
|
| 1444 |
+ |
|
| 1445 |
+ String startDate = kakaoSentVO.getStartDate(); |
|
| 1446 |
+ String endDate = kakaoSentVO.getEndDate(); |
|
| 1447 |
+ |
|
| 1448 |
+ if(startDate == null && endDate == null ) {
|
|
| 1449 |
+ |
|
| 1450 |
+ Calendar cal = Calendar.getInstance(); |
|
| 1451 |
+ Date now = new Date(); |
|
| 1452 |
+ |
|
| 1453 |
+ SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
|
|
| 1454 |
+ |
|
| 1455 |
+ //종료일은 오늘날짜 |
|
| 1456 |
+ cal.setTime(now); |
|
| 1457 |
+ endDate = format.format(cal.getTime()); |
|
| 1458 |
+ |
|
| 1459 |
+ //시작일은 전날로 셋팅 |
|
| 1460 |
+ cal.add(Calendar.DATE, -1); |
|
| 1461 |
+ startDate = format.format(cal.getTime()); |
|
| 1462 |
+ |
|
| 1463 |
+ kakaoSentVO.setStartDate(startDate); |
|
| 1464 |
+ kakaoSentVO.setEndDate(endDate); |
|
| 1465 |
+ |
|
| 1466 |
+ } |
|
| 1420 | 1467 |
|
| 1421 | 1468 |
model.addAttribute("searchKeyword", kakaoSentVO.getSearchKeyword());
|
| 1422 | 1469 |
model.addAttribute("kakaoSentVO", kakaoSentVO);
|
--- src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/msg/MjonMsgSent_SQL_mysql.xml
... | ... | @@ -446,11 +446,6 @@ |
| 446 | 446 |
AND DATE_FORMAT(REGDATE, '%Y-%m-%d') <= DATE_FORMAT(#endDate#, '%Y-%m-%d') |
| 447 | 447 |
]]> |
| 448 | 448 |
</isNotEmpty> |
| 449 |
- <isEmpty property="startDate"> |
|
| 450 |
- <isEmpty property="endDate"> |
|
| 451 |
- 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) |
|
| 452 |
- </isEmpty> |
|
| 453 |
- </isEmpty> |
|
| 454 | 449 |
GROUP BY MSG_GROUP_ID |
| 455 | 450 |
ORDER BY 1=1 |
| 456 | 451 |
<isNotEmpty property="searchSortCnd"> |
... | ... | @@ -816,7 +811,7 @@ |
| 816 | 811 |
AND DATE_FORMAT(REGDATE, '%Y-%m-%d') <= DATE_FORMAT(#endDate#, '%Y-%m-%d') |
| 817 | 812 |
]]> |
| 818 | 813 |
</isNotEmpty> |
| 819 |
- ORDER BY 1=1, MSG_ID DESC |
|
| 814 |
+ ORDER BY 1=1, MSG_GROUP_ID DESC, MSG_ID DESC |
|
| 820 | 815 |
<isNotEmpty property="searchSortCnd"> |
| 821 | 816 |
<isEqual property="searchSortCnd" compareValue="curState"> |
| 822 | 817 |
, curState $searchSortOrd$ |
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?