주소록 그룹삭제 기능 수정 -> grp 테이블에 delete y 처리 후 select에서 where delete='N' 만
가져오게 수정
This commit is contained in:
parent
6c43799f2b
commit
259f27d6cc
@ -1,138 +1,140 @@
|
|||||||
package itn.let.mjo.addr.service;
|
package itn.let.mjo.addr.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import itn.com.cmm.ComDefaultVO;
|
import itn.com.cmm.ComDefaultVO;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class AddrVO extends ComDefaultVO{
|
public class AddrVO extends ComDefaultVO{
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private int totcnt = 0;
|
private int totcnt = 0;
|
||||||
|
|
||||||
private String addrId; // 주소록ID
|
private String addrId; // 주소록ID
|
||||||
private String addrGrpId; // 주소록그룹ID
|
private String addrGrpId; // 주소록그룹ID
|
||||||
private String[] addrGrpIds; // 주소록그룹IDs
|
private String[] addrGrpIds; // 주소록그룹IDs
|
||||||
private String mberId; // 일반회원ID
|
private String mberId; // 일반회원ID
|
||||||
private String addrNm; // 주소록 이름
|
private String addrNm; // 주소록 이름
|
||||||
private String addrPhoneNo; // 휴대폰번호
|
private String addrPhoneNo; // 휴대폰번호
|
||||||
private String addrInfo1; // 치환1
|
private String addrInfo1; // 치환1
|
||||||
private String addrInfo2; // 치환2
|
private String addrInfo2; // 치환2
|
||||||
private String addrInfo3; // 치환3
|
private String addrInfo3; // 치환3
|
||||||
private String addrInfo4; // 치환4
|
private String addrInfo4; // 치환4
|
||||||
private String addrComment; // 메모
|
private String addrComment; // 메모
|
||||||
private String deleteYn; // 삭제여부
|
private String deleteYn; // 삭제여부
|
||||||
private String addrGrpNm; // 주소록 그룹명
|
private String addrGrpNm; // 주소록 그룹명
|
||||||
private String grpDelete; // 그룹삭제여부
|
private String grpDelete; // 그룹삭제여부
|
||||||
private String type; // 구분
|
private String type; // 구분
|
||||||
private String bookmark; // 자주보내는번호
|
private String bookmark; // 자주보내는번호
|
||||||
private String recvStatus; // 수신여부(S:직접등록, Y:수신승인, W:수신대기, N:수신거부)
|
private String recvStatus; // 수신여부(S:직접등록, Y:수신승인, W:수신대기, N:수신거부)
|
||||||
private String[] mergeGrps; // 합칠 그룹들 id
|
private String[] mergeGrps; // 합칠 그룹들 id
|
||||||
private String[] sendGrps; // 내보낼 그룹들 id
|
private String[] sendGrps; // 내보낼 그룹들 id
|
||||||
private String[] copyAddrs; // 내보낼 주소록들 id
|
private String[] copyAddrs; // 내보낼 주소록들 id
|
||||||
|
|
||||||
private String[] addrIds;
|
private String[] addrIds;
|
||||||
private String[] addrPhones;
|
private String[] addrPhones;
|
||||||
private String[] addrNms;
|
private String[] addrNms;
|
||||||
private String[] addrInfo1s;
|
private String[] addrInfo1s;
|
||||||
private String[] addrInfo2s;
|
private String[] addrInfo2s;
|
||||||
private String[] addrInfo3s;
|
private String[] addrInfo3s;
|
||||||
private String[] addrInfo4s;
|
private String[] addrInfo4s;
|
||||||
|
|
||||||
private String searchAddrGrpId;
|
private String searchAddrGrpId;
|
||||||
private String startKeyword;
|
private String startKeyword;
|
||||||
private String searchStartDate;
|
private String searchStartDate;
|
||||||
private String searchEndDate;
|
private String searchEndDate;
|
||||||
|
|
||||||
private String[] excelDownTitles;
|
private String[] excelDownTitles;
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
private List addrIdList;
|
private List addrIdList;
|
||||||
|
|
||||||
String[] phoneList;
|
String[] phoneList;
|
||||||
String[] nameList;
|
String[] nameList;
|
||||||
String[] info1List;
|
String[] info1List;
|
||||||
String[] info2List;
|
String[] info2List;
|
||||||
String[] info3List;
|
String[] info3List;
|
||||||
String[] info4List;
|
String[] info4List;
|
||||||
String[] memoList;
|
String[] memoList;
|
||||||
|
|
||||||
private int dupliCnt;
|
private int dupliCnt;
|
||||||
|
|
||||||
|
|
||||||
public String getFieldValue(String field) {
|
public String getFieldValue(String field) {
|
||||||
if("addrPhoneNo".equals(field)) {
|
if("addrPhoneNo".equals(field)) {
|
||||||
return this.addrPhoneNo;
|
return this.addrPhoneNo;
|
||||||
} else if("addrNm".equals(field)) {
|
} else if("addrNm".equals(field)) {
|
||||||
return this.addrNm;
|
return this.addrNm;
|
||||||
} else if("addrGrpNm".equals(field)) {
|
} else if("addrGrpNm".equals(field)) {
|
||||||
return this.addrGrpNm;
|
return this.addrGrpNm;
|
||||||
} else if("addrComment".equals(field)) {
|
} else if("addrComment".equals(field)) {
|
||||||
return this.addrComment;
|
return this.addrComment;
|
||||||
} else if("addrInfo1".equals(field)) {
|
} else if("addrInfo1".equals(field)) {
|
||||||
return this.addrInfo1;
|
return this.addrInfo1;
|
||||||
} else if("addrInfo2".equals(field)) {
|
} else if("addrInfo2".equals(field)) {
|
||||||
return this.addrInfo2;
|
return this.addrInfo2;
|
||||||
} else if("addrInfo3".equals(field)) {
|
} else if("addrInfo3".equals(field)) {
|
||||||
return this.addrInfo3;
|
return this.addrInfo3;
|
||||||
} else if("addrInfo4".equals(field)) {
|
} else if("addrInfo4".equals(field)) {
|
||||||
return this.addrInfo4;
|
return this.addrInfo4;
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getHeaderName(String field) {
|
public String getHeaderName(String field) {
|
||||||
if("addrPhoneNo".equals(field)) {
|
if("addrPhoneNo".equals(field)) {
|
||||||
return "휴대폰번호";
|
return "휴대폰번호";
|
||||||
} else if("addrNm".equals(field)) {
|
} else if("addrNm".equals(field)) {
|
||||||
return "이름";
|
return "이름";
|
||||||
} else if("addrGrpNm".equals(field)) {
|
} else if("addrGrpNm".equals(field)) {
|
||||||
return "주소록그룹명";
|
return "주소록그룹명";
|
||||||
} else if("addrComment".equals(field)) {
|
} else if("addrComment".equals(field)) {
|
||||||
return "메모";
|
return "메모";
|
||||||
} else if("addrInfo1".equals(field)) {
|
} else if("addrInfo1".equals(field)) {
|
||||||
return "[*1*]";
|
return "[*1*]";
|
||||||
} else if("addrInfo2".equals(field)) {
|
} else if("addrInfo2".equals(field)) {
|
||||||
return "[*2*]";
|
return "[*2*]";
|
||||||
} else if("addrInfo3".equals(field)) {
|
} else if("addrInfo3".equals(field)) {
|
||||||
return "[*3*]";
|
return "[*3*]";
|
||||||
} else if("addrInfo4".equals(field)) {
|
} else if("addrInfo4".equals(field)) {
|
||||||
return "[*4*]";
|
return "[*4*]";
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private String addrGroupNm;
|
private String addrGroupNm;
|
||||||
private String addrPhone;
|
private String addrPhone;
|
||||||
private String addrName;
|
private String addrName;
|
||||||
private String addrRep1;
|
private String addrRep1;
|
||||||
private String addrRep2;
|
private String addrRep2;
|
||||||
private String addrRep3;
|
private String addrRep3;
|
||||||
private String addrRep4;
|
private String addrRep4;
|
||||||
|
|
||||||
|
|
||||||
private int page = 1; // 기본 값 설정
|
private int page = 1; // 기본 값 설정
|
||||||
private int size = 10; // 기본 값 설정
|
private int size = 10; // 기본 값 설정
|
||||||
private int offset; // 기본 값 설정
|
private int offset; // 기본 값 설정
|
||||||
private String name;
|
private String name;
|
||||||
private String phone;
|
private String phone;
|
||||||
private String rep1;
|
private String rep1;
|
||||||
private String rep2;
|
private String rep2;
|
||||||
private String rep3;
|
private String rep3;
|
||||||
private String rep4;
|
private String rep4;
|
||||||
|
|
||||||
private int batchSize;
|
private int batchSize;
|
||||||
private int lastProcessedId;
|
private int lastProcessedId;
|
||||||
|
private int startIndex;
|
||||||
|
private int endIndex;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -1,296 +1,296 @@
|
|||||||
package itn.let.mjo.addr.service.impl;
|
package itn.let.mjo.addr.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
|
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
|
||||||
import itn.let.mjo.addr.service.AddrVO;
|
import itn.let.mjo.addr.service.AddrVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 관리를 위한 데이터 접근 클래스
|
* 주소록 관리를 위한 데이터 접근 클래스
|
||||||
* @author ITN
|
* @author ITN
|
||||||
* @since 2021.04.08
|
* @since 2021.04.08
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @see
|
* @see
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* << 개정이력(Modification Information) >>
|
* << 개정이력(Modification Information) >>
|
||||||
* 수정일 수정자 수정내용
|
* 수정일 수정자 수정내용
|
||||||
* ------- -------- ---------------------------
|
* ------- -------- ---------------------------
|
||||||
* 2021.04.08 ITN 최초 생성
|
* 2021.04.08 ITN 최초 생성
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
@Repository("AddrDAO")
|
@Repository("AddrDAO")
|
||||||
public class AddrDAO extends EgovAbstractDAO {
|
public class AddrDAO extends EgovAbstractDAO {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 목록
|
* 주소록 목록
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<AddrVO> selectAddrList(AddrVO addrVO) throws Exception {
|
public List<AddrVO> selectAddrList(AddrVO addrVO) throws Exception {
|
||||||
return (List<AddrVO>) list("AddrDAO.selectAddrList", addrVO);
|
return (List<AddrVO>) list("AddrDAO.selectAddrList", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int selectAddrListCount(AddrVO addrVO) throws Exception{
|
public int selectAddrListCount(AddrVO addrVO) throws Exception{
|
||||||
return (int)select("AddrDAO.selectAddrListCount", addrVO);
|
return (int)select("AddrDAO.selectAddrListCount", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 목록(속도개선)
|
* 주소록 목록(속도개선)
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<AddrVO> selectAddrNewList(AddrVO addrVO) throws Exception {
|
public List<AddrVO> selectAddrNewList(AddrVO addrVO) throws Exception {
|
||||||
return (List<AddrVO>) list("AddrDAO.selectAddrNewList", addrVO);
|
return (List<AddrVO>) list("AddrDAO.selectAddrNewList", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 상세보기
|
* 주소록 상세보기
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public AddrVO selectAddrDetail(AddrVO addrVO) throws Exception {
|
public AddrVO selectAddrDetail(AddrVO addrVO) throws Exception {
|
||||||
return (AddrVO) select("AddrDAO.selectAddrDetail", addrVO);
|
return (AddrVO) select("AddrDAO.selectAddrDetail", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 등록
|
* 주소록 등록
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void insertAddr(AddrVO addrVO) throws Exception {
|
public void insertAddr(AddrVO addrVO) throws Exception {
|
||||||
insert("AddrDAO.insertAddr", addrVO);
|
insert("AddrDAO.insertAddr", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 수정
|
* 주소록 수정
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int updateAddr(AddrVO addrVO) throws Exception {
|
public int updateAddr(AddrVO addrVO) throws Exception {
|
||||||
return update("AddrDAO.updateAddr", addrVO);
|
return update("AddrDAO.updateAddr", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 그룹 수정
|
* 주소록 그룹 수정
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int updateAddrGrp(AddrVO addrVO) throws Exception {
|
public int updateAddrGrp(AddrVO addrVO) throws Exception {
|
||||||
return update("AddrDAO.updateAddrGrp", addrVO);
|
return update("AddrDAO.updateAddrGrp", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 수정
|
* 주소록 수정
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int updateMemoAddr(AddrVO addrVO) throws Exception {
|
public int updateMemoAddr(AddrVO addrVO) throws Exception {
|
||||||
return update("AddrDAO.updateMemoAddr", addrVO);
|
return update("AddrDAO.updateMemoAddr", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 수정 By Admin
|
* 주소록 수정 By Admin
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int updateAddrByAdmin(AddrVO addrVO) throws Exception {
|
public int updateAddrByAdmin(AddrVO addrVO) throws Exception {
|
||||||
return update("AddrDAO.updateAddrByAdmin", addrVO);
|
return update("AddrDAO.updateAddrByAdmin", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 삭제
|
* 주소록 삭제
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int deleteAddr(AddrVO addrVO) throws Exception {
|
public int deleteAddr(AddrVO addrVO) throws Exception {
|
||||||
return delete("AddrDAO.deleteAddr", addrVO);
|
return delete("AddrDAO.deleteAddr", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 삭제 By Admin
|
* 주소록 삭제 By Admin
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int deleteAddrByAdmin(AddrVO addrVO) throws Exception {
|
public int deleteAddrByAdmin(AddrVO addrVO) throws Exception {
|
||||||
return delete("AddrDAO.deleteAddrByAdmin", addrVO);
|
return delete("AddrDAO.deleteAddrByAdmin", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 삭제 By Admin By Grpid
|
* 주소록 삭제 By Admin By Grpid
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int deleteAddrByAdminByGrpid(AddrVO addrVO) throws Exception {
|
public int deleteAddrByAdminByGrpid(AddrVO addrVO) throws Exception {
|
||||||
return delete("AddrDAO.deleteAddrByAdminByGrpid", addrVO);
|
return delete("AddrDAO.deleteAddrByAdminByGrpid", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 자주찾는번호 주소록 리스트 불러오기
|
* 자주찾는번호 주소록 리스트 불러오기
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<AddrVO> selectAddrBasicGrpList(AddrVO addrVO) throws Exception{
|
public List<AddrVO> selectAddrBasicGrpList(AddrVO addrVO) throws Exception{
|
||||||
return (List<AddrVO>) list("AddrDAO.selectAddrBasicGrpList", addrVO);
|
return (List<AddrVO>) list("AddrDAO.selectAddrBasicGrpList", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 전체 개수 조회
|
* 주소록 전체 개수 조회
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int selectAddrTotalCount(AddrVO addrVO) throws Exception{
|
public int selectAddrTotalCount(AddrVO addrVO) throws Exception{
|
||||||
return (int)select("AddrDAO.selectAddrTotalCount", addrVO);
|
return (int)select("AddrDAO.selectAddrTotalCount", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 복사하기 (select insert)
|
* 주소록 복사하기 (select insert)
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void insertCopyAddr(AddrVO addrVO) throws Exception{
|
public void insertCopyAddr(AddrVO addrVO) throws Exception{
|
||||||
update("AddrDAO.insertCopyAddr", addrVO);
|
update("AddrDAO.insertCopyAddr", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 그룹 합치기 - 주소록 데이터 그룹id 변경
|
* 그룹 합치기 - 주소록 데이터 그룹id 변경
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void updateAddrsGrp(AddrVO addrVO) throws Exception{
|
public void updateAddrsGrp(AddrVO addrVO) throws Exception{
|
||||||
update("AddrDAO.updateAddrsGrp", addrVO);
|
update("AddrDAO.updateAddrsGrp", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 등록 총 건수 및 정보 불러오기
|
* 주소록 등록 총 건수 및 정보 불러오기
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public List<?> selectAddrTotCntInfByUserId(AddrVO addrVO) throws Exception{
|
public List<?> selectAddrTotCntInfByUserId(AddrVO addrVO) throws Exception{
|
||||||
|
|
||||||
return (List<?>) list("AddrDAO.selectAddrTotCntInfByUserId", addrVO);
|
return (List<?>) list("AddrDAO.selectAddrTotCntInfByUserId", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int insertAddrList(List<AddrVO> addrList) throws Exception{
|
public int insertAddrList(List<AddrVO> addrList) throws Exception{
|
||||||
|
|
||||||
return update("AddrDAO.insertAddrList", addrList);
|
return update("AddrDAO.insertAddrList", addrList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int selectDuplAddrCnt(AddrVO addrVO) throws Exception{
|
public int selectDuplAddrCnt(AddrVO addrVO) throws Exception{
|
||||||
return (Integer)select("AddrDAO.selectDuplAddrCnt", addrVO);
|
return (Integer)select("AddrDAO.selectDuplAddrCnt", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 한 그룹에 속한 주소록의 전화번호 조회(중복체크용도)
|
* 주소록 한 그룹에 속한 주소록의 전화번호 조회(중복체크용도)
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<AddrVO> selectPhoneNumInAddrGroup(AddrVO addrVO) throws Exception{
|
public List<AddrVO> selectPhoneNumInAddrGroup(AddrVO addrVO) throws Exception{
|
||||||
return (List<AddrVO>) list("AddrDAO.selectPhoneNumInAddrGroup", addrVO);
|
return (List<AddrVO>) list("AddrDAO.selectPhoneNumInAddrGroup", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void insertCopyAddrs(AddrVO addrVO) throws Exception{
|
public void insertCopyAddrs(AddrVO addrVO) throws Exception{
|
||||||
insert("AddrDAO.insertCopyAddrs", addrVO);
|
insert("AddrDAO.insertCopyAddrs", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 선택한 주소록 문자전송 화면으로 보내기
|
* 선택한 주소록 문자전송 화면으로 보내기
|
||||||
* @param addrVO
|
* @param addrVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<AddrVO> selectAddrDataList(AddrVO addrVO) throws Exception{
|
public List<AddrVO> selectAddrDataList(AddrVO addrVO) throws Exception{
|
||||||
return (List<AddrVO>) list("AddrDAO.selectAddrDataList", addrVO);
|
return (List<AddrVO>) list("AddrDAO.selectAddrDataList", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 주소록 그룹별 중복 연락처 삭제
|
// 주소록 그룹별 중복 연락처 삭제
|
||||||
public int deleteAddrDupliList(AddrVO addrVO) throws Exception {
|
public int deleteAddrDupliList(AddrVO addrVO) throws Exception {
|
||||||
return delete("AddrDAO.deleteAddrDupliList", addrVO);
|
return delete("AddrDAO.deleteAddrDupliList", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 주소록 그룹별 중복 연락처 삭제
|
// 주소록 그룹별 중복 연락처 삭제
|
||||||
public int deleteAddrDupliListByGrpnm(AddrVO addrVO) throws Exception {
|
public int deleteAddrDupliListByGrpnm(AddrVO addrVO) throws Exception {
|
||||||
return delete("AddrDAO.deleteAddrDupliListByGrpnm", addrVO);
|
return delete("AddrDAO.deleteAddrDupliListByGrpnm", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 주소록 전체 중복 연락처 중 한개만 남기고 삭제
|
// 주소록 전체 중복 연락처 중 한개만 남기고 삭제
|
||||||
public int deleteAddrDupliListByAll(AddrVO addrVO) throws Exception {
|
public int deleteAddrDupliListByAll(AddrVO addrVO) throws Exception {
|
||||||
return delete("AddrDAO.deleteAddrDupliListByAll", addrVO);
|
return delete("AddrDAO.deleteAddrDupliListByAll", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 주소록 그룹별 중복 연락처 리스트 불러오기
|
// 주소록 그룹별 중복 연락처 리스트 불러오기
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<AddrVO> selectAddrDupliList(AddrVO addrVO) throws Exception{
|
public List<AddrVO> selectAddrDupliList(AddrVO addrVO) throws Exception{
|
||||||
return (List<AddrVO>) list("AddrDAO.selectAddrDupliList", addrVO);
|
return (List<AddrVO>) list("AddrDAO.selectAddrDupliList", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<AddrVO> selectAddrDupliListByGrpnm(AddrVO addrVO) throws Exception{
|
public List<AddrVO> selectAddrDupliListByGrpnm(AddrVO addrVO) throws Exception{
|
||||||
return (List<AddrVO>) list("AddrDAO.selectAddrDupliListByGrpnm", addrVO);
|
return (List<AddrVO>) list("AddrDAO.selectAddrDupliListByGrpnm", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 주소록 전체 중복 연락처 수
|
// 주소록 전체 중복 연락처 수
|
||||||
public int selectAddrDupliListByAllCnt(AddrVO addrVO) throws Exception{
|
public int selectAddrDupliListByAllCnt(AddrVO addrVO) throws Exception{
|
||||||
return (Integer)select("AddrDAO.selectAddrDupliListByAllCnt", addrVO);
|
return (Integer)select("AddrDAO.selectAddrDupliListByAllCnt", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 주소록 전체 중복 연락처 목록
|
// 주소록 전체 중복 연락처 목록
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<AddrVO> selectAddrDupliListByAll(AddrVO addrVO) throws Exception{
|
public List<AddrVO> selectAddrDupliListByAll(AddrVO addrVO) throws Exception{
|
||||||
return (List<AddrVO>) list("AddrDAO.selectAddrDupliListByAll", addrVO);
|
return (List<AddrVO>) list("AddrDAO.selectAddrDupliListByAll", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TEMP 주소록 중복 연락처 목록
|
// TEMP 주소록 중복 연락처 목록
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<AddrVO> selectTempAddrDupliList(AddrVO addrVO) throws Exception{
|
public List<AddrVO> selectTempAddrDupliList(AddrVO addrVO) throws Exception{
|
||||||
return (List<AddrVO>) list("AddrDAO.selectTempAddrDupliList", addrVO);
|
return (List<AddrVO>) list("AddrDAO.selectTempAddrDupliList", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TEMP 주소록 삭제
|
// TEMP 주소록 삭제
|
||||||
public int deleteTempAddr(AddrVO addrVO) throws Exception {
|
public int deleteTempAddr(AddrVO addrVO) throws Exception {
|
||||||
return delete("AddrDAO.deleteTempAddr", addrVO);
|
return delete("AddrDAO.deleteTempAddr", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TEMP 주소록 대량등록
|
// TEMP 주소록 대량등록
|
||||||
public int insertTempAddrList(List<AddrVO> addrList) throws Exception{
|
public int insertTempAddrList(List<AddrVO> addrList) throws Exception{
|
||||||
return update("AddrDAO.insertTempAddrList", addrList);
|
return update("AddrDAO.insertTempAddrList", addrList);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 주소록 대량등록 By Temp 주소록
|
// 주소록 대량등록 By Temp 주소록
|
||||||
public int insertAddrByTempAddr(AddrVO addrVO) throws Exception {
|
public int insertAddrByTempAddr(AddrVO addrVO) throws Exception {
|
||||||
return update("AddrDAO.insertAddrByTempAddr", addrVO);
|
return update("AddrDAO.insertAddrByTempAddr", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAddrCount(AddrVO addrVO) {
|
public int getAddrCount(AddrVO addrVO) {
|
||||||
return (Integer)select("AddrDAO.getAddrCount", addrVO);
|
return (Integer)select("AddrDAO.getAddrCount", addrVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,120 +1,124 @@
|
|||||||
package itn.let.mjo.addr.service.impl;
|
package itn.let.mjo.addr.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
|
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
|
||||||
import itn.let.mjo.addr.service.AddrGroupVO;
|
import itn.let.mjo.addr.service.AddrGroupVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 관리를 위한 데이터 접근 클래스
|
* 주소록 관리를 위한 데이터 접근 클래스
|
||||||
* @author ITN
|
* @author ITN
|
||||||
* @since 2021.04.08
|
* @since 2021.04.08
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @see
|
* @see
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* << 개정이력(Modification Information) >>
|
* << 개정이력(Modification Information) >>
|
||||||
* 수정일 수정자 수정내용
|
* 수정일 수정자 수정내용
|
||||||
* ------- -------- ---------------------------
|
* ------- -------- ---------------------------
|
||||||
* 2021.04.08 ITN 최초 생성
|
* 2021.04.08 ITN 최초 생성
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
@Repository("AddrGroupDAO")
|
@Repository("AddrGroupDAO")
|
||||||
public class AddrGroupDAO extends EgovAbstractDAO {
|
public class AddrGroupDAO extends EgovAbstractDAO {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 그룹 목록
|
* 주소록 그룹 목록
|
||||||
* @param addrGroupVO
|
* @param addrGroupVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<AddrGroupVO> selectAddrGroupList(AddrGroupVO addrGroupVO) throws Exception {
|
public List<AddrGroupVO> selectAddrGroupList(AddrGroupVO addrGroupVO) throws Exception {
|
||||||
return (List<AddrGroupVO>) list("AddrGroupDAO.selectAddrGroupList", addrGroupVO);
|
return (List<AddrGroupVO>) list("AddrGroupDAO.selectAddrGroupList", addrGroupVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 그룹 상세보기
|
* 주소록 그룹 상세보기
|
||||||
* @param addrGroupVO
|
* @param addrGroupVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public AddrGroupVO selectAddrGroupDetail(AddrGroupVO addrGroupVO) throws Exception {
|
public AddrGroupVO selectAddrGroupDetail(AddrGroupVO addrGroupVO) throws Exception {
|
||||||
return (AddrGroupVO) select("AddrGroupDAO.selectAddrGroupDetail", addrGroupVO);
|
return (AddrGroupVO) select("AddrGroupDAO.selectAddrGroupDetail", addrGroupVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 주소록 그룹 카운트 조회(전체)
|
// 주소록 그룹 카운트 조회(전체)
|
||||||
public AddrGroupVO selectAddrGroupTotCnt(AddrGroupVO addrGroupVO) throws Exception {
|
public AddrGroupVO selectAddrGroupTotCnt(AddrGroupVO addrGroupVO) throws Exception {
|
||||||
return (AddrGroupVO) select("AddrGroupDAO.selectAddrGroupTotCnt", addrGroupVO);
|
return (AddrGroupVO) select("AddrGroupDAO.selectAddrGroupTotCnt", addrGroupVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 주소록 그룹 카운트 조회(그룹미지정)
|
// 주소록 그룹 카운트 조회(그룹미지정)
|
||||||
public AddrGroupVO selectAddrGroupNogrpCnt(AddrGroupVO addrGroupVO) throws Exception {
|
public AddrGroupVO selectAddrGroupNogrpCnt(AddrGroupVO addrGroupVO) throws Exception {
|
||||||
return (AddrGroupVO) select("AddrGroupDAO.selectAddrGroupNogrpCnt", addrGroupVO);
|
return (AddrGroupVO) select("AddrGroupDAO.selectAddrGroupNogrpCnt", addrGroupVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 주소록 그룹 카운트 조회(자주보내는 번호)
|
// 주소록 그룹 카운트 조회(자주보내는 번호)
|
||||||
public AddrGroupVO selectAddrGroupBookmarkCnt(AddrGroupVO addrGroupVO) throws Exception {
|
public AddrGroupVO selectAddrGroupBookmarkCnt(AddrGroupVO addrGroupVO) throws Exception {
|
||||||
return (AddrGroupVO) select("AddrGroupDAO.selectAddrGroupBookmarkCnt", addrGroupVO);
|
return (AddrGroupVO) select("AddrGroupDAO.selectAddrGroupBookmarkCnt", addrGroupVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 그룹 등록
|
* 주소록 그룹 등록
|
||||||
* @param addrGroupVO
|
* @param addrGroupVO
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public String insertAddrGroup(AddrGroupVO addrGroupVO) throws Exception {
|
public String insertAddrGroup(AddrGroupVO addrGroupVO) throws Exception {
|
||||||
return (String) insert("AddrGroupDAO.insertAddrGroup", addrGroupVO);
|
return (String) insert("AddrGroupDAO.insertAddrGroup", addrGroupVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 그룹 수정
|
* 주소록 그룹 수정
|
||||||
* @param addrGroupVO
|
* @param addrGroupVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int updateAddrGroup(AddrGroupVO addrGroupVO) throws Exception {
|
public int updateAddrGroup(AddrGroupVO addrGroupVO) throws Exception {
|
||||||
return update("AddrGroupDAO.updateAddrGroup", addrGroupVO);
|
return update("AddrGroupDAO.updateAddrGroup", addrGroupVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 그룹 삭제
|
* 주소록 그룹 삭제
|
||||||
* @param addrGroupVO
|
* @param addrGroupVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int deleteAddrGroup(AddrGroupVO addrGroupVO) throws Exception {
|
public int deleteAddrGroup(AddrGroupVO addrGroupVO) throws Exception {
|
||||||
return delete("AddrGroupDAO.deleteAddrGroup", addrGroupVO);
|
return delete("AddrGroupDAO.deleteAddrGroup", addrGroupVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 그룹 삭제
|
* 주소록 그룹 삭제
|
||||||
* @param addrGroupVO
|
* @param addrGroupVO
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int deleteAddrGroupByAdmin(AddrGroupVO addrGroupVO) throws Exception {
|
public int deleteAddrGroupByAdmin(AddrGroupVO addrGroupVO) throws Exception {
|
||||||
return delete("AddrGroupDAO.deleteAddrGroupByAdmin", addrGroupVO);
|
return delete("AddrGroupDAO.deleteAddrGroupByAdmin", addrGroupVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록그룹명 중복체크
|
* 주소록그룹명 중복체크
|
||||||
* @param addrGroupVO
|
* @param addrGroupVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int selectDuplAddrGroupCnt(AddrGroupVO addrGroupVO) throws Exception{
|
public int selectDuplAddrGroupCnt(AddrGroupVO addrGroupVO) throws Exception{
|
||||||
return (Integer)select("AddrGroupDAO.selectDuplAddrGroupCnt", addrGroupVO);
|
return (Integer)select("AddrGroupDAO.selectDuplAddrGroupCnt", addrGroupVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주소록 그룹 다음 순서번호 확인
|
* 주소록 그룹 다음 순서번호 확인
|
||||||
* @param addrGroupVO
|
* @param addrGroupVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public int selectMaxOrderNumber(AddrGroupVO addrGroupVO) throws Exception{
|
public int selectMaxOrderNumber(AddrGroupVO addrGroupVO) throws Exception{
|
||||||
return (Integer)select("AddrGroupDAO.selectMaxOrderNumber", addrGroupVO);
|
return (Integer)select("AddrGroupDAO.selectMaxOrderNumber", addrGroupVO);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public void deleteAddrGroup_advc(AddrGroupVO addrGroupVO) {
|
||||||
|
update("AddrGroupDAO.deleteAddrGroup_advc", addrGroupVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,183 +1,204 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
|
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
|
||||||
<sqlMap namespace="AddrGroup">
|
<sqlMap namespace="AddrGroup">
|
||||||
<typeAlias alias="egovMap" type="egovframework.rte.psl.dataaccess.util.EgovMap"/>
|
<typeAlias alias="egovMap" type="egovframework.rte.psl.dataaccess.util.EgovMap"/>
|
||||||
<typeAlias alias="addrGroupVO" type="itn.let.mjo.addr.service.AddrGroupVO"/>
|
<typeAlias alias="addrGroupVO" type="itn.let.mjo.addr.service.AddrGroupVO"/>
|
||||||
|
|
||||||
<!-- 주소록 그룹 목록 조회 -->
|
<!-- 주소록 그룹 목록 조회 -->
|
||||||
<select id="AddrGroupDAO.selectAddrGroupList" parameterClass="addrGroupVO" resultClass="addrGroupVO">
|
<select id="AddrGroupDAO.selectAddrGroupList" parameterClass="addrGroupVO" resultClass="addrGroupVO">
|
||||||
SELECT
|
/* AddrGroupDAO.selectAddrGroupList */
|
||||||
COUNT(1) OVER() AS totCnt
|
SELECT
|
||||||
,A.ADDR_GRP_ID AS addrGrpId
|
COUNT(1) OVER() AS totCnt
|
||||||
,A.MBER_ID AS mberId
|
,A.ADDR_GRP_ID AS addrGrpId
|
||||||
,A.ADDR_GRP_NM AS addrGrpNm
|
,A.MBER_ID AS mberId
|
||||||
,A.FRST_REGIST_PNTTM AS frstRegistPnttm
|
,A.ADDR_GRP_NM AS addrGrpNm
|
||||||
,A.DELETE_YN AS deleteYn
|
,A.FRST_REGIST_PNTTM AS frstRegistPnttm
|
||||||
,IFNULL(a.GRP_ORDER, '0') AS grpOrder
|
,A.DELETE_YN AS deleteYn
|
||||||
,(SELECT COUNT(1) FROM MJ_ADDR WHERE ADDR_GRP_ID = A.ADDR_GRP_ID) AS grpCount
|
,IFNULL(a.GRP_ORDER, '0') AS grpOrder
|
||||||
FROM
|
,(SELECT COUNT(1) FROM MJ_ADDR WHERE ADDR_GRP_ID = A.ADDR_GRP_ID) AS grpCount
|
||||||
MJ_ADDR_GRP A
|
FROM
|
||||||
LEFT OUTER JOIN
|
MJ_ADDR_GRP A
|
||||||
MJ_ADDR_TRANS_HIST B
|
LEFT OUTER JOIN
|
||||||
ON
|
MJ_ADDR_TRANS_HIST B
|
||||||
A.ADDR_GRP_ID = B.ADDR_GRP_ID
|
ON
|
||||||
WHERE
|
A.ADDR_GRP_ID = B.ADDR_GRP_ID
|
||||||
(B.RECV_STATUS = 'Y' OR B.RECV_STATUS IS NULL)
|
WHERE
|
||||||
<isNotEmpty property="mberId">
|
(B.RECV_STATUS = 'Y' OR B.RECV_STATUS IS NULL)
|
||||||
AND A.MBER_ID = #mberId#
|
<isNotEmpty property="mberId">
|
||||||
</isNotEmpty>
|
AND A.MBER_ID = #mberId#
|
||||||
<isNotEmpty property="searchKeyword">
|
</isNotEmpty>
|
||||||
<isEqual property="searchCondition" compareValue="">
|
AND A.DELETE_YN = 'N'
|
||||||
AND ( A.MBER_ID LIKE CONCAT ('%', #searchKeyword#,'%')
|
<isNotEmpty property="searchKeyword">
|
||||||
OR A.ADDR_GRP_NM LIKE CONCAT ('%', #searchKeyword#,'%')
|
<isEqual property="searchCondition" compareValue="">
|
||||||
)
|
AND ( A.MBER_ID LIKE CONCAT ('%', #searchKeyword#,'%')
|
||||||
</isEqual>
|
OR A.ADDR_GRP_NM LIKE CONCAT ('%', #searchKeyword#,'%')
|
||||||
<isEqual property="searchCondition" compareValue="1">
|
)
|
||||||
AND A.MBER_ID LIKE CONCAT ('%', #searchKeyword#,'%')
|
</isEqual>
|
||||||
</isEqual>
|
<isEqual property="searchCondition" compareValue="1">
|
||||||
<isEqual property="searchCondition" compareValue="2">
|
AND A.MBER_ID LIKE CONCAT ('%', #searchKeyword#,'%')
|
||||||
AND A.ADDR_GRP_NM LIKE CONCAT ('%', #searchKeyword#,'%')
|
</isEqual>
|
||||||
</isEqual>
|
<isEqual property="searchCondition" compareValue="2">
|
||||||
</isNotEmpty>
|
AND A.ADDR_GRP_NM LIKE CONCAT ('%', #searchKeyword#,'%')
|
||||||
GROUP BY A.ADDR_GRP_ID
|
</isEqual>
|
||||||
<isNotEqual property="siteId" compareValue="admin">
|
</isNotEmpty>
|
||||||
ORDER BY A.GRP_ORDER
|
GROUP BY A.ADDR_GRP_ID
|
||||||
<isNotEmpty property="searchSortCnd">
|
<isNotEqual property="siteId" compareValue="admin">
|
||||||
,$searchSortCnd$
|
ORDER BY A.GRP_ORDER
|
||||||
</isNotEmpty>
|
<isNotEmpty property="searchSortCnd">
|
||||||
</isNotEqual>
|
,$searchSortCnd$
|
||||||
<isEqual property="siteId" compareValue="admin">
|
</isNotEmpty>
|
||||||
ORDER BY A.ADDR_GRP_ID DESC
|
</isNotEqual>
|
||||||
<isNotEmpty property="searchSortCnd">
|
<isEqual property="siteId" compareValue="admin">
|
||||||
,$searchSortCnd$
|
ORDER BY A.ADDR_GRP_ID DESC
|
||||||
</isNotEmpty>
|
<isNotEmpty property="searchSortCnd">
|
||||||
</isEqual>
|
,$searchSortCnd$
|
||||||
|
</isNotEmpty>
|
||||||
<isEqual property="siteId" compareValue="admin">
|
</isEqual>
|
||||||
LIMIT #recordCountPerPage# OFFSET #firstIndex#
|
|
||||||
</isEqual>
|
<isEqual property="siteId" compareValue="admin">
|
||||||
</select>
|
LIMIT #recordCountPerPage# OFFSET #firstIndex#
|
||||||
|
</isEqual>
|
||||||
<!-- 주소록 그룹 상세 조회 -->
|
</select>
|
||||||
<select id="AddrGroupDAO.selectAddrGroupDetail" parameterClass="addrGroupVO" resultClass="addrGroupVO">
|
|
||||||
SELECT
|
<!-- 주소록 그룹 상세 조회 -->
|
||||||
a.ADDR_GRP_ID AS addrGrpId
|
<select id="AddrGroupDAO.selectAddrGroupDetail" parameterClass="addrGroupVO" resultClass="addrGroupVO">
|
||||||
,a.MBER_ID AS mberId
|
SELECT
|
||||||
,a.ADDR_GRP_NM AS addrGrpNm
|
a.ADDR_GRP_ID AS addrGrpId
|
||||||
FROM
|
,a.MBER_ID AS mberId
|
||||||
MJ_ADDR_GRP a
|
,a.ADDR_GRP_NM AS addrGrpNm
|
||||||
WHERE 1=1
|
FROM
|
||||||
AND a.ADDR_GRP_ID = #addrGrpId#
|
MJ_ADDR_GRP a
|
||||||
</select>
|
WHERE 1=1
|
||||||
|
AND a.ADDR_GRP_ID = #addrGrpId#
|
||||||
<select id="AddrGroupDAO.selectAddrGroupTotCnt" parameterClass="addrGroupVO" resultClass="addrGroupVO">
|
</select>
|
||||||
/* AddrGroupDAO.selectAddrGroupTotCnt */
|
|
||||||
SELECT
|
<select id="AddrGroupDAO.selectAddrGroupTotCnt" parameterClass="addrGroupVO" resultClass="addrGroupVO">
|
||||||
COUNT(0) AS addrTotCnt
|
/* AddrGroupDAO.selectAddrGroupTotCnt */
|
||||||
FROM MJ_ADDR A
|
SELECT
|
||||||
WHERE A.MBER_ID = #mberId#
|
COUNT(0) AS addrTotCnt
|
||||||
AND (A.RECV_STATUS = 'Y' OR A.RECV_STATUS = 'S' OR A.RECV_STATUS IS NULL)
|
FROM MJ_ADDR A
|
||||||
AND A.DELETE_YN = 'N'
|
WHERE A.MBER_ID = #mberId#
|
||||||
</select>
|
AND (A.RECV_STATUS = 'Y' OR A.RECV_STATUS = 'S' OR A.RECV_STATUS IS NULL)
|
||||||
|
AND A.DELETE_YN = 'N'
|
||||||
<!-- 주소록 그룹 카운트 조회(그룹미지정) -->
|
</select>
|
||||||
<select id="AddrGroupDAO.selectAddrGroupNogrpCnt" parameterClass="addrGroupVO" resultClass="addrGroupVO">
|
|
||||||
SELECT
|
<!-- 주소록 그룹 카운트 조회(그룹미지정) -->
|
||||||
COUNT(0) AS nogrpCnt
|
<select id="AddrGroupDAO.selectAddrGroupNogrpCnt" parameterClass="addrGroupVO" resultClass="addrGroupVO">
|
||||||
FROM MJ_ADDR A
|
/* AddrGroupDAO.selectAddrGroupNogrpCnt */
|
||||||
WHERE A.MBER_ID = #mberId#
|
SELECT
|
||||||
AND A.ADDR_GRP_ID = '0'
|
COUNT(0) AS nogrpCnt
|
||||||
AND A.BOOKMARK = 'N'
|
FROM MJ_ADDR A
|
||||||
AND A.DELETE_YN = 'N'
|
WHERE A.MBER_ID = #mberId#
|
||||||
</select>
|
AND A.ADDR_GRP_ID = '0'
|
||||||
|
AND A.BOOKMARK = 'N'
|
||||||
<!-- 주소록 그룹 카운트 조회(그룹미지정) -->
|
AND A.DELETE_YN = 'N'
|
||||||
<select id="AddrGroupDAO.selectAddrGroupBookmarkCnt" parameterClass="addrGroupVO" resultClass="addrGroupVO">
|
</select>
|
||||||
SELECT
|
|
||||||
COUNT(0) AS bookmarkCnt
|
<!-- 주소록 그룹 카운트 조회(그룹미지정) -->
|
||||||
FROM MJ_ADDR A
|
<select id="AddrGroupDAO.selectAddrGroupBookmarkCnt" parameterClass="addrGroupVO" resultClass="addrGroupVO">
|
||||||
WHERE A.MBER_ID = #mberId#
|
SELECT
|
||||||
AND A.BOOKMARK = 'Y'
|
COUNT(0) AS bookmarkCnt
|
||||||
AND A.DELETE_YN = 'N'
|
FROM MJ_ADDR A
|
||||||
</select>
|
WHERE A.MBER_ID = #mberId#
|
||||||
|
AND A.BOOKMARK = 'Y'
|
||||||
<!-- 주소록 그룹 등록 -->
|
AND A.DELETE_YN = 'N'
|
||||||
<insert id="AddrGroupDAO.insertAddrGroup" parameterClass="addrGroupVO">
|
</select>
|
||||||
INSERT INTO MJ_ADDR_GRP (
|
|
||||||
MBER_ID
|
<!-- 주소록 그룹 등록 -->
|
||||||
,ADDR_GRP_NM
|
<insert id="AddrGroupDAO.insertAddrGroup" parameterClass="addrGroupVO">
|
||||||
,GRP_ORDER
|
INSERT INTO MJ_ADDR_GRP (
|
||||||
,FRST_REGIST_PNTTM
|
MBER_ID
|
||||||
,FRST_REGISTER_ID
|
,ADDR_GRP_NM
|
||||||
)VALUES(
|
,GRP_ORDER
|
||||||
#mberId#
|
,FRST_REGIST_PNTTM
|
||||||
,#addrGrpNm#
|
,FRST_REGISTER_ID
|
||||||
,#grpOrder#
|
)VALUES(
|
||||||
,NOW()
|
#mberId#
|
||||||
,#frstRegisterId#
|
,#addrGrpNm#
|
||||||
)
|
,#grpOrder#
|
||||||
<selectKey keyProperty="addrGrpId" resultClass="String">
|
,NOW()
|
||||||
SELECT LAST_INSERT_ID()
|
,#frstRegisterId#
|
||||||
</selectKey>
|
)
|
||||||
</insert>
|
<selectKey keyProperty="addrGrpId" resultClass="String">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
<!-- 주소록 그룹수정 -->
|
</selectKey>
|
||||||
<update id="AddrGroupDAO.updateAddrGroup" parameterClass="addrGroupVO">
|
</insert>
|
||||||
UPDATE
|
|
||||||
MJ_ADDR_GRP
|
<!-- 주소록 그룹수정 -->
|
||||||
SET
|
<update id="AddrGroupDAO.updateAddrGroup" parameterClass="addrGroupVO">
|
||||||
ADDR_GRP_NM = #addrGrpNm#
|
UPDATE
|
||||||
,GRP_ORDER = #grpOrder#
|
MJ_ADDR_GRP
|
||||||
,LAST_UPDT_PNTTM = NOW()
|
SET
|
||||||
,LAST_UPDUSR_ID = #lastUpdusrId#
|
ADDR_GRP_NM = #addrGrpNm#
|
||||||
WHERE
|
,GRP_ORDER = #grpOrder#
|
||||||
MBER_ID = #mberId#
|
,LAST_UPDT_PNTTM = NOW()
|
||||||
AND
|
,LAST_UPDUSR_ID = #lastUpdusrId#
|
||||||
ADDR_GRP_ID = #addrGrpId#
|
WHERE
|
||||||
</update>
|
MBER_ID = #mberId#
|
||||||
|
AND
|
||||||
<!-- 주소록 그룹삭제 -->
|
ADDR_GRP_ID = #addrGrpId#
|
||||||
<delete id="AddrGroupDAO.deleteAddrGroup" parameterClass="addrGroupVO">
|
</update>
|
||||||
DELETE FROM
|
|
||||||
MJ_ADDR_GRP
|
<!-- 주소록 그룹삭제 -->
|
||||||
WHERE
|
<delete id="AddrGroupDAO.deleteAddrGroup" parameterClass="addrGroupVO">
|
||||||
MBER_ID = #mberId#
|
DELETE FROM
|
||||||
<isEmpty property="mergeGrps">
|
MJ_ADDR_GRP
|
||||||
AND
|
WHERE
|
||||||
ADDR_GRP_ID = #addrGrpId#
|
MBER_ID = #mberId#
|
||||||
</isEmpty>
|
<isEmpty property="mergeGrps">
|
||||||
<isNotEmpty property="mergeGrps">
|
AND
|
||||||
AND
|
ADDR_GRP_ID = #addrGrpId#
|
||||||
ADDR_GRP_ID in (#mergeGrps#)
|
</isEmpty>
|
||||||
</isNotEmpty>
|
<isNotEmpty property="mergeGrps">
|
||||||
</delete>
|
AND
|
||||||
|
ADDR_GRP_ID in (#mergeGrps#)
|
||||||
<!-- 주소록 그룹삭제 By Admin -->
|
</isNotEmpty>
|
||||||
<delete id="AddrGroupDAO.deleteAddrGroupByAdmin" parameterClass="addrGroupVO">
|
</delete>
|
||||||
DELETE FROM
|
|
||||||
MJ_ADDR_GRP
|
<!-- 주소록 그룹삭제 -->
|
||||||
WHERE ADDR_GRP_ID = #addrGrpId#
|
<delete id="AddrGroupDAO.deleteAddrGroup_advc" parameterClass="addrGroupVO">
|
||||||
</delete>
|
/* AddrGroupDAO.deleteAddrGroup_advc*/
|
||||||
|
|
||||||
<!-- 주소록 그룹명 중복확인 -->
|
|
||||||
<select id="AddrGroupDAO.selectDuplAddrGroupCnt" parameterClass="addrGroupVO" resultClass="int">
|
UPDATE
|
||||||
SELECT
|
MJ_ADDR_GRP
|
||||||
COUNT(1) usedCnt
|
SET
|
||||||
FROM
|
DELETE_YN = 'Y'
|
||||||
MJ_ADDR_GRP
|
,LAST_UPDT_PNTTM = NOW()
|
||||||
WHERE
|
,LAST_UPDUSR_ID = #lastUpdusrId#
|
||||||
ADDR_GRP_NM = #addrGrpNm#
|
WHERE
|
||||||
AND
|
MBER_ID = #mberId#
|
||||||
MBER_ID = #mberId#
|
AND
|
||||||
</select>
|
ADDR_GRP_ID = #addrGrpId#
|
||||||
|
|
||||||
<!-- 주소록 그룹 다음 순서번호 확인 -->
|
</delete>
|
||||||
<select id="AddrGroupDAO.selectMaxOrderNumber" parameterClass="addrGroupVO" resultClass="int">
|
|
||||||
SELECT
|
<!-- 주소록 그룹삭제 By Admin -->
|
||||||
IFNULL(MAX(GRP_ORDER),0)+1 nextOrderNumber
|
<delete id="AddrGroupDAO.deleteAddrGroupByAdmin" parameterClass="addrGroupVO">
|
||||||
FROM
|
DELETE FROM
|
||||||
MJ_ADDR_GRP
|
MJ_ADDR_GRP
|
||||||
WHERE
|
WHERE ADDR_GRP_ID = #addrGrpId#
|
||||||
MBER_ID = #mberId#
|
</delete>
|
||||||
</select>
|
|
||||||
</sqlMap>
|
<!-- 주소록 그룹명 중복확인 -->
|
||||||
|
<select id="AddrGroupDAO.selectDuplAddrGroupCnt" parameterClass="addrGroupVO" resultClass="int">
|
||||||
|
SELECT
|
||||||
|
COUNT(1) usedCnt
|
||||||
|
FROM
|
||||||
|
MJ_ADDR_GRP
|
||||||
|
WHERE
|
||||||
|
ADDR_GRP_NM = #addrGrpNm#
|
||||||
|
AND
|
||||||
|
MBER_ID = #mberId#
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 주소록 그룹 다음 순서번호 확인 -->
|
||||||
|
<select id="AddrGroupDAO.selectMaxOrderNumber" parameterClass="addrGroupVO" resultClass="int">
|
||||||
|
SELECT
|
||||||
|
IFNULL(MAX(GRP_ORDER),0)+1 nextOrderNumber
|
||||||
|
FROM
|
||||||
|
MJ_ADDR_GRP
|
||||||
|
WHERE
|
||||||
|
MBER_ID = #mberId#
|
||||||
|
</select>
|
||||||
|
</sqlMap>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user