TC 기능 수정 / 디자인 수정 변경

This commit is contained in:
kimre
2022-07-15 14:21:03 +09:00
parent a4e5cde9f6
commit 34e7957081
91 changed files with 9087 additions and 8673 deletions

View File

@@ -2,17 +2,18 @@ package kr.co.uplus.ez.api.attractMgt;
import kr.co.uplus.ez.api.attractMgt.dto.*;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ApiResponseMessage;
import kr.co.uplus.ez.common.data.Const;
import kr.co.uplus.ez.common.data.Paging;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Service;
import org.thymeleaf.util.StringUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class AttractMgtService {
@@ -30,12 +31,22 @@ public class AttractMgtService {
* auth : ckr
* desc : 유치채널 목록조회
* @param channelListReqDto
* @return
* @return
*/
@SuppressWarnings("rawtypes")
public ChannelListResDto channelList(ChannelListReqDto channelListReqDto) {
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
String nowPage = String.valueOf(channelListReqDto.getPage());
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserDetails userDetails = (UserDetails) principal;
String attrctorId = userDetails.getUsername();
ArrayList auth = (ArrayList) userDetails.getAuthorities();
if(StringUtils.equals(Const.AUTH_CD_AGENCY, auth.get(0).toString())){
channelListReqDto.setAttrctorId(attrctorId);
}
int totalCnt = attractMgtMapper.selectAttractListTotalCnt(channelListReqDto);
if (totalCnt == 0) {
@@ -74,7 +85,7 @@ public class AttractMgtService {
* auth : ckr
* desc : 유치채널 목록 엑셀 다운로드
* @param channelListExcelReqDto
* @return
* @return
*/
public ChannelListExcelResDto channelListExcel(ChannelListExcelReqDto channelListExcelReqDto) {
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
@@ -90,7 +101,7 @@ public class AttractMgtService {
* auth : ckr
* desc : 유치 채널 상세 조회
* @param channelDetailReqDto
* @return
* @return
*/
public ChannelDetailResDto channelDetail(ChannelDetailReqDto channelDetailReqDto) {
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
@@ -107,7 +118,7 @@ public class AttractMgtService {
* auth : ckr
* desc : 발송건수 엑셀 다운로드
* @param channelListExcelReqDto
* @return
* @return
*/
public ChannelDetailResDto sendNumberListExcel(ChannelDetailReqDto channelDetailReqDto) {
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
@@ -115,8 +126,8 @@ public class AttractMgtService {
ChannelDetailRes channelDetailRes = new ChannelDetailRes();
List<ChannelDetail> channelDetails = attractMgtMapper.sendNumberListExcel(channelDetailReqDto);
channelDetailRes.setList(channelDetails);
return new ChannelDetailResDto(ApiResponseCode.SUCCESS, channelDetailRes);
}

View File

@@ -9,27 +9,27 @@ import java.io.Serializable;
@Data
public class ChannelDetail implements Serializable {
@ApiModelProperty(example = "날짜", name = "날짜", dataType = "String")
@ApiModelProperty(example = "20220101", name = "날짜", dataType = "String")
private String sumYm;
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "전체발송건수", dataType = "String")
private String sndCnt;
@ApiModelProperty(example = "전체 성공건수", name = "전체 성공건수", dataType = "String")
@ApiModelProperty(example = "99", name = "전체 성공건수", dataType = "String")
private String succCnt;
@ApiModelProperty(example = "SMS발송건수", name = "SMS발송건수", dataType = "String")
@ApiModelProperty(example = "10", name = "SMS발송건수", dataType = "String")
private String sndCntS;
@ApiModelProperty(example = "SMS 성공건수", name = "SMS 성공건수", dataType = "String")
@ApiModelProperty(example = "10", name = "SMS 성공건수", dataType = "String")
private String succCntS;
@ApiModelProperty(example = "LMS발송건수", name = "LMS발송건수", dataType = "String")
@ApiModelProperty(example = "10", name = "LMS발송건수", dataType = "String")
private String sndCntL;
@ApiModelProperty(example = "LMS 성공건수", name = "LMS 성공건수", dataType = "String")
@ApiModelProperty(example = "10", name = "LMS 성공건수", dataType = "String")
private String succCntL;
@ApiModelProperty(example = "MMS발송건수", name = "MMS발송건수", dataType = "String")
@ApiModelProperty(example = "10", name = "MMS발송건수", dataType = "String")
private String sndCntM;
@ApiModelProperty(example = "MMS 성공건수", name = "MMS 성공건수", dataType = "String")
@ApiModelProperty(example = "10", name = "MMS 성공건수", dataType = "String")
private String succCntM;
@ApiModelProperty(example = "알림톡발송건수", name = "알림톡발송건수", dataType = "String")
@ApiModelProperty(example = "10", name = "알림톡발송건수", dataType = "String")
private String sndCntA;
@ApiModelProperty(example = "알림톡 성공건수", name = "알림톡 성공건수", dataType = "String")
@ApiModelProperty(example = "10", name = "알림톡 성공건수", dataType = "String")
private String succCntA;
}

View File

@@ -9,7 +9,7 @@ import java.io.Serializable;
@Data
public class ChannelDetailReqDto implements Serializable {
@ApiModelProperty(example = "사용자일련번호", name = "사용자일련번호", dataType = "String")
@ApiModelProperty(example = "1012001", name = "사용자일련번호", dataType = "String")
private String userSeq;
}

View File

@@ -14,48 +14,52 @@ public class ChannelDetailRes implements Serializable {
private Paging paging;
private List<ChannelDetail> list;
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "String")
@ApiModelProperty(example = "1", name = "리스트번호", dataType = "String")
private String no;
@ApiModelProperty(example = "가입일", name = "가입일", dataType = "String")
@ApiModelProperty(example = "20220101", name = "가입일", dataType = "String")
private String subsDt;
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String")
@ApiModelProperty(example = "대리점", name = "유치업체", dataType = "String")
private String norgNm;
@ApiModelProperty(example = "사업장주소1", name = "사업장주소1", dataType = "String")
@ApiModelProperty(example = "서울시", name = "사업장주소1", dataType = "String")
private String adr1;
@ApiModelProperty(example = "사업장주소2", name = "사업장주소2", dataType = "String")
@ApiModelProperty(example = "서초구", name = "사업장주소2", dataType = "String")
private String adr2;
@ApiModelProperty(example = "사업장주소3", name = "사업장주소3", dataType = "String")
@ApiModelProperty(example = "1동", name = "사업장주소3", dataType = "String")
private String adr3;
@ApiModelProperty(example = "사용자일련번호", name = "사용자일련번호", dataType = "String")
@ApiModelProperty(example = "10110201", name = "사용자일련번호", dataType = "String")
private String userSeq;
@ApiModelProperty(example = "마당ID(이름)", name = "마당ID(이름)", dataType = "String")
@ApiModelProperty(example = "test", name = "마당ID(이름)", dataType = "String")
private String loginId;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
@ApiModelProperty(example = "TEST", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "대표자명", name = "대표자명", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "대표자명", dataType = "String")
private String reprNm;
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String")
@ApiModelProperty(example = "1010120202", name = "사업자등록번호", dataType = "String")
private String bizrno;
@ApiModelProperty(example = "법인등록번호", name = "법인등록번호", dataType = "String")
@ApiModelProperty(example = "1234561234567", name = "법인등록번호", dataType = "String")
private String cprRegNo;
@ApiModelProperty(example = "이름", name = "이름" , dataType = "String")
@ApiModelProperty(example = "홍길동", name = "이름" , dataType = "String")
private String userNm;
@ApiModelProperty(example = "상태", name = "상태", dataType = "String")
@ApiModelProperty(example = "청약", name = "상태", dataType = "String")
private String subsSttusCd;
@ApiModelProperty(example = "법인사업자", name = "구분", dataType = "String")
private String subsSttusNm;
@ApiModelProperty(example = "구분", name = "구분", dataType = "String")
private String custTyCd;
@ApiModelProperty(example = "LTE5만원", name = "청약요금제명", dataType = "String")
private String custTyNm;
@ApiModelProperty(example = "청약요금제명", name = "청약요금제명", dataType = "String")
private String plan;
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "전체발송건수", dataType = "String")
private String sndCnt;
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
@ApiModelProperty(example = "adminTest", name = "관리자ID", dataType = "String")
private String adminId;
@ApiModelProperty(example = "관리자명", name = "관리자명", dataType = "String")
@ApiModelProperty(example = "어드민", name = "관리자명", dataType = "String")
private String adminNm;
@ApiModelProperty(example = "유치자ID", name = "유치자ID", dataType = "String")
@ApiModelProperty(example = "admin", name = "유치자ID", dataType = "String")
private String channelId;
@ApiModelProperty(example = "유치자명", name = "유치자명", dataType = "String")
@ApiModelProperty(example = "관리자", name = "유치자명", dataType = "String")
private String channelNm;
@ApiModelProperty(example = "USER ID", name = "USER ID", dataType = "String", hidden = true)
@ApiModelProperty(example = "test", name = "USER ID", dataType = "String", hidden = true)
private String userId;
}

View File

@@ -9,26 +9,30 @@ import java.io.Serializable;
@Data
public class ChannelInfo implements Serializable {
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "Integer")
@ApiModelProperty(example = "1", name = "리스트번호", dataType = "Integer")
private Integer no;
@ApiModelProperty(example = "가입일", name = "가입일", dataType = "String")
@ApiModelProperty(example = "20220101", name = "가입일", dataType = "String")
private String subsDt;
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String")
@ApiModelProperty(example = "대리점", name = "유치업체", dataType = "String")
private String norgNm;
@ApiModelProperty(example = "사용자일련번호", name = "사용자일련번호", dataType = "String")
@ApiModelProperty(example = "10122112", name = "사용자일련번호", dataType = "String")
private String userSeq;
@ApiModelProperty(example = "마당ID(이름)", name = "마당ID(이름)", dataType = "String")
@ApiModelProperty(example = "madang01", name = "마당ID", dataType = "String")
private String loginId;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String")
@ApiModelProperty(example = "1234512345", name = "사업자등록번호", dataType = "String")
private String bizrno;
@ApiModelProperty(example = "이름", name = "이름" , dataType = "String")
@ApiModelProperty(example = "홍길동", name = "이름" , dataType = "String")
private String userNm;
@ApiModelProperty(example = "상태", name = "상태", dataType = "String")
@ApiModelProperty(example = "01", name = "상태", dataType = "String")
private String subsSttusCd;
@ApiModelProperty(example = "구분", name = "구분", dataType = "String")
@ApiModelProperty(example = "청약", name = "상태명", dataType = "String")
private String subsSttusNm;
@ApiModelProperty(example = "01", name = "고객구분", dataType = "String")
private String custTyCd;
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String")
@ApiModelProperty(example = "법인", name = "고객구분명", dataType = "String")
private String custTyNm;
@ApiModelProperty(example = "100", name = "전체발송건수", dataType = "String")
private String sndCnt;
}

View File

@@ -9,22 +9,22 @@ import java.io.Serializable;
@Data
public class ChannelListExcelReqDto implements Serializable {
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
@ApiModelProperty(example = "Y", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
private String searchType;
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
@ApiModelProperty(example = "custNm", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
private String searchType1;
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String")
@ApiModelProperty(example = "임시회사", name = "검색어(입력)", dataType = "String")
private String searchText;
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
@ApiModelProperty(example = "20220101", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
private String subsStDt;
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
@ApiModelProperty(example = "20220131", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
private String subsEdDt;
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
@ApiModelProperty(example = "01", name = "청약상태", dataType = "String")
private String subsSttusCd;
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
@ApiModelProperty(example = "test", name = "로그인아이디", dataType = "String")
private String loginId;
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
@ApiModelProperty(example = "유치", name = "유치채널", dataType = "String")
private String norgNm;
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
@ApiModelProperty(example = "01", name = "고객유형", dataType = "String")
private String custTyCd;
}

View File

@@ -9,26 +9,29 @@ import java.io.Serializable;
@Data
public class ChannelListReqDto implements Serializable {
@ApiModelProperty(example = "검색시작일", name = "검색시작일", dataType = "String")
@ApiModelProperty(example = "20220101", name = "검색시작일", dataType = "String")
private String subsStDt;
@ApiModelProperty(example = "검색종료일", name = "검색종료일", dataType = "String")
@ApiModelProperty(example = "20220131", name = "검색종료일", dataType = "String")
private String subsEdDt;
@ApiModelProperty(example = "상태", name = "상태", dataType = "String")
@ApiModelProperty(example = "01", name = "상태", dataType = "String")
private String subsSttusCd;
@ApiModelProperty(example = "회원구분", name = "회원구분", dataType = "String")
@ApiModelProperty(example = "01", name = "회원구분", dataType = "String")
private String custTyCd;
@ApiModelProperty(example = "유치자ID", name = "유치자ID", dataType = "String")
@ApiModelProperty(example = "test", name = "유치자ID", dataType = "String")
private String loginId;
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String")
@ApiModelProperty(example = "10", name = "전체발송건수", dataType = "String")
private String sndCnt;
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String")
@ApiModelProperty(example = "유치", name = "유치업체", dataType = "String")
private String norgNm;
@ApiModelProperty(example = "상세검색조건", name = "상세검색조건", dataType = "String")
@ApiModelProperty(example = "01", name = "상세검색조건", dataType = "String")
private String searchType;
@ApiModelProperty(example = "검색어", name = "검색어", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "검색어", dataType = "String")
private String searchText;
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
@ApiModelProperty(example = "50", name = "페이지당 조회할 목록 수", dataType = "String")
private int pagePerRows;
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "String")
@ApiModelProperty(example = "1", name = "현재 페이지", dataType = "String")
private int page;
@ApiModelProperty(name = "유치자ID", dataType = "String", hidden = true)
private String attrctorId;
}

View File

@@ -1,45 +1,45 @@
package kr.co.uplus.ez.api.calculate.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class CalcList implements Serializable {
@ApiModelProperty(example = "날짜", name = "날짜", dataType = "String")
@ApiModelProperty(example = "202201", name = "날짜", dataType = "String")
private String useYm;
@ApiModelProperty(example = "고객사명(이름)", name = "고객사명", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "사업자번호(생년월일)", name = "사업자번호", dataType = "String")
@ApiModelProperty(example = "1234512345", name = "사업자번호", dataType = "String")
private String bizrno;
@ApiModelProperty(example = "요금제", name = "요금제", dataType = "String")
@ApiModelProperty(example = "LTE5만원", name = "요금제", dataType = "String")
private String prodNm;
@ApiModelProperty(example = "요금액", name = "요금액", dataType = "String")
@ApiModelProperty(example = "10000", name = "요금액", dataType = "String")
private String prodAmt;
@ApiModelProperty(example = "시작금액", name = "시작금액", dataType = "String")
@ApiModelProperty(example = "10000", name = "시작금액", dataType = "String")
private String startAmt;
@ApiModelProperty(example = "사용금액", name = "사용금액", dataType = "String")
@ApiModelProperty(example = "10000", name = "사용금액", dataType = "String")
private String useAmt;
@ApiModelProperty(example = "이월금액", name = "이월금액", dataType = "String")
@ApiModelProperty(example = "10000", name = "이월금액", dataType = "String")
private String cfwdAmt;
@ApiModelProperty(example = "종량금액", name = "종량금액", dataType = "String")
@ApiModelProperty(example = "10000", name = "종량금액", dataType = "String")
private String mrtUseAmt;
@ApiModelProperty(example = "소멸금액", name = "소멸금액", dataType = "String")
@ApiModelProperty(example = "1000", name = "소멸금액", dataType = "String")
private String extncAmt;
@ApiModelProperty(example = "청구금액", name = "청구금액", dataType = "String")
@ApiModelProperty(example = "10000", name = "청구금액", dataType = "String")
private String billingAmt;
@ApiModelProperty(example = "전체 발송건수", name = "전체 발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "전체 발송건수", dataType = "String")
private String totalSndCnt;
@ApiModelProperty(example = "SMS 발송건수", name = "SMS 발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "SMS 발송건수", dataType = "String")
private String smsSndCnt;
@ApiModelProperty(example = "LMS 발송건수", name = "LMS 발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "LMS 발송건수", dataType = "String")
private String lmsSndCnt;
@ApiModelProperty(example = "MMS 발송건수", name = "MMS 발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "MMS 발송건수", dataType = "String")
private String mmsSndCnt;
@ApiModelProperty(example = "알림톡 발송건수", name = "알림톡 발송건수", dataType = "String")
@ApiModelProperty(example = "100", name = "알림톡 발송건수", dataType = "String")
private String atlkSndCnt;
}

View File

@@ -11,17 +11,17 @@ import java.io.Serializable;
public class CalcListExcelReqDto implements Serializable {
@NotNull
@ApiModelProperty(example = "검색시작월", name = "검색시작월",dataType = "String")
@ApiModelProperty(example = "202201", name = "검색시작월",dataType = "String")
private String startMonth;
@NotNull
@ApiModelProperty(example = "검색종료월", name = "검색종료월",dataType = "String")
@ApiModelProperty(example = "202203", name = "검색종료월",dataType = "String")
private String endMonth;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String")
@ApiModelProperty(example = "1234512345", name = "사업자번호", dataType = "String")
private String bizrno;
}

View File

@@ -1,36 +1,35 @@
package kr.co.uplus.ez.api.calculate.dto;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class CalcListReqDto implements Serializable {
@NotNull
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
@ApiModelProperty(example = "50", name = "페이지당 조회할 목록 수", dataType = "String")
private int pagePerRows;
@NotNull
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
@ApiModelProperty(example = "1", name = "현재 페이지", dataType = "int")
private int page;
@NotNull
@ApiModelProperty(example = "검색시작월", name = "검색시작월",dataType = "String")
@ApiModelProperty(example = "202201", name = "검색시작월",dataType = "String")
private String startMonth;
@NotNull
@ApiModelProperty(example = "검색종료월", name = "검색종료월",dataType = "String")
@ApiModelProperty(example = "202203", name = "검색종료월",dataType = "String")
private String endMonth;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String")
@ApiModelProperty(example = "1234512345", name = "사업자번호", dataType = "String")
private String bizrno;
}

View File

@@ -1,12 +1,11 @@
package kr.co.uplus.ez.api.channelMgt;
import java.util.List;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListExcelReqDto;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto;
import org.apache.ibatis.annotations.Mapper;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto;
import java.util.List;
@Mapper
public interface ChannelMgtMapper {
@@ -17,5 +16,7 @@ public interface ChannelMgtMapper {
List<TmpltInfo> selectTmpltListExcel(TmpltListExcelReqDto tmpltListExcelReqDto);
String selectChannelAuthMenuNo(String targetUserId);
default String selectChannelAuthMenuNo(String targetUserId) {
return null;
}
}

View File

@@ -9,24 +9,24 @@ import java.io.Serializable;
@Data
public class TmpltInfo implements Serializable {
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "Integer")
@ApiModelProperty(example = "1", name = "리스트번호", dataType = "Integer")
private Integer no;
@ApiModelProperty(example = "고객사명(이름)", name = "고객사명(이름)", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm;
@ApiModelProperty(example = "사업자번호(생년월일)", name = "사업자번호(생년월일)", dataType = "String")
@ApiModelProperty(example = "1234512345", name = "사업자번호", dataType = "String")
private String bRegNo;
@ApiModelProperty(example = "템플릿 코드", name = "템플릿 코드", dataType = "String")
@ApiModelProperty(example = "01", name = "템플릿 코드", dataType = "String")
private String tmpltCd;
@ApiModelProperty(example = "템플릿명", name = "템플릿명", dataType = "String")
@ApiModelProperty(example = "테스트", name = "템플릿명", dataType = "String")
private String tmpltNm;
@ApiModelProperty(example = "템플릿 유형", name = "템플릿 유형", notes = "항목 : (01: 기본형(Default), 02:부가정보형, 03:광고추가형, 04:복합형)", dataType = "String")
@ApiModelProperty(example = "01", name = "템플릿 유형", notes = "항목 : (01: 기본형(Default), 02:부가정보형, 03:광고추가형, 04:복합형)", dataType = "String")
private String tmpltType;
@ApiModelProperty(example = "상태", name = "상태" , notes = "항목 : (T:신청완료, R:검수요청완료, Q:카카오 검수중, A:템플릿승인, S:반려)" , dataType = "String")
@ApiModelProperty(example = "T", name = "상태" , notes = "항목 : (T:신청완료, R:검수요청완료, Q:카카오 검수중, A:템플릿승인, S:반려)" , dataType = "String")
private String stat;
@ApiModelProperty(example = "반려사유", name = "반려사유", dataType = "String")
@ApiModelProperty(example = "01", name = "반려사유", dataType = "String")
private String returnReason;
@ApiModelProperty(example = "발신프로필", name = "발신프로필", dataType = "String")
@ApiModelProperty(example = "1230123023", name = "발신프로필", dataType = "String")
private String sendProfile;
@ApiModelProperty(example = "최종수정일자", name = "최종수정일자", dataType = "String")
@ApiModelProperty(example = "20220320", name = "최종수정일자", dataType = "String")
private String lastChgDt;
}

View File

@@ -3,21 +3,21 @@ package kr.co.uplus.ez.api.channelMgt.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class TmpltListExcelReqDto implements Serializable {
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
@ApiModelProperty(example = "Y", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
private String searchType1;
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
@ApiModelProperty(example = "custNm", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
private String searchType2;
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "검색어(입력)", dataType = "String")
private String searchText1;
@ApiModelProperty(example = "1122", name = "채널메뉴번호", dataType = "String")
private String channelAuthMenuNo;
@ApiModelProperty(example = "test", name = "사용자아이디", dataType = "String")
private String userId;
}

View File

@@ -1,31 +1,31 @@
package kr.co.uplus.ez.api.channelMgt.dto;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class TmpltListReqDto implements Serializable {
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
@ApiModelProperty(example = "Y", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
private String searchType1;
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
@ApiModelProperty(example = "custNm", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
private String searchType2;
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String")
@ApiModelProperty(example = "홍길동", name = "검색어(입력)", dataType = "String")
private String searchText1;
@NotNull
@ApiModelProperty(example = "페이지당 조회할 목록 수",notes = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "int")
@ApiModelProperty(example = "50",notes = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "int")
private int pagePerRows;
@NotNull
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
@ApiModelProperty(example = "1", name = "현재 페이지", dataType = "int")
private int page;
@ApiModelProperty(example = "1", name = "채널메뉴번호", dataType = "int")
private String channelAuthMenuNo;
@ApiModelProperty(example = "test", name = "사용자아이디", dataType = "int")
private String userId;
}

View File

@@ -1,14 +1,18 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class Auth implements Serializable{
@ApiModelProperty(example = "1001", name = "권한코드", dataType = "int")
private String autCd;
@ApiModelProperty(example = "어드민", name = "권한명", dataType = "int")
private String autNm;
@ApiModelProperty(example = "N", name = "사용여부", dataType = "int")
private String useYn;
}

View File

@@ -1,16 +1,16 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@SuppressWarnings("serial")
@Data
public class AuthRes implements Serializable {
@ApiModelProperty(name = "권한리스트", example = "권한리스트", dataType = "List<Auth>")
@ApiModelProperty(name = "권한리스트", dataType = "List<Auth>")
private List<Auth> list;
}

View File

@@ -1,23 +1,23 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class Code implements Serializable {
@ApiModelProperty(name = "그룹코드", example = "그룹코드", dataType = "String")
@ApiModelProperty(name = "그룹코드", example = "1001", dataType = "String")
private String grpCd;
@ApiModelProperty(name = "상세코드", example = "상세코드", dataType = "String")
@ApiModelProperty(name = "상세코드", example = "01", dataType = "String")
private String code;
@ApiModelProperty(name = "상세코드명", example = "상세코드명", dataType = "String")
@ApiModelProperty(name = "상세코드명", example = "TEST", dataType = "String")
private String codeNm;
@ApiModelProperty(name = "정렬순서", example = "정렬순서", dataType = "Integer")
@ApiModelProperty(name = "정렬순서", example = "1", dataType = "Integer")
private Integer sortOrder;
@ApiModelProperty(name = "사용여부", example = "사용여부", dataType = "String")
@ApiModelProperty(name = "사용여부", example = "Y", dataType = "String")
private String useYn;
}

View File

@@ -1,15 +1,15 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class CodeReqDto implements Serializable{
@ApiModelProperty(example = "그룹코드", name = "그룹코드", dataType = "String")
@ApiModelProperty(example = "1001", name = "그룹코드", dataType = "String")
private String grpCd;
}

View File

@@ -1,16 +1,16 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@SuppressWarnings("serial")
@Data
public class CodeRes implements Serializable {
@ApiModelProperty(name = "코드리스트", example = "코드리스트", dataType = "List<Code>")
@ApiModelProperty(name = "코드리스트", dataType = "List<Code>")
private List<Code> list;
}

View File

@@ -1,41 +1,41 @@
package kr.co.uplus.ez.api.comm.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@SuppressWarnings("serial")
@Data
public class Menu implements Serializable{
@ApiModelProperty(name = "메뉴 번호", example = "메뉴 번호", dataType = "Integer")
@ApiModelProperty(name = "메뉴 번호", example = "1001", dataType = "Integer")
private Integer menuNo;
@ApiModelProperty(name = "부모 메뉴 번호", example = "부모 메뉴 번호", dataType = "Integer")
@ApiModelProperty(name = "부모 메뉴 번호", example = "1001", dataType = "Integer")
private Integer prntsMenuNo;
@ApiModelProperty(name = "메뉴 명", example = "메뉴 명")
@ApiModelProperty(name = "메뉴 명", example = "고객관리")
private String menuNm;
@ApiModelProperty(name = "메뉴 순서", example = "메뉴 순서", dataType = "Integer")
@ApiModelProperty(name = "메뉴 순서", example = "1", dataType = "Integer")
private Integer menuOdrg;
@ApiModelProperty(name = "사용 여부", example = "사용 여부")
@ApiModelProperty(name = "사용 여부", example = "Y")
private String useYn;
@ApiModelProperty(name = "권한체크 그룹번호", example = "권한체크 그룹번호", dataType = "Integer")
@ApiModelProperty(name = "권한체크 그룹번호", example = "1001", dataType = "Integer")
private Integer autchkGrpno;
@ApiModelProperty(name = "메뉴 레벨", example = "메뉴 레벨", dataType = "Integer")
@ApiModelProperty(name = "메뉴 레벨", example = "1", dataType = "Integer")
private Integer menuLvl;
@ApiModelProperty(name = "메뉴 URL", example = "메뉴 URL")
@ApiModelProperty(name = "메뉴 URL", example = "/login")
private String menuUrl;
@ApiModelProperty(name = "등록 ID", example = "등록 ID")
@ApiModelProperty(name = "등록 ID", example = "test")
private String regId;
@ApiModelProperty(name = "등록 일시", example = "등록 일시")
@ApiModelProperty(name = "등록 일시", example = "20110101")
private String regDt;
@ApiModelProperty(name = "변경 ID", example = "변경 ID")
@ApiModelProperty(name = "변경 ID", example = "test")
private String chgId;
@ApiModelProperty(name = "변경 일시", example = "변경 일시")
@ApiModelProperty(name = "변경 일시", example = "20110101")
private String chgDt;
@ApiModelProperty(name = "하위 메뉴 정보", example = "하위 메뉴 정보", dataType = "List<Menu>")
@ApiModelProperty(name = "하위 메뉴 정보", dataType = "List<Menu>")
private List<Menu> children = new ArrayList<>();
public void addChild(Menu menu) {

View File

@@ -1,17 +1,17 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class RefreshToken implements Serializable{
@ApiModelProperty(name = "인증토큰", example = "인증토큰", dataType = "String")
@ApiModelProperty(name = "인증토큰", example = "adwd121dd", dataType = "String")
private String accessToken;
@ApiModelProperty(name = "토큰 만료시간", example = "토큰 만료시간", dataType = "String")
@ApiModelProperty(name = "토큰 만료시간", example = "1800", dataType = "String")
private String expireTime;
}

View File

@@ -1,16 +1,16 @@
package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class RefreshTokenReqDto implements Serializable{
@ApiModelProperty(example = "사용자 ID", name = "사용자 ID", dataType = "String")
@ApiModelProperty(example = "test", name = "사용자 ID", dataType = "String")
private String userId;
@ApiModelProperty(example = "Refresh 토큰", name = "Refresh 토큰", dataType = "String")
@ApiModelProperty(example = "dadw242rdwad2", name = "Refresh 토큰", dataType = "String")
private String refreshToken;
}

View File

@@ -285,11 +285,17 @@ public class CustMgtController {
})
@RequestMapping(value = "/insertTestId" , method = {RequestMethod.POST})
@ResponseBody
public InsertTestIdResDto insertTestId(@RequestBody @Valid InsertTestIdReqDto insertTestIdReqDto, BindingResult bindingResult) {
public InsertTestIdResDto insertTestId(@RequestBody @Valid InsertTestIdReqDto insertTestIdReqDto, BindingResult bindingResult){
if(validComponents.validParameter(bindingResult)) {
return new InsertTestIdResDto(ApiResponseCode.CM_PARAMETER_ERROR);
}
return custService.insertTestId(insertTestIdReqDto);
try {
return custService.insertTestId(insertTestIdReqDto);
}catch(Exception e) {
logger.info(e.toString());
return new InsertTestIdResDto(ApiResponseCode.CM_DB_QUERY_ERR);
}
}
/**

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,21 @@
package kr.co.uplus.ez.api.custMgt.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class AdminInfo implements Serializable {
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
@ApiModelProperty(example = "admin", name = "관리자ID", dataType = "String")
private String adminId;
@ApiModelProperty(example = "관리자코드", name = "관리자코드", dataType = "String")
@ApiModelProperty(example = "1001", name = "관리자코드", dataType = "String")
private String adminCd;
@ApiModelProperty(example = "관리자명", name = "관리자명", dataType = "String")
@ApiModelProperty(example = "ADMIN", name = "관리자명", dataType = "String")
private String adminNm;
@ApiModelProperty(example = "대리점명", name = "대리점명", dataType = "String")
@ApiModelProperty(example = "본사", name = "대리점명", dataType = "String")
private String agencyNm;
}

View File

@@ -1,15 +1,15 @@
package kr.co.uplus.ez.api.custMgt.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class AdminInfoReqDto implements Serializable {
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
@ApiModelProperty(example = "admin", name = "관리자ID", dataType = "String")
private String adminId;
}

View File

@@ -1,23 +1,16 @@
package kr.co.uplus.ez.api.mntrng;
import java.util.ArrayList;
import java.util.List;
import kr.co.uplus.ez.api.mntrng.dto.*;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.Paging;
import org.apache.commons.lang3.StringUtils;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ApiResponseMessage;
import kr.co.uplus.ez.common.data.Paging;
import kr.co.uplus.ez.api.mntrng.dto.SendListResDto;
import kr.co.uplus.ez.api.mntrng.dto.LiveSendSttusRes;
import kr.co.uplus.ez.api.mntrng.dto.LiveSendSttusResDto;
import kr.co.uplus.ez.api.mntrng.dto.SendList;
import kr.co.uplus.ez.api.mntrng.dto.SendListReqDto;
import kr.co.uplus.ez.api.mntrng.dto.SendListRes;
import kr.co.uplus.ez.api.mntrng.dto.LiveSendSttus;
import java.util.ArrayList;
import java.util.List;
@Service
public class MntrngService {
@@ -44,16 +37,13 @@ public class MntrngService {
String nowPage = String.valueOf(sendListReqDto.getPage());
int totalCnt = mntrngMapper.selectSendListTotalCnt(sendListReqDto);
if (totalCnt == 0) {
if (totalCnt == 0 || StringUtils.isBlank(sendListReqDto.getSentDate())) {
SendListRes sendListRes = new SendListRes();
sendListRes.setList(new ArrayList<>());
Paging paging = new Paging();
paging.setPage(nowPage);
paging.setTotalCnt(String.valueOf(totalCnt));
sendListRes.setPaging(paging);
return new SendListResDto(ApiResponseCode.CM_NOT_FOUND, sendListRes);
}

View File

@@ -1,16 +1,16 @@
package kr.co.uplus.ez.api.mntrng.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class SendList implements Serializable {
@ApiModelProperty(example = "no", name = "no", dataType = "String")
private String no;
private int no;
@ApiModelProperty(example = "발송일자", name = "발송일자", dataType = "String")
private String sentDate;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")

View File

@@ -1,11 +1,11 @@
package kr.co.uplus.ez.api.mntrng.dto;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial")
@Data
public class SendListReqDto implements Serializable {
@@ -18,7 +18,6 @@ public class SendListReqDto implements Serializable {
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
private int page;
@NotNull
@ApiModelProperty(example = "발송일", name = "발송일",dataType = "String")
private String sentDate;

View File

@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
@@ -285,6 +286,7 @@ public class RiskMgtService {
* @param paramMap
* @return
*/
@Transactional(value="db1TransactionManager")
public MsgInsertIntrcpResDto msgInsertIntrcp(MsgInsertIntrcpReqDto msgInsertIntrcpReqDto) {
RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class);
@@ -292,7 +294,7 @@ public class RiskMgtService {
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserDetails userDetails = (UserDetails) principal;
String regId = userDetails.getUsername();
try {
String seqNoStr = riskMgtMapper.selectMsgBlckWordSeq();
long seqNo = Long.parseLong(seqNoStr);
// seq select
@@ -300,21 +302,14 @@ public class RiskMgtService {
msgInsertIntrcpReqDto.setRegId(regId);
msgInsertIntrcpReqDto.setBlckYn(Const.COMM_YES);
riskMgtMapper.insertMsgBlckword(msgInsertIntrcpReqDto);
// TODO 차단문구 등록
// 리스트에 regId 넣기
List<MsgBlckwordList> list = msgInsertIntrcpReqDto.getList();
for (MsgBlckwordList msgBlckword : list) {
msgBlckword.setSeqNo(seqNo);
msgBlckword.setRegId(regId);
}
riskMgtMapper.insertBlckwordDtl(list);
} catch (Exception e) {
return new MsgInsertIntrcpResDto(ApiResponseCode.CM_DB_QUERY_ERR);
}
return new MsgInsertIntrcpResDto(ApiResponseCode.SUCCESS);
}
@@ -324,6 +319,7 @@ public class RiskMgtService {
* @param msgUpdateIntrcplReqDto
* @return
*/
@Transactional(value="db1TransactionManager")
public MsgUpdateIntrcpResDto msgUpdateIntrcp(MsgUpdateIntrcplReqDto msgUpdateIntrcplReqDto) {
RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class);

View File

@@ -15,6 +15,9 @@ public class Const {
public static final String AUTH_STTUS_CD_01 = "01"; // 인증대기
public static final String AUTH_STTUS_CD_02 = "02"; // 인증완료
public static final String AUTH_CD_ADMIN = "1001";
public static final String AUTH_CD_AGENCY = "1002";
// paging
public static final String TOTAL_CNT = "totalCnt";
public static final String CURRENT_PAGE = "currentPage";

View File

@@ -1,155 +0,0 @@
//package kr.co.uplus.ez.common.utils;
//
//import java.io.UnsupportedEncodingException;
//import java.lang.reflect.Method;
//import java.lang.reflect.Parameter;
//import java.util.Arrays;
//import java.util.Enumeration;
//
//import javax.servlet.http.HttpServletRequest;
//
//import org.joda.time.DateTime;
//import org.joda.time.format.DateTimeFormat;
//import org.joda.time.format.DateTimeFormatter;
//import org.springframework.util.LinkedMultiValueMap;
//import org.springframework.util.MultiValueMap;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.util.ContentCachingRequestWrapper;
//
//import kr.co.uplus.ez.common.auth.AuthUser;
//import kr.co.uplus.ez.common.consts.Const;
//
//
//public class LogUtils {
// public static final String HANG_LOG_KEY = "hangfile";
//
// private static final String HANG_LOG_ROOT = "/logs/uplus/hang/ui";
// private static final DateTimeFormatter FMT_TO_DAY = DateTimeFormat.forPattern("yyyyMMdd");
// private static final DateTimeFormatter FMT_TO_HOUR = DateTimeFormat.forPattern("yyyyMMddHH");
// private static final DateTimeFormatter FMT_TO_SECOND = DateTimeFormat.forPattern("yyyyMMddHHmmss");
// private static final DateTimeFormatter FMT_TO_MILSEC = DateTimeFormat.forPattern("yyyyMMddHHmmssSSS");
//
// public static String getTloLogfileName(String tloRoot) {
// DateTime now = DateTime.now();
// String dir = now.toString(FMT_TO_DAY);
// String suffix = now.toString(FMT_TO_HOUR);
// int min = 5 * (now.getMinuteOfHour() / 5);
// int NODE_NO = 1;
// return String.format("%s/%s/RCS.ADMIN.%03d.%s%02d.log", tloRoot, dir, NODE_NO, suffix, min);
// }
//
// public static String getLoginId() {
// AuthUser user = SpringUtils.getCurrentUser();
// if (user == null)
// return "anonymousUser";
//
// return user.getUsername();
// }
//
// public static String getCurrentTime() {
// return DateTime.now().toString(FMT_TO_MILSEC);
// }
//
//// public static void addTloOrdinaryInfo(TloLog tlo, HttpServletRequest request, HttpServletResponse response) {
//// DateTime now = DateTime.now();
//// tlo.setRspTime(now.toString(FMT_TO_MILSEC));
//// tlo.setClientIp(LogUtils.clientIp(request));
////
//// int status = response.getStatus();
//// if (status == 404) {
//// tlo.setResultCode(ResultCode.SS_NOT_FOUND.getValue());
//// }
//// }
////
//// public static void addTloCustomInfo(TloLog tlo, HttpServletRequest request) {
//// tlo.setReqUri(request.getRequestURI());
//// tlo.setReqParam(getReqMultiMap(request).toString());
//// }
////
//// public static void addTloFailInfo(Object rspObj, HttpServletRequest request) {
//// if (rspObj instanceof Result) {
//// Result<?> result = (Result<?>) rspObj;
//// if (!result.isSuccess()) {
//// TloLog tlo = (TloLog) request.getAttribute(Const.KEY_LOG_OBJ);
//// String code = result.getCode();
//// tlo.setResultCode(code != null ? code : ResultCode.SE_UNKNOWN.getValue());
//// }
//// }
//// else if (rspObj instanceof RestResult) {
//// RestResult<?> result = (RestResult<?>) rspObj;
//// if (!result.isSuccess()) {
//// TloLog tlo = (TloLog) request.getAttribute(Const.KEY_LOG_OBJ);
//// ResultCode code = result.getCode();
//// tlo.setResultCode(code != null ? code.getValue() : ResultCode.SE_UNKNOWN.getValue());
//// }
//// }
//// }
////
//// public static void addTloExceptionInfo(TloLog tlo, Exception ex) {
//// if (ex == null)
//// return;
////
//// if (ex instanceof ServletException) {
//// Throwable e = ((ServletException) ex).getRootCause();
//// if (e instanceof SQLException || e instanceof DataAccessException) {
//// tlo.setResultCode(ResultCode.SE_DB.getValue());
//// }
//// else {
//// tlo.setResultCode(ResultCode.SE_INTERNAL.getValue());
//// }
//// }
//// else {
//// tlo.setResultCode(ResultCode.SE_INTERNAL.getValue());
//// }
//// }
// public static String clientIp(HttpServletRequest request) {
// String ip = request.getHeader("X-Forwarded-For");
// if (ip == null)
// ip = request.getRemoteAddr();
// return ip;
// }
//
//
// public static MultiValueMap<String,String> getReqMultiMap(HttpServletRequest request) {
// MultiValueMap<String,String> params = new LinkedMultiValueMap<>();
// Enumeration<String> names = request.getParameterNames();
// while (names.hasMoreElements()) {
// String name = names.nextElement();
// if (Const.NOT_LOG_PARAMS.contains(name))
// continue;
// String[] value = request.getParameterValues(name);
// params.put(name, Arrays.asList(value));
// }
// return params;
// }
//
// public static boolean isResourceUri(String uri) {
// return uri.startsWith("/static/");
// }
//
// public static String getRequestBody(HttpServletRequest request, Method method) {
// Parameter[] parameters = method.getParameters();
//
// for (Parameter param : parameters) {
// if (param.getAnnotation(RequestBody.class) != null) {
// // CommonsRequestLoggingFilter.getMessagePayload()
// ContentCachingRequestWrapper wrapper =
// org.springframework.web.util.WebUtils.getNativeRequest(request, ContentCachingRequestWrapper.class);
// if (wrapper != null) {
// byte[] buf = wrapper.getContentAsByteArray();
// if (buf.length > 0) {
// int length = Math.min(buf.length, 10000);
// try {
// return new String(buf, 0, length, wrapper.getCharacterEncoding());
// }
// catch (UnsupportedEncodingException ex) {
// return "[unknown]";
// }
// }
// }
// }
// }
// return "";
// }
//
//}

View File

@@ -24,40 +24,49 @@
<select id="selectAttractList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelInfo">
/* attractMgt-mapper.xml(selectAttractList) */
SELECT
@ROWNUM := @ROWNUM + 1 AS NO
, A.*
@ROWNUM := @ROWNUM + 1 AS NO
, A.SUBS_DT
, A.NORG_NM
, A.USER_SEQ
, A.LOGIN_ID
, A.CUST_NM
, A.BIZRNO
, A.USER_NM
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SUBS_STTUS_CD' AND DTL_CD = A.SUBS_STTUS_CD) as SUBS_STTUS_CD
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'CUST_KD_CD' AND DTL_CD = A.CUST_TY_CD) as CUST_TY_CD
, (
SELECT
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
FROM
hubez_common.EZ_CUST_MSTAT ecm
WHERE
ecm.USER_SEQ = A.USER_SEQ
AND ecm.SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
) AS SND_CNT
FROM
(
SELECT
ifnull(DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d'), DATE_FORMAT(esi.SUBS_DT , '%Y-%m-%d')) AS SUBS_DT
, eig.NORG_NM
, esi.USER_SEQ
, eiu.LOGIN_ID
, eci.CUST_NM
, eci.BIZRNO
, esu.USER_NM
, esi.SUBS_STTUS_CD
, eci.CUST_TY_CD
FROM
(
SELECT
DATE_FORMAT(esi.SUBS_DT, '%Y-%m-%d') AS SUBS_DT
, eig.NORG_NM
, esi.USER_SEQ
, eiu.LOGIN_ID
, eci.CUST_NM
, eci.BIZRNO
, esu.USER_NM
, esi.SUBS_STTUS_CD
, eci.CUST_TY_CD
,(
SELECT
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
FROM
hubez_common.EZ_CUST_MSTAT ecm
WHERE
ecm.USER_SEQ = esu.USER_SEQ
AND ecm.SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)) AS SND_CNT
FROM
hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_CUST_INFO eci
ON eci.CUST_SEQ = esi.CUST_SEQ
INNER JOIN hubez_common.EZ_SVC_USER esu
ON esu.USER_SEQ = esi.USER_SEQ
INNER JOIN hubez_imdb.EZ_IM_USER eiu
ON eiu.LOGIN_ID = esi.ATTRCTOR_ID
INNER JOIN hubez_imdb.EZ_IM_GROUP eig
ON eiu.EX_DEPT_CD = eig.NORG_CD
WHERE 1 = 1
<include refid="attractListCondition"/>
hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_CUST_INFO eci
ON eci.CUST_SEQ = esi.CUST_SEQ
INNER JOIN hubez_common.EZ_SVC_USER esu
ON esu.USER_SEQ = esi.USER_SEQ
INNER JOIN hubez_imdb.EZ_IM_USER eiu
ON eiu.LOGIN_ID = esi.ATTRCTOR_ID
INNER JOIN hubez_imdb.EZ_IM_GROUP eig
ON eiu.EX_DEPT_CD = eig.NORG_CD
WHERE 1 = 1
<include refid="attractListCondition"/>
ORDER BY esi.SUBS_DT DESC
LIMIT #{page}, #{pagePerRows}
) A , ( SELECT @ROWNUM := #{page} ) AS R
@@ -66,27 +75,37 @@
<select id="selectAttractExcelList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListExcelReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelInfo">
/* attractMgt-mapper.xml(selectAttractExcelList) */
SELECT
@ROWNUM := @ROWNUM + 1 AS NO
, A.*
FROM
(
@ROWNUM := @ROWNUM + 1 AS NO
, A.SUBS_DT
, A.NORG_NM
, A.USER_SEQ
, A.LOGIN_ID
, A.CUST_NM
, A.BIZRNO
, A.USER_NM
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SUBS_STTUS_CD' AND DTL_CD = A.SUBS_STTUS_CD) as SUBS_STTUS_CD
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'CUST_KD_CD' AND DTL_CD = A.CUST_TY_CD) as CUST_TY_CD
, (
SELECT
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
FROM
hubez_common.EZ_CUST_MSTAT ecm
WHERE
ecm.USER_SEQ = A.USER_SEQ
AND ecm.SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
) AS SND_CNT
FROM
(
SELECT
DATE_FORMAT(esi.SUBS_DT, '%Y-%m-%d') AS SUBS_DT
ifnull(DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d'), DATE_FORMAT(esi.SUBS_DT , '%Y-%m-%d')) AS SUBS_DT
, eig.NORG_NM
, esi.USER_SEQ
, eiu.LOGIN_ID
, eci.CUST_NM
, eci.BIZRNO
, esu.USER_NM
, esi.SUBS_STTUS_CD
, eci.CUST_TY_CD
,(
SELECT
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
FROM
hubez_common.EZ_CUST_MSTAT ecm
WHERE
ecm.USER_SEQ = esu.USER_SEQ
AND ecm.SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)) AS SND_CNT
FROM
hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_CUST_INFO eci
@@ -99,9 +118,7 @@
ON eiu.EX_DEPT_CD = eig.NORG_CD
WHERE 1 = 1
<include refid="attractListCondition"/>
ORDER BY
esi.SUBS_DT DESC
LIMIT 100) A ,
ORDER BY esi.SUBS_DT DESC) A ,
( SELECT @ROWNUM := 0 ) AS R
</select>
@@ -133,6 +150,9 @@
AND eci.BIZRNO = #{searchText}
</if>
</if>
<if test="attrctorId != null and attrctorId != ''">
and esi.ATTRCTOR_ID = #{attrctorId}
</if>
</sql>
<select id="selectAttractDetail" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailRes">
@@ -140,10 +160,24 @@
SELECT
DATE_FORMAT(esi.SUBS_DT, '%Y-%m-%d') AS SUBS_DT
, esi.SUBS_STTUS_CD
,(SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'SUBS_STTUS_CD'
AND T2.DTL_CD = esi.SUBS_STTUS_CD) AS SUBS_STTUS_NM
, eci.CUST_NM
, esi.PROD_CD
, eci.REPR_NM
, eci.CUST_TY_CD
,(SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'CUST_KD_CD'
AND T2.DTL_CD = eci.CUST_TY_CD) AS CUST_TY_NM
, eci.BIZRNO
, eci.CORPNO AS CPR_REG_NO
, eci.ZIPCD AS ADR1

View File

@@ -27,8 +27,22 @@
(eci.BIZRNO)AS bRegNo,
eat.TMPLT_CD AS tmpltCd,
eat.TMPLT_NM AS tmpltNm,
(eat.TMPLT_TP_CD) AS tmpltType,
eat.TMPLT_STTUS_CD AS stat,
<!-- (eat.TMPLT_TP_CD) AS tmpltType, -->
(SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'TMPLT_TP_CD'
AND T2.DTL_CD=eat.TMPLT_TP_CD) AS tmpltType,
<!-- eat.TMPLT_STTUS_CD AS stat, -->
(SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'TMPLT_STTUS_CD'
AND T2.DTL_CD=eat.TMPLT_STTUS_CD) AS stat,
eat.REJCT_RSN AS returnReason,
eat.SNDRPROF_KEY AS sendProfile,
<!-- (select CHNL_ID from hubez_common.EZ_KKO_CHNL ekc WHERE eat.SNDRPROF_KEY = ekc.SNDRPROF_KEY) AS sendProfile, -->

View File

@@ -12,6 +12,7 @@
INNER JOIN hubez_common.EZ_SVC_USER esu
ON
esu.USER_SEQ = esi.USER_SEQ
AND esu.USER_TP_CD IN ('01','03')
INNER JOIN hubez_common.EZ_CUST_INFO eci
ON
eci.CUST_SEQ = esi.CUST_SEQ
@@ -21,96 +22,146 @@
</select>
<select id="selectSubsLists" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.SubsList">
/* custMgt-mapper.xml(selectSubsLists) */
SELECT
@ROWNUM := @ROWNUM + 1 AS NO,
A.*
FROM
(
SELECT
esu.USER_ID as SERVICE_ID,
eci.CUST_NM as CUST_NM ,
esi.ENTR_NO as REG_NO,
DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d') AS REG_DT,
(
SELECT
DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL
WHERE
GRP_CD = 'SUBS_STTUS_CD'
AND DTL_CD = esi.SUBS_STTUS_CD) AS STAT
,
(
SELECT
PROD_NM
FROM
hubez_common.EZ_PROD_INFO
WHERE
PROD_CD = esi.PROD_CD) AS PLAN
,
IFNULL((SELECT CFWD_AMT FROM hubez_admin.EZ_USER_LMT WHERE USER_SEQ = esi.USER_SEQ AND LMT_YM = DATE_FORMAT(NOW(), '%Y%m%d')), 0) AS CARRY_OVER
FROM
hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_SVC_USER esu
ON
esu.USER_SEQ = esi.USER_SEQ
INNER JOIN hubez_common.EZ_CUST_INFO eci
ON
eci.CUST_SEQ = esi.CUST_SEQ
AND esi.CUST_SEQ = esu.CUST_SEQ
WHERE 1 = 1
<include refid="subsListCondition"/>
ORDER BY
esi.OPN_DT DESC
LIMIT #{page}, #{pagePerRows}) A,
( SELECT @ROWNUM := #{page} ) AS R
/* custMgt-mapper.xml(selectSubsLists) */
SELECT
@ROWNUM := @ROWNUM + 1 AS NO
, A.SERVICE_ID
, A.CUST_NM
, A.REG_NO
, A.REG_DT
, (
SELECT
DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL
WHERE
GRP_CD = 'SUBS_STTUS_CD'
AND DTL_CD = A.SUBS_STTUS_CD
) AS STAT
, ifnull((
select case when EX_PROVUSERTYPE in ( 'CCS-CS1'
, 'CCS-CB1'
, 'CCS-CB2'
, 'CCS-CJ'
, 'CCS-LS2'
, 'CCS-LS3'
, 'CCS-M'
, 'CCS-MJ'
, 'CCS-P'
, 'CCS-P2'
, 'CCS-D'
, 'CCS-G'
, 'CCS-S') then '고객센터'
when EX_PROVUSERTYPE = 'DEALER' then '대리점'
else '직접영업'
end as ATTRACT_CHANNEL
from hubez_imdb.EZ_IM_USER
where LOGIN_ID = A.attrctorId
) , '고객셀프가입') as CHANNEL
, (
SELECT
PROD_NM
FROM
hubez_common.EZ_PROD_INFO
WHERE
PROD_CD = A.PROD_CD
) AS PLAN
, IFNULL((SELECT CFWD_AMT FROM hubez_admin.EZ_USER_LMT WHERE USER_SEQ = A.adminSeq AND LMT_YM = DATE_FORMAT(NOW(), '%Y%m')), 0) AS CARRY_OVER -- 년월까지만 비교 해야 함.
FROM
(
SELECT
esu.USER_ID as SERVICE_ID,
eci.CUST_NM as CUST_NM ,
esi.ENTR_NO as REG_NO,
DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d') AS REG_DT,
esi.SUBS_STTUS_CD ,
esi.PROD_CD,
esi.USER_SEQ as adminSeq,
esi.ATTRCTOR_ID as attrctorId
FROM
hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_SVC_USER esu
ON esu.USER_SEQ = esi.USER_SEQ
and esu.USER_TP_CD in ('01','03')
INNER JOIN hubez_common.EZ_CUST_INFO eci
ON
eci.CUST_SEQ = esi.CUST_SEQ
AND esi.CUST_SEQ = esu.CUST_SEQ
WHERE 1 = 1
<include refid="subsListCondition"/>
ORDER BY esi.OPN_DT DESC
LIMIT #{page}, #{pagePerRows}) A, ( SELECT @ROWNUM := #{page} ) AS R
</select>
<select id="selectSubsListsExcel" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.SubsList">
/* custMgt-mapper.xml(selectSubsListsExcel) */
SELECT
@ROWNUM := @ROWNUM + 1 AS NO,
A.*
FROM
(
SELECT
esu.USER_ID as SERVICE_ID,
eci.CUST_NM as CUST_NM ,
esi.ENTR_NO as REG_NO,
DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d') AS REG_DT,
(
SELECT
DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL
WHERE
GRP_CD = 'SUBS_STTUS_CD'
AND DTL_CD = esi.SUBS_STTUS_CD) AS STAT
,
(
SELECT
PROD_NM
FROM
hubez_common.EZ_PROD_INFO
WHERE
PROD_CD = esi.PROD_CD) AS PLAN
,
IFNULL((SELECT CFWD_AMT FROM hubez_admin.EZ_USER_LMT WHERE USER_SEQ = esi.USER_SEQ AND LMT_YM = DATE_FORMAT(NOW(), '%Y%m%d')), 0) AS CARRY_OVER
FROM
hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_SVC_USER esu
ON
esu.USER_SEQ = esi.USER_SEQ
INNER JOIN hubez_common.EZ_CUST_INFO eci
ON
eci.CUST_SEQ = esi.CUST_SEQ
AND esi.CUST_SEQ = esu.CUST_SEQ
WHERE 1 = 1
<include refid="subsListCondition"></include>
ORDER BY
esi.OPN_DT DESC) A,
( SELECT @ROWNUM := 0 ) AS R
@ROWNUM := @ROWNUM + 1 AS NO
, A.SERVICE_ID
, A.CUST_NM
, A.REG_NO
, A.REG_DT
, (
SELECT
DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL
WHERE
GRP_CD = 'SUBS_STTUS_CD'
AND DTL_CD = A.SUBS_STTUS_CD
) AS STAT
, ifnull((
select case when EX_PROVUSERTYPE in ( 'CCS-CS1'
, 'CCS-CB1'
, 'CCS-CB2'
, 'CCS-CJ'
, 'CCS-LS2'
, 'CCS-LS3'
, 'CCS-M'
, 'CCS-MJ'
, 'CCS-P'
, 'CCS-P2'
, 'CCS-D'
, 'CCS-G'
, 'CCS-S') then '고객센터'
when EX_PROVUSERTYPE = 'DEALER' then '대리점'
else '직접영업'
end as ATTRACT_CHANNEL
from hubez_imdb.EZ_IM_USER
where LOGIN_ID = A.attrctorId
) , '고객셀프가입') as CHANNEL
, (
SELECT
PROD_NM
FROM
hubez_common.EZ_PROD_INFO
WHERE
PROD_CD = A.PROD_CD
) AS PLAN
, IFNULL((SELECT CFWD_AMT FROM hubez_admin.EZ_USER_LMT WHERE USER_SEQ = A.adminSeq AND LMT_YM = DATE_FORMAT(NOW(), '%Y%m')), 0) AS CARRY_OVER -- 년월까지만 비교 해야 함.
FROM
(
SELECT
esu.USER_ID as SERVICE_ID,
eci.CUST_NM as CUST_NM ,
esi.ENTR_NO as REG_NO,
DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d') AS REG_DT,
esi.SUBS_STTUS_CD ,
esi.PROD_CD,
esi.USER_SEQ as adminSeq,
esi.ATTRCTOR_ID as attrctorId
FROM
hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_SVC_USER esu
ON esu.USER_SEQ = esi.USER_SEQ
and esu.USER_TP_CD in ('01','03')
INNER JOIN hubez_common.EZ_CUST_INFO eci
ON
eci.CUST_SEQ = esi.CUST_SEQ
AND esi.CUST_SEQ = esu.CUST_SEQ
WHERE 1 = 1
<include refid="subsListCondition"/>
ORDER BY esi.OPN_DT DESC ) A, ( SELECT @ROWNUM := 0 ) AS R
</select>
<sql id="subsListCondition">
<if test="startDt != null and startDt != ''">
@@ -238,77 +289,77 @@
</select>
<select id="selectSubsDetailInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsDetailReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.SubsDetail">
/* custMgt-mapper.xml(selectSubsDetailInfo) */
SELECT
esi.SUBS_ID ,
-- 기본정보
eci.CUST_NM as CUST_NM ,
eci.REPR_NM,
(
SELECT
DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL
WHERE
GRP_CD = 'CUST_KD_CD'
AND DTL_CD = eci.CUST_TY_CD) AS CUST_TYPE,
eci.ZIPCD AS ADR1,
eci.ADDR1 AS ADR2,
eci.ADDR2 AS ADR3,
eci.BIZRNO AS B_REG_NO,
eci.CORPNO AS CPR_REG_NO,
-- 사용정보
DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d') AS SUBS_DT,
esi.PROD_CD,
(
SELECT
DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL
WHERE
GRP_CD = 'SUBS_STTUS_CD'
AND DTL_CD = esi.SUBS_STTUS_CD) AS STAT,
(
SELECT
PROD_NM
FROM
hubez_common.EZ_PROD_INFO
WHERE
PROD_CD = esi.PROD_CD) AS PLAN,
esi.ENTR_NO as SUBS_NO,
esi.ATTRCTOR_ID AS CHANNEL_ID,
esi.ATTRCTOR_NM AS CHANNEL_NM,
esi.SUBSMNGR_ID AS ADMIN_ID,
esi.SUBSMNGR_NM AS ADMIN_NM,
-- 사용자 데이터
esu.USER_ID as SERVICE_ID,
esu.USER_SEQ,
esu.HP_NO as mdn,
(
SELECT
DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL
WHERE
GRP_CD = 'SVCUSER_TP_CD'
AND DTL_CD = esu.USER_TP_CD) AS USE_AUTH,
esu.USER_NM,
esu.HP_NO,
IFNULL((SELECT CFWD_AMT + CFWD_RSTRT_BLNC FROM hubez_admin.EZ_USER_LMT WHERE USER_SEQ = esi.USER_SEQ AND LMT_YM = DATE_FORMAT(NOW(), '%Y%m%d')), 0) AS CARRY_OVER,
(SELECT COUNT(*) FROM hubez_common.EZ_SVC_USER WHERE PRNTS_USER_SEQ =esu.USER_SEQ) AS USER_CNT
FROM
hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_SVC_USER esu
ON
esu.USER_SEQ = esi.USER_SEQ
INNER JOIN hubez_common.EZ_CUST_INFO eci
ON
eci.CUST_SEQ = esi.CUST_SEQ
AND esi.CUST_SEQ = esu.CUST_SEQ
WHERE 1 = 1
AND esu.USER_TP_CD = '01'
AND esu.USER_ID = #{serviceId}
</select>
/* custMgt-mapper.xml(selectSubsDetailInfo) */
SELECT
esi.SUBS_ID ,
-- 기본정보
eci.CUST_NM as CUST_NM ,
eci.REPR_NM,
(
SELECT
ifnull(DTL_CD_NM, '-')
FROM
hubez_common.EZ_CD_DTL
WHERE
GRP_CD = 'CUST_KD_CD'
AND DTL_CD = eci.CUST_TY_CD) AS CUST_TYPE,
eci.ZIPCD AS ADR1,
eci.ADDR1 AS ADR2,
eci.ADDR2 AS ADR3,
eci.BIZRNO AS B_REG_NO,
eci.CORPNO AS CPR_REG_NO,
-- 사용정보
ifnull(DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d'), DATE_FORMAT(esi.SUBS_DT , '%Y-%m-%d')) AS SUBS_DT,
esi.PROD_CD,
(
SELECT
DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL
WHERE
GRP_CD = 'SUBS_STTUS_CD'
AND DTL_CD = esi.SUBS_STTUS_CD) AS STAT,
(
SELECT
PROD_NM
FROM
hubez_common.EZ_PROD_INFO
WHERE
PROD_CD = esi.PROD_CD) AS PLAN,
esi.ENTR_NO as SUBS_NO,
esi.ATTRCTOR_ID AS CHANNEL_ID,
esi.ATTRCTOR_NM AS CHANNEL_NM,
esi.SUBSMNGR_ID AS ADMIN_ID,
esi.SUBSMNGR_NM AS ADMIN_NM,
-- 사용자 데이터
esu.USER_ID as SERVICE_ID,
esu.USER_SEQ,
esu.HP_NO as mdn,
(
SELECT
DTL_CD_NM
FROM
hubez_common.EZ_CD_DTL
WHERE
GRP_CD = 'SVCUSER_TP_CD'
AND DTL_CD = esu.USER_TP_CD) AS USE_AUTH,
esu.USER_NM,
esu.HP_NO,
IFNULL((SELECT CFWD_AMT + CFWD_RSTRT_BLNC FROM hubez_admin.EZ_USER_LMT WHERE USER_SEQ = esi.USER_SEQ AND LMT_YM = DATE_FORMAT(NOW(), '%Y%m')), 0) AS CARRY_OVER,
(SELECT COUNT(*) FROM hubez_common.EZ_SVC_USER WHERE PRNTS_USER_SEQ = esu.USER_SEQ and USER_TP_CD = '02' ) AS USER_CNT
FROM
hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_SVC_USER esu
ON
esu.USER_SEQ = esi.USER_SEQ
INNER JOIN hubez_common.EZ_CUST_INFO eci
ON
eci.CUST_SEQ = esi.CUST_SEQ
AND esi.CUST_SEQ = esu.CUST_SEQ
WHERE 1 = 1
AND esu.USER_TP_CD in( '01','03')
AND esu.USER_ID = #{serviceId}
</select>
<update id="updateAdminInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsDetail">
/* custMgt-mapper.xml(updateAdminInfo) */
@@ -322,12 +373,12 @@
<if test="adminNm != null and adminNm != ''">
,SUBSMNGR_NM= #{adminNm}
</if>
WHERE USER_SEQ = (SELECT esi.USER_SEQ
WHERE USER_SEQ = (SELECT USER_SEQ FROM (SELECT esi.USER_SEQ
FROM hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_SVC_USER esu
ON esu.USER_SEQ = esi.USER_SEQ
WHERE esu.USER_TP_CD = '01'
AND esu.USER_ID = #{serviceId})
AND esu.USER_ID = #{serviceId}) as sub1)
</update>
<update id="updateUserInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.UpdateUserReqDto">
@@ -356,27 +407,35 @@
<select id="selectCarryOverList" parameterType="kr.co.uplus.ez.api.custMgt.dto.CarryOverListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.CarryOver">
/* custMgt-mapper.xml(selectCarryOverList) */
SELECT
MAX(eud.COLEC_TMS) AS COLEC_TMS
,DATE_FORMAT(eud.USE_YM, '%Y-%m') AS LMT_YM
,esu.USER_ID
,ROUND(SUM(IFNULL(eud.FX_LMT_AMT,0) + IFNULL(eud.CFWD_AMT,0))) AS START_AMOUNT
,ROUND(SUM(IFNULL(eud.FX_USE_AMT,0) + IFNULL(eud.CFWD_USE_AMT,0) + IFNULL(eud.MRT_USE_AMT,0))) AS USE_AMOUNT
,ROUND(IFNULL(eud.CFWD_AMT,0)) AS KRRR_AMOUNT
,ROUND(IFNULL(eud.EXTNC_AMT,0)) AS EXTSH_AMOUNT
FROM hubez_admin.EZ_UTXNCOLEC_DTL eud
JOIN hubez_common.EZ_SUBS_INFO esi
ON eud.SUBS_ID = esi.SUBS_ID
JOIN hubez_common.EZ_SVC_USER esu
ON esi.USER_SEQ = esu.USER_SEQ
WHERE 1=1
SELECT null AS COLEC_TMS
, DATE_FORMAT(STR_TO_DATE(eul.LMT_YM ,'%Y%m'),'%Y-%m') AS LMT_YM
, esu1.USER_ID AS USER_ID
, SUM(FX_LMT_AMT + CFWD_AMT) AS START_AMOUNT
, ROUND(0) AS USE_AMOUNT
, ROUND(0) AS KRRR_AMOUNT
, ROUND(0) AS EXTSH_AMOUNT
FROM hubez_admin.EZ_USER_LMT eul
JOIN hubez_common.EZ_SVC_USER esu1 ON eul.USER_SEQ = esu1.USER_SEQ
WHERE esu1.USER_ID =#{serviceId} and eul.LMT_YM = DATE_FORMAT(now(), '%Y%m')
UNION ALL
(SELECT MAX(eud.COLEC_TMS) AS COLEC_TMS
,DATE_FORMAT(eud.USE_YM, '%Y-%m') AS LMT_YM
,esu.USER_ID
,ROUND(SUM(IFNULL(eud.FX_LMT_AMT,0) + IFNULL(eud.CFWD_AMT,0))) AS START_AMOUNT
,ROUND(SUM(IFNULL(eud.FX_USE_AMT,0) + IFNULL(eud.CFWD_USE_AMT,0) + IFNULL(eud.MRT_USE_AMT,0))) AS USE_AMOUNT
,ROUND(IFNULL(eud.CFWD_AMT,0)) AS KRRR_AMOUNT
,ROUND(IFNULL(eud.EXTNC_AMT,0)) AS EXTSH_AMOUNT
FROM hubez_admin.EZ_UTXNCOLEC_DTL eud
JOIN hubez_common.EZ_SUBS_INFO esi ON eud.SUBS_ID = esi.SUBS_ID
JOIN hubez_common.EZ_SVC_USER esu ON esi.USER_SEQ = esu.USER_SEQ
WHERE 1=1
<![CDATA[
AND eud.USE_YM >= DATE_ADD(NOW(), INTERVAL -4 MONTH)
AND eud.USE_YM < NOW()
AND eud.USE_YM >= DATE_ADD(NOW(), INTERVAL -4 MONTH)
AND eud.USE_YM < NOW()
]]>
AND esu.USER_ID = #{serviceId}
GROUP BY eud.USE_YM, eud.SUBS_ID
ORDER BY eud.USE_YM DESC
GROUP BY eud.USE_YM, eud.SUBS_ID
ORDER BY eud.USE_YM DESC)
</select>
<select id="selectImUser" parameterType="kr.co.uplus.ez.common.data.ImUser" resultType="kr.co.uplus.ez.common.data.ImUser">
@@ -461,7 +520,7 @@
SELECT
USER_NM
,DATE_FORMAT(esu.REG_DT, '%Y-%m-%d') AS REG_DT
,esu.USER_TP_CD AS USER_TYPE
,(SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD='SVCUSER_TP_CD' AND esu.USER_TP_CD = DTL_CD) AS USER_TYPE
,USER_ID
,(SELECT USER_ID FROM hubez_common.EZ_SVC_USER where USER_SEQ = esu.PRNTS_USER_SEQ LIMIT 1) AS ADMIN_ID
,esu.USER_STTUS_CD AS USER_STAT
@@ -798,7 +857,7 @@
FROM hubez_admin.EZ_USER_LMT eul
INNER JOIN hubez_common.EZ_SVC_USER esu
ON eul.USER_SEQ = esu.USER_SEQ
WHERE esu.USER_SEQ = #{userId}
WHERE esu.USER_ID = #{userId}
AND eul.LMT_YM = DATE_FORMAT(NOW(),'%Y%m')
</select>

View File

@@ -126,7 +126,6 @@
INTO hubez_send.${tableName} (
CLIENT_KEY
, REQ_PRODUCT
, TRAFFIC_TYPE
, MSG_STATUS
, REQ_DATE
, CALLBACK_NUMBER
@@ -137,7 +136,6 @@
)value(
#{clientKey}
, 'SMS'
, 'real'
, 'ready'
, NOW()
, '15445992'

View File

@@ -37,7 +37,13 @@
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'SNDBLCK_RSN_CD'
and T2.DTL_CD=esb.BLCK_RSN_CD) AS BLCK_RSN_NM
, IF(esb.BLCK_YN = 'Y', '차단', '미차단') AS BLCK_YN
, (SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'SNDBLCK_YN_CD'
AND T2.DTL_CD=esb.BLCK_YN) AS BLCK_YN
, esb.REG_ID
, esb.CHG_ID
, DATE_FORMAT(esb.CHG_DT, '%Y-%m-%d') As LAST_CHG_DT
@@ -231,7 +237,13 @@
SELECT
emb.SEQ_NO
, ebd.WORD
, IF(emb.BLCK_YN = 'Y', '차단', '미차단') AS BLCK_YN
, (SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'SNDBLCK_YN_CD'
AND T2.DTL_CD=emb.BLCK_YN) AS BLCK_YN
, DATE_FORMAT(emb.CHG_DT , '%Y-%m-%d') AS LAST_CHG_DT
,(
SELECT
@@ -329,7 +341,7 @@
) VALUES
<foreach collection="list" item="item" index="i"
separator=",">
(#{item.seqNo}, #{item.word}, #{item.regId}, NOW() )
(#{item.seqNo},#{item.seqNm}, #{item.word}, #{item.regId}, NOW() )
</foreach>
</insert>