package itn.let.lett.service.impl; import java.util.List; import org.springframework.stereotype.Repository; import egovframework.rte.psl.dataaccess.EgovAbstractDAO; import itn.let.lett.service.CateConfVO; import itn.let.lett.service.HashConfVO; import itn.let.lett.service.LetterVO; import itn.let.sym.ccm.cde.service.CateCode; import itn.let.uss.umt.service.UserDefaultVO; @Repository("LetterDAO") public class LetterDAO extends EgovAbstractDAO { @SuppressWarnings("unchecked") public List selectLetterMessageCategoryList() throws Exception{ return (List) list("LetterDAO.selectLetterMessageCategoryList"); } public int insertLetterMessages(LetterVO letterVO) throws Exception{ // 결과 리턴을 위해서 insert 이지만 update로 써준다 return (int) update("LetterDAO.insertLetterMessages", letterVO); } public List selectLetterMessageList(UserDefaultVO userSearchVO) throws Exception{ return list("LetterDAO.selectLetterMessageList", userSearchVO); } public void deleteLetterMessage(String checkedIdForDel) throws Exception{ update("LetterDAO.deleteLetterMessage", checkedIdForDel); } public LetterVO letterMessagesDetail(LetterVO letterVO) throws Exception{ return (LetterVO) select("LetterDAO.letterMessagesDetail", letterVO); } public int updateLetterMessages(LetterVO letterVO) throws Exception{ return update("LetterDAO.updateLetterMessages", letterVO); } @SuppressWarnings("unchecked") public List selectCateCodeTwoDptWithList(CateCode cateCode) throws Exception{ return (List) list("LetterDAO.selectCateCodeTwoDptWithList", cateCode); } @SuppressWarnings("unchecked") public List selectCateCodeThrDptWithList(CateCode cateCode) throws Exception{ return (List) list("LetterDAO.selectCateCodeThrDptWithList", cateCode); } @SuppressWarnings("unchecked") public List selectPhotoCateCodeWithList(CateCode cateCode) throws Exception{ return (List) list("LetterDAO.selectPhotoCateCodeWithList", cateCode); } @SuppressWarnings("unchecked") public List selectCateConfWithList(String categoryType) throws Exception{ return (List) list("LetterDAO.selectCateConfWithList", categoryType); } @SuppressWarnings("unchecked") public List selectCateConfWithList4Main(String categoryType) throws Exception{ return (List) list("LetterDAO.selectCateConfWithList4Main", categoryType); } @SuppressWarnings("unchecked") public List selectCateConfTwoDepthWithList(String categoryType) throws Exception{ return (List) list("LetterDAO.selectCateConfTwoDepthWithList", categoryType); } @SuppressWarnings("unchecked") public List selectCateConfThreeDepthWithList(CateCode cateCode) throws Exception{ return (List) list("LetterDAO.selectCateConfThreeDepthWithList", cateCode); } @SuppressWarnings("unchecked") public List selectHashTagWithList(String msgType) throws Exception{ return (List) list("LetterDAO.selectHashTagWithList", msgType); } public int insertletterPhotosInfo(LetterVO letterVO) throws Exception{ return (int) update("LetterDAO.insertletterPhotosInfo", letterVO); } public List selectLetterPhotosList(UserDefaultVO userSearchVO) throws Exception{ return list("LetterDAO.selectLetterPhotosList", userSearchVO); } @SuppressWarnings("unchecked") public List selectPhotoCateCodeListWithId(String cateCode) throws Exception{ return (List) list("LetterDAO.selectPhotoCateCodeListWithId", cateCode); } public LetterVO selectPhotosDetail(LetterVO letterVO) throws Exception{ return (LetterVO) select("LetterDAO.selectPhotosDetail", letterVO); } public LetterVO selectPhotoFileList(String attchFileId) throws Exception{ return (LetterVO) select("LetterDAO.selectPhotoFileList", attchFileId); } public int updateLetterPhotosInfo(LetterVO letterVO) throws Exception{ return update("LetterDAO.updateLetterPhotosInfo", letterVO); } // 문자 발송 카테고리 관리 public int insertCategoryConf(CateConfVO cateConfVO) throws Exception{ //카테고리 번호로 카테고리 이름 받아오기 String categoryCode = cateConfVO.getCategoryCode(); @SuppressWarnings("unchecked") List cateCodeList = (List) list("LetterDAO.selectPhotoCateCodeListWithId", categoryCode); //받아온 카테고리 리스트에서 맞는 이름 셋팅해주기 for(CateCode categoryNm : cateCodeList) { if(categoryCode.equals(categoryNm.getCateNo())) { cateConfVO.setCategoryNm(categoryNm.getCateNm()); } } // 문자 발송 카테고리 정보 입력하기 return update("LetterDAO.insertCategoryConf", cateConfVO); } public List selectCategoryConfList(UserDefaultVO userSearchVO) throws Exception{ return list("LetterDAO.selectCategoryConfList", userSearchVO); } public CateConfVO categoryConfDetail(CateConfVO cateConfVO) throws Exception{ return (CateConfVO) select("LetterDAO.categoryConfDetail", cateConfVO); } public void deleteCategoryConf(String checkedIdForDel) throws Exception{ delete("LetterDAO.deleteCategoryConf", checkedIdForDel); } public int updateCategoryConf(CateConfVO cateConfVO) throws Exception{ //카테고리 번호로 카테고리 이름 받아오기 String categoryCode = cateConfVO.getCategoryCode(); @SuppressWarnings("unchecked") List cateCodeList = (List) list("LetterDAO.selectPhotoCateCodeListWithId", categoryCode); //받아온 카테고리 리스트에서 맞는 이름 셋팅해주기 for(CateCode categoryNm : cateCodeList) { if(categoryCode.equals(categoryNm.getCateNo())) { cateConfVO.setCategoryNm(categoryNm.getCateNm()); } } return update("LetterDAO.updateCategoryConf", cateConfVO); } public int insertHashTagConf(HashConfVO hashConfVO) throws Exception{ return update("LetterDAO.insertHashTagConf", hashConfVO); } public List selectHashTagConfList(UserDefaultVO userSearchVO) throws Exception{ return list("LetterDAO.selectHashTagConfList", userSearchVO); } public HashConfVO hashTagConfDetail(HashConfVO hashConfVO) throws Exception{ return (HashConfVO) select("LetterDAO.hashTagConfDetail", hashConfVO); } public int updateHashTagConf(HashConfVO hashConfVO) throws Exception{ return update("LetterDAO.updateHashTagConf", hashConfVO); } public void deleteHashTagConf(String checkedIdForDel) throws Exception{ delete("LetterDAO.deleteHashTagConf", checkedIdForDel); } // 맞춤제작 그림문자 리스트 불러오기 public List selectLetterPhotosCustomList(UserDefaultVO userSearchVO) throws Exception{ return list("LetterDAO.selectLetterPhotosCustomList", userSearchVO); } // 문자템플릿 사용 누계 public int updateTemplateUseCount(String attachFileId) throws Exception { return update("LetterDAO.updateTemplateUseCount", attachFileId); } public int updateChkAfterPriorityPlus(LetterVO letterVO) throws Exception { return update("LetterDAO.updateChkAfterPriorityPlus", letterVO); } public int updateChkListPriority(LetterVO letterVO) throws Exception { return update("LetterDAO.updateChkListPriority", letterVO); } public int updateOrderByPriority(LetterVO letterVO) throws Exception { return update("LetterDAO.updateOrderByPriority", letterVO); } public int updateNullPriority(LetterVO letterVO) throws Exception { return update("LetterDAO.updateNullPriority", letterVO); } public int updateChkCateAfterSortPlus(LetterVO letterVO) throws Exception { return update("LetterDAO.updateChkCateAfterSortPlus", letterVO); } public int updateChkCateListSort(LetterVO letterVO) throws Exception { return update("LetterDAO.updateChkCateListSort", letterVO); } public int updateCateOrderBySort(LetterVO letterVO) throws Exception { return update("LetterDAO.updateCateOrderBySort", letterVO); } public int updateCateNullSort(LetterVO letterVO) throws Exception { return update("LetterDAO.updateCateNullSort", letterVO); } public int updateChkTagAfterSortPlus(LetterVO letterVO) throws Exception { return update("LetterDAO.updateChkTagAfterSortPlus", letterVO); } public int updateChkTagListSort(LetterVO letterVO) throws Exception { return update("LetterDAO.updateChkTagListSort", letterVO); } public int updateTagOrderBySort(LetterVO letterVO) throws Exception { return update("LetterDAO.updateTagOrderBySort", letterVO); } public int updateTagNullSort(LetterVO letterVO) throws Exception { return update("LetterDAO.updateTagNullSort", letterVO); } //검색어 욕설 및 금지 단어 검색 public int selectSwearWordSearchCnt(String searchKeyWord) throws Exception{ return (int) select("LetterDAO.selectSwearWordSearchCnt", searchKeyWord); } // 문자템플릿 조회 누계 public int updateSmsTemplateViewCount(String letterId) throws Exception { return update("LetterDAO.updateSmsTemplateViewCount", letterId); } // 제목, 해쉬태그 일괄변경 public int updateHashTagList(LetterVO letterVO) throws Exception { return update("LetterDAO.updateHashTagList", letterVO); } // 메인태그 관리 @SuppressWarnings("unchecked") public List selectMainTagList(LetterVO letterVO) throws Exception{ return (List) list("LetterDAO.selectMainTagList", letterVO); } // 메인태그 상세 public LetterVO selectMainTagDetail(LetterVO letterVO) throws Exception{ return (LetterVO) select("LetterDAO.selectMainTagDetail", letterVO); } // 메인태그 등록 public void insertMainTag(LetterVO letterVO) throws Exception{ insert("LetterDAO.insertMainTag", letterVO); } // 메인태그 수정 public void updateMainTag(LetterVO letterVO) throws Exception{ update("LetterDAO.updateMainTag", letterVO); } @SuppressWarnings("unchecked") public List selectMainTagWebList(LetterVO letterVO) throws Exception{ return (List) list("LetterDAO.selectMainTagWebList", letterVO); } public LetterVO selectFrsKeyword(LetterVO letterVO) throws Exception{ return (LetterVO) select("LetterDAO.selectFrsKeyword", letterVO); } }