Merge branch 'rosewiper'
This commit is contained in:
commit
c5c7a9504b
@ -578,4 +578,26 @@ public class StringUtil {
|
|||||||
return ntceEndde;
|
return ntceEndde;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 검색 키워드 내용에 한글, 영문, 숫자를 제외한 특수문자가 있는 경우 검색이 안되도록 처리
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* */
|
||||||
|
public static boolean getSearchKeywordValidation(String paramKeyword) {
|
||||||
|
|
||||||
|
boolean resultType = false;
|
||||||
|
String keyword = paramKeyword;
|
||||||
|
|
||||||
|
keyword = keyword.replaceAll("[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9 ]", "");
|
||||||
|
|
||||||
|
//검색어에 특수기호가 없어서 공백이 되는 경우만 true를 리턴한다.
|
||||||
|
if(keyword.equals("")) {
|
||||||
|
|
||||||
|
resultType = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultType;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1201,6 +1201,18 @@ public class MjonMsgCampainDataController {
|
|||||||
RedirectAttributes redirectAttributes) throws Exception {
|
RedirectAttributes redirectAttributes) throws Exception {
|
||||||
|
|
||||||
|
|
||||||
|
//검색 키워드 체크 기능 추가
|
||||||
|
String keyword = letterVO.getSearchKeyword();
|
||||||
|
boolean searchKeyType = StringUtil.getSearchKeywordValidation(keyword);
|
||||||
|
|
||||||
|
if(!searchKeyType) {//검색 결과 Null로 리턴함.
|
||||||
|
|
||||||
|
List<?> exceptionLetterList = new ArrayList<>();
|
||||||
|
|
||||||
|
model.addAttribute("resultLetterList", exceptionLetterList);
|
||||||
|
return "web/msgcampain/LetterListAjax";
|
||||||
|
}
|
||||||
|
|
||||||
CateCode cateCode = new CateCode();
|
CateCode cateCode = new CateCode();
|
||||||
cateCode.setCateNo(letterVO.getCategoryCode());
|
cateCode.setCateNo(letterVO.getCategoryCode());
|
||||||
CateCode cateCodeInfoVO = cmmnDetailCodeManageService.selectCateCodeInfo(cateCode); //카테고리 상세 조회
|
CateCode cateCodeInfoVO = cmmnDetailCodeManageService.selectCateCodeInfo(cateCode); //카테고리 상세 조회
|
||||||
@ -1341,6 +1353,18 @@ public class MjonMsgCampainDataController {
|
|||||||
RedirectAttributes redirectAttributes) throws Exception {
|
RedirectAttributes redirectAttributes) throws Exception {
|
||||||
|
|
||||||
|
|
||||||
|
//검색 키워드 체크 기능 추가
|
||||||
|
String keyword = letterVO.getSearchKeyword();
|
||||||
|
boolean searchKeyType = StringUtil.getSearchKeywordValidation(keyword);
|
||||||
|
|
||||||
|
if(!searchKeyType) {//검색 결과 Null로 리턴함.
|
||||||
|
|
||||||
|
List<?> exceptionPhoList = new ArrayList<>();
|
||||||
|
|
||||||
|
model.addAttribute("resultPhoList", exceptionPhoList);
|
||||||
|
return "web/msgcampain/PhotoListAjax";
|
||||||
|
}
|
||||||
|
|
||||||
CateCode cateCode = new CateCode();
|
CateCode cateCode = new CateCode();
|
||||||
cateCode.setCateNo(letterVO.getCategoryCode());
|
cateCode.setCateNo(letterVO.getCategoryCode());
|
||||||
CateCode cateCodeInfoVO = cmmnDetailCodeManageService.selectCateCodeInfo(cateCode); //카테고리 상세 조회
|
CateCode cateCodeInfoVO = cmmnDetailCodeManageService.selectCateCodeInfo(cateCode); //카테고리 상세 조회
|
||||||
@ -1555,6 +1579,19 @@ public class MjonMsgCampainDataController {
|
|||||||
|
|
||||||
mjonMsgDataVO.setUserId(userId);
|
mjonMsgDataVO.setUserId(userId);
|
||||||
|
|
||||||
|
|
||||||
|
//검색 키워드 체크 기능 추가
|
||||||
|
String keyword = mjonMsgDataVO.getSearchKeyword();
|
||||||
|
boolean searchKeyType = StringUtil.getSearchKeywordValidation(keyword);
|
||||||
|
|
||||||
|
if(!searchKeyType) {//검색 결과 Null로 리턴함.
|
||||||
|
|
||||||
|
List<?> exceptionMyMsgList = new ArrayList<>();
|
||||||
|
|
||||||
|
model.addAttribute("resultMyMsgList", exceptionMyMsgList);
|
||||||
|
return "web/msgcampain/MyMsgListAjax";
|
||||||
|
}
|
||||||
|
|
||||||
//그림 문자 리스트 불러오기
|
//그림 문자 리스트 불러오기
|
||||||
//LetterVO letterVO = new LetterVO();
|
//LetterVO letterVO = new LetterVO();
|
||||||
if(mjonMsgDataVO.getPageUnit() != 10) {
|
if(mjonMsgDataVO.getPageUnit() != 10) {
|
||||||
|
|||||||
@ -1131,6 +1131,20 @@ public class MjonMsgDataController {
|
|||||||
SessionStatus status,
|
SessionStatus status,
|
||||||
RedirectAttributes redirectAttributes) throws Exception {
|
RedirectAttributes redirectAttributes) throws Exception {
|
||||||
|
|
||||||
|
|
||||||
|
//검색 키워드 체크 기능 추가
|
||||||
|
String keyword = letterVO.getSearchKeyword();
|
||||||
|
boolean searchKeyType = StringUtil.getSearchKeywordValidation(keyword);
|
||||||
|
|
||||||
|
if(!searchKeyType) {//검색 결과 Null로 리턴함.
|
||||||
|
|
||||||
|
List<?> exceptionLetterList = new ArrayList<>();
|
||||||
|
|
||||||
|
model.addAttribute("resultLetterList", exceptionLetterList);
|
||||||
|
return "web/msgdata/LetterListAjax";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CateCode cateCode = new CateCode();
|
CateCode cateCode = new CateCode();
|
||||||
cateCode.setCateNo(letterVO.getCategoryCode());
|
cateCode.setCateNo(letterVO.getCategoryCode());
|
||||||
CateCode cateCodeInfoVO = cmmnDetailCodeManageService.selectCateCodeInfo(cateCode); //카테고리 상세 조회
|
CateCode cateCodeInfoVO = cmmnDetailCodeManageService.selectCateCodeInfo(cateCode); //카테고리 상세 조회
|
||||||
@ -1303,6 +1317,18 @@ public class MjonMsgDataController {
|
|||||||
letterVO.setCategoryCode(letterVO.getUpperCateNo().substring(0, 3));
|
letterVO.setCategoryCode(letterVO.getUpperCateNo().substring(0, 3));
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
//검색 키워드 체크 기능 추가
|
||||||
|
String keyword = letterVO.getSearchKeyword();
|
||||||
|
boolean searchKeyType = StringUtil.getSearchKeywordValidation(keyword);
|
||||||
|
|
||||||
|
if(!searchKeyType) {//검색 결과 Null로 리턴함.
|
||||||
|
|
||||||
|
List<?> exceptionPhoList = new ArrayList<>();
|
||||||
|
|
||||||
|
model.addAttribute("resultPhoList", exceptionPhoList);
|
||||||
|
return "web/msgdata/PhotoListAjax";
|
||||||
|
}
|
||||||
|
|
||||||
CateCode cateCode = new CateCode();
|
CateCode cateCode = new CateCode();
|
||||||
cateCode.setCateNo(letterVO.getCategoryCode());
|
cateCode.setCateNo(letterVO.getCategoryCode());
|
||||||
CateCode cateCodeInfoVO = cmmnDetailCodeManageService.selectCateCodeInfo(cateCode); //카테고리 상세 조회
|
CateCode cateCodeInfoVO = cmmnDetailCodeManageService.selectCateCodeInfo(cateCode); //카테고리 상세 조회
|
||||||
@ -1529,6 +1555,20 @@ public class MjonMsgDataController {
|
|||||||
return "redirect:/web/main/mainPage.do";
|
return "redirect:/web/main/mainPage.do";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//검색 키워드 체크 기능 추가
|
||||||
|
String keyword = mjonMsgDataVO.getSearchKeyword();
|
||||||
|
boolean searchKeyType = StringUtil.getSearchKeywordValidation(keyword);
|
||||||
|
|
||||||
|
if(!searchKeyType) {//검색 결과 Null로 리턴함.
|
||||||
|
|
||||||
|
List<?> exceptionMyMsgList = new ArrayList<>();
|
||||||
|
|
||||||
|
model.addAttribute("resultPhoList", exceptionMyMsgList);
|
||||||
|
return "web/msgdata/MyMsgListAjax";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
mjonMsgDataVO.setUserId(userId);
|
mjonMsgDataVO.setUserId(userId);
|
||||||
|
|
||||||
//그림 문자 리스트 불러오기
|
//그림 문자 리스트 불러오기
|
||||||
@ -5064,14 +5104,15 @@ public class MjonMsgDataController {
|
|||||||
* 2023-04-24 우영두
|
* 2023-04-24 우영두
|
||||||
*
|
*
|
||||||
* */
|
* */
|
||||||
String keyword = mjonMsgDataVO.getSearchKeyword();
|
|
||||||
keyword = keyword.replaceAll("[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9 ]", "");
|
|
||||||
|
|
||||||
if(!keyword.equals("")) {
|
String keyword = mjonMsgDataVO.getSearchKeyword();
|
||||||
|
boolean searchKeyType = StringUtil.getSearchKeywordValidation(keyword);
|
||||||
|
|
||||||
|
if(!searchKeyType) {
|
||||||
|
|
||||||
modelAndView.addObject("status", "wordFail");
|
modelAndView.addObject("status", "wordFail");
|
||||||
modelAndView.addObject("message", "잘못된 검색어 입니다.");
|
modelAndView.addObject("message", "잘못된 검색어 입니다.");
|
||||||
return modelAndView;
|
return modelAndView;
|
||||||
}
|
}
|
||||||
|
|
||||||
//욕설 및 금지 단어 리스트 불러오기
|
//욕설 및 금지 단어 리스트 불러오기
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user