mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 02:30:05 +09:00
유치채널관리 수정 / 정산관리 추가,수정 / 채널관리 수정 / 고객관리 수정 / 모니터링 추가 / 리스크관리 수정 / 발신번호관리
추가,수정 / 서비스관리 수정 / 발송통계 수정
This commit is contained in:
@@ -91,14 +91,18 @@ public class AttractMgtController {
|
||||
* date : 2022. 4. 26.
|
||||
* auth : ckr
|
||||
* desc : 발송건수 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @param channelDetailReqDto
|
||||
* @return
|
||||
* @
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiOperation(value = "sendNumberListExcel", notes = "유치 채널 상세 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "/sendNumberListExcel" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage sendNumberListExcel(@RequestBody Map<String, Object> paramMap) {
|
||||
return attractService.sendNumberListExcel(paramMap);
|
||||
public ChannelDetailResDto sendNumberListExcel(@RequestBody @Valid ChannelDetailReqDto channelDetailReqDto, BindingResult bindingResult) {
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new ChannelDetailResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return attractService.sendNumberListExcel(channelDetailReqDto);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,4 +17,6 @@ public interface AttractMgtMapper {
|
||||
ChannelDetailRes selectAttractDetail(ChannelDetailReqDto channelDetailReqDto);
|
||||
|
||||
List<ChannelDetail> selectSndCountList(ChannelDetailReqDto channelDetailReqDto);
|
||||
|
||||
List<ChannelDetail> sendNumberListExcel(ChannelDetailReqDto channelDetailReqDto);
|
||||
}
|
||||
|
||||
@@ -106,71 +106,18 @@ public class AttractMgtService {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발송건수 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @param channelListExcelReqDto
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public ApiResponseMessage sendNumberListExcel(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
public ChannelDetailResDto sendNumberListExcel(ChannelDetailReqDto channelDetailReqDto) {
|
||||
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
|
||||
|
||||
ChannelDetailRes channelDetailRes = new ChannelDetailRes();
|
||||
List<ChannelDetail> channelDetails = attractMgtMapper.sendNumberListExcel(channelDetailReqDto);
|
||||
channelDetailRes.setList(channelDetails);
|
||||
|
||||
dataObj.put("subsDt", "2022-03-10");
|
||||
dataObj.put("stat", "사용");
|
||||
dataObj.put("custNm", "홍길동");
|
||||
dataObj.put("plan", "요금제1");
|
||||
dataObj.put("reprNm", "홍길동");
|
||||
dataObj.put("custType", "법인사업자");
|
||||
dataObj.put("bRegNo", "1231212345");
|
||||
dataObj.put("cprRegNo", "1234561234567");
|
||||
dataObj.put("adr1", "12345");
|
||||
dataObj.put("adr2", "서울 마포구 월드컵북로 416");
|
||||
dataObj.put("adr3", "유플러스 상암사옥");
|
||||
dataObj.put("channelId", "Uplus01");
|
||||
dataObj.put("channelNm", "홍길동");
|
||||
dataObj.put("adminId", "uplus02");
|
||||
dataObj.put("adminNm", "김철수");
|
||||
|
||||
data.put("date", "합계");
|
||||
data.put("sms", "360000");
|
||||
data.put("lms", "360000");
|
||||
data.put("mms", "360000");
|
||||
data.put("totiTalk", "360000");
|
||||
data.put("allSendingCnt", "1440000");
|
||||
dataList.add(data);
|
||||
|
||||
data = new HashMap<>();
|
||||
data.put("date", "2022-03");
|
||||
data.put("sms", "10000");
|
||||
data.put("lms", "10000");
|
||||
data.put("mms", "10000");
|
||||
data.put("totiTalk", "10000");
|
||||
data.put("allSendingCnt", "40000");
|
||||
dataList.add(data);
|
||||
|
||||
data = new HashMap<>();
|
||||
data.put("date", "2022-02");
|
||||
data.put("sms", "10000");
|
||||
data.put("lms", "10000");
|
||||
data.put("mms", "10000");
|
||||
data.put("totiTalk", "10000");
|
||||
data.put("allSendingCnt", "40000");
|
||||
dataList.add(data);
|
||||
|
||||
data = new HashMap<>();
|
||||
data.put("date", "2022-01");
|
||||
data.put("sms", "10000");
|
||||
data.put("lms", "10000");
|
||||
data.put("mms", "10000");
|
||||
data.put("totiTalk", "10000");
|
||||
data.put("allSendingCnt", "40000");
|
||||
dataList.add(data);
|
||||
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
|
||||
return result;
|
||||
return new ChannelDetailResDto(ApiResponseCode.SUCCESS, channelDetailRes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,13 +13,23 @@ public class ChannelDetail implements Serializable {
|
||||
private String sumYm;
|
||||
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String")
|
||||
private String sndCnt;
|
||||
@ApiModelProperty(example = "전체 성공건수", name = "전체 성공건수", dataType = "String")
|
||||
private String succCnt;
|
||||
@ApiModelProperty(example = "SMS발송건수", name = "SMS발송건수", dataType = "String")
|
||||
private String sndCntS;
|
||||
@ApiModelProperty(example = "SMS 성공건수", name = "SMS 성공건수", dataType = "String")
|
||||
private String succCntS;
|
||||
@ApiModelProperty(example = "LMS발송건수", name = "LMS발송건수", dataType = "String")
|
||||
private String sndCntL;
|
||||
@ApiModelProperty(example = "LMS 성공건수", name = "LMS 성공건수", dataType = "String")
|
||||
private String succCntL;
|
||||
@ApiModelProperty(example = "MMS발송건수", name = "MMS발송건수", dataType = "String")
|
||||
private String sndCntM;
|
||||
@ApiModelProperty(example = "MMS 성공건수", name = "MMS 성공건수", dataType = "String")
|
||||
private String succCntM;
|
||||
@ApiModelProperty(example = "알림톡발송건수", name = "알림톡발송건수", dataType = "String")
|
||||
private String sndCntA;
|
||||
@ApiModelProperty(example = "알림톡 성공건수", name = "알림톡 성공건수", dataType = "String")
|
||||
private String succCntA;
|
||||
|
||||
}
|
||||
|
||||
@@ -20,18 +20,42 @@ public class ChannelDetailRes implements Serializable {
|
||||
private String subsDt;
|
||||
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String")
|
||||
private String norgNm;
|
||||
@ApiModelProperty(example = "사업장주소1", name = "사업장주소1", dataType = "String")
|
||||
private String adr1;
|
||||
@ApiModelProperty(example = "사업장주소2", name = "사업장주소2", dataType = "String")
|
||||
private String adr2;
|
||||
@ApiModelProperty(example = "사업장주소3", name = "사업장주소3", dataType = "String")
|
||||
private String adr3;
|
||||
@ApiModelProperty(example = "사용자일련번호", name = "사용자일련번호", dataType = "String")
|
||||
private String userSeq;
|
||||
@ApiModelProperty(example = "마당ID(이름)", name = "마당ID(이름)", dataType = "String")
|
||||
private String loginId;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "대표자명", name = "대표자명", dataType = "String")
|
||||
private String reprNm;
|
||||
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String")
|
||||
private String bizrno;
|
||||
@ApiModelProperty(example = "법인등록번호", name = "법인등록번호", dataType = "String")
|
||||
private String cprRegNo;
|
||||
@ApiModelProperty(example = "이름", name = "이름" , dataType = "String")
|
||||
private String userNm;
|
||||
@ApiModelProperty(example = "상태", name = "상태", dataType = "String")
|
||||
private String subsSttusCd;
|
||||
@ApiModelProperty(example = "구분", name = "구분", dataType = "String")
|
||||
private String custTyCd;
|
||||
@ApiModelProperty(example = "청약요금제명", name = "청약요금제명", dataType = "String")
|
||||
private String plan;
|
||||
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String")
|
||||
private String sndCnt;
|
||||
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
|
||||
private String adminId;
|
||||
@ApiModelProperty(example = "관리자명", name = "관리자명", dataType = "String")
|
||||
private String adminNm;
|
||||
@ApiModelProperty(example = "유치자ID", name = "유치자ID", dataType = "String")
|
||||
private String channelId;
|
||||
@ApiModelProperty(example = "유치자명", name = "유치자명", dataType = "String")
|
||||
private String channelNm;
|
||||
@ApiModelProperty(example = "USER ID", name = "USER ID", dataType = "String", hidden = true)
|
||||
private String userId;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ public class ChannelInfo implements Serializable {
|
||||
private String subsDt;
|
||||
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String")
|
||||
private String norgNm;
|
||||
@ApiModelProperty(example = "사용자일련번호", name = "사용자일련번호", dataType = "String")
|
||||
private String userSeq;
|
||||
@ApiModelProperty(example = "마당ID(이름)", name = "마당ID(이름)", dataType = "String")
|
||||
private String loginId;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
|
||||
@@ -10,10 +10,21 @@ import java.io.Serializable;
|
||||
public class ChannelListExcelReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
|
||||
private String searchType1;
|
||||
private String searchType;
|
||||
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
|
||||
private String searchType2;
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String")
|
||||
private String searchText1;
|
||||
|
||||
private String searchText;
|
||||
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String subsStDt;
|
||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String subsEdDt;
|
||||
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String subsSttusCd;
|
||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String loginId;
|
||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String norgNm;
|
||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String custTyCd;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,8 @@ public class ChannelListReqDto implements Serializable {
|
||||
private String custTyCd;
|
||||
@ApiModelProperty(example = "유치자ID", name = "유치자ID", dataType = "String")
|
||||
private String loginId;
|
||||
|
||||
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String")
|
||||
private String sndCnt;
|
||||
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String")
|
||||
private String norgNm;
|
||||
@ApiModelProperty(example = "상세검색조건", name = "상세검색조건", dataType = "String")
|
||||
|
||||
@@ -1,19 +1,31 @@
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 정산
|
||||
* desc : 정산
|
||||
*/
|
||||
package kr.co.uplus.ez.api.calculate;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcListReqDto;
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcListResDto;
|
||||
import kr.co.uplus.ez.api.stats.dto.BsnmMonthListResDto;
|
||||
import kr.co.uplus.ez.common.components.ValidComponents;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
|
||||
@RestController
|
||||
@@ -21,28 +33,36 @@ import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
public class CalculateController {
|
||||
@Autowired
|
||||
CalculateService calculateService;
|
||||
|
||||
|
||||
@Autowired
|
||||
ValidComponents validComponents;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 정산 이력 목록 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "calcList", notes = "정산 이력 목록 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "/calcList" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage calcList(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return calculateService.calcList(paramMap);
|
||||
public CalcListResDto calcList(@RequestBody @Valid CalcListReqDto calcListReqDto, BindingResult bindingResult) {
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new CalcListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return calculateService.calcList(calcListReqDto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 정산 이력 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/calcListExcel" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
package kr.co.uplus.ez.api.calculate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcList;
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcListReqDto;
|
||||
|
||||
@Mapper
|
||||
public class CalculateMapper {
|
||||
public interface CalculateMapper {
|
||||
|
||||
List<CalcList> selectCalculateList(CalcListReqDto calcListReqDto);
|
||||
|
||||
int selectCalculateListTotalCnt(CalcListReqDto calcListReqDto);
|
||||
|
||||
}
|
||||
|
||||
@@ -5,52 +5,72 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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.api.calculate.dto.CalcList;
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcListReqDto;
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcListRes;
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcListResDto;
|
||||
import kr.co.uplus.ez.api.stats.dto.BsnmMonthList;
|
||||
import kr.co.uplus.ez.api.stats.dto.BsnmMonthListRes;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
|
||||
@Service
|
||||
public class CalculateService {
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb1")
|
||||
private SqlSessionTemplate sqlSessionMaster;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb2")
|
||||
private SqlSessionTemplate sqlSessionSlave;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 정산 이력 목록 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage calcList(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("totalCnt","999");
|
||||
data.put("currentPage","1");
|
||||
dataObj.put("paging", data);
|
||||
|
||||
for(int i=0; i<10; i++) {
|
||||
data = new HashMap<>();
|
||||
data.put("date", "2022-02");
|
||||
data.put("custNm", "유플러스"+(i+1));
|
||||
data.put("bRegNo", "22-81-39937");
|
||||
data.put("plan", "요금제1(50000)");
|
||||
data.put("startAmount", "50000");
|
||||
data.put("useAmount", "100000");
|
||||
data.put("carryOverAmount", "-");
|
||||
data.put("unitAmount", "-");
|
||||
data.put("extshAmount", "-");
|
||||
data.put("requestAmount", "100000");
|
||||
data.put("allSendingCnt", "84000000");
|
||||
data.put("sms", "21000000");
|
||||
data.put("lms", "21000000");
|
||||
data.put("mms", "21000000");
|
||||
data.put("notiTalk", "21000000");
|
||||
dataList.add(data);
|
||||
public CalcListResDto calcList(CalcListReqDto calcListReqDto) {
|
||||
|
||||
CalculateMapper calcMapper = sqlSessionSlave.getMapper(CalculateMapper.class);
|
||||
CalcListRes calcListRes = new CalcListRes();
|
||||
|
||||
String nowPage = String.valueOf(calcListReqDto.getPage());
|
||||
int totalCnt = calcMapper.selectCalculateListTotalCnt(calcListReqDto);
|
||||
|
||||
if (totalCnt == 0) {
|
||||
calcListRes.setList(new ArrayList<>());
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
calcListRes.setPaging(paging);
|
||||
|
||||
return new CalcListResDto(ApiResponseCode.CM_NOT_FOUND, calcListRes);
|
||||
}
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
return result;
|
||||
|
||||
int page = calcListReqDto.getPage();
|
||||
int pagePerRows = calcListReqDto.getPagePerRows();
|
||||
page = (page - 1) * pagePerRows;
|
||||
calcListReqDto.setPage(page);
|
||||
|
||||
List<CalcList> calcLists = calcMapper.selectCalculateList(calcListReqDto);
|
||||
|
||||
calcListRes.setList(new ArrayList<>());
|
||||
calcListRes.setList(calcLists);
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
calcListRes.setPaging(paging);
|
||||
|
||||
return new CalcListResDto(ApiResponseCode.SUCCESS, calcListRes);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,7 +78,7 @@ public class CalculateService {
|
||||
* auth : ckr
|
||||
* desc : 정산 이력 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage calcListExcel(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
@@ -68,9 +88,9 @@ public class CalculateService {
|
||||
data.put("totalCnt","999");
|
||||
data.put("currentPage","1");
|
||||
dataObj.put("paging", data);
|
||||
|
||||
|
||||
for(int i=0; i<10; i++) {
|
||||
data = new HashMap<>();
|
||||
data = new HashMap<>();
|
||||
data.put("date", "2022-02");
|
||||
data.put("custNm", "유플러스"+(i+1));
|
||||
data.put("bRegNo", "22-81-39937");
|
||||
@@ -86,7 +106,7 @@ public class CalculateService {
|
||||
data.put("lms", "21000000");
|
||||
data.put("mms", "21000000");
|
||||
data.put("notiTalk", "21000000");
|
||||
dataList.add(data);
|
||||
dataList.add(data);
|
||||
}
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
|
||||
45
src/main/java/kr/co/uplus/ez/api/calculate/dto/CalcList.java
Normal file
45
src/main/java/kr/co/uplus/ez/api/calculate/dto/CalcList.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package kr.co.uplus.ez.api.calculate.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class CalcList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "날짜", name = "날짜", dataType = "String")
|
||||
private String useYm;
|
||||
@ApiModelProperty(example = "고객사명(이름)", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "사업자번호(생년월일)", name = "사업자번호", dataType = "String")
|
||||
private String bizrno;
|
||||
@ApiModelProperty(example = "요금제", name = "요금제", dataType = "String")
|
||||
private String prodNm;
|
||||
@ApiModelProperty(example = "요금액", name = "요금액", dataType = "String")
|
||||
private String prodAmt;
|
||||
@ApiModelProperty(example = "시작금액", name = "시작금액", dataType = "String")
|
||||
private String startAmt;
|
||||
@ApiModelProperty(example = "사용금액", name = "사용금액", dataType = "String")
|
||||
private String useAmt;
|
||||
@ApiModelProperty(example = "이월금액", name = "이월금액", dataType = "String")
|
||||
private String cfwdAmt;
|
||||
@ApiModelProperty(example = "종량금액", name = "종량금액", dataType = "String")
|
||||
private String mrtUseAmt;
|
||||
@ApiModelProperty(example = "소멸금액", name = "소멸금액", dataType = "String")
|
||||
private String extncAmt;
|
||||
@ApiModelProperty(example = "청구금액", name = "청구금액", dataType = "String")
|
||||
private String billingAmt;
|
||||
@ApiModelProperty(example = "전체 발송건수", name = "전체 발송건수", dataType = "String")
|
||||
private String totalSndCnt;
|
||||
@ApiModelProperty(example = "SMS 발송건수", name = "SMS 발송건수", dataType = "String")
|
||||
private String smsSndCnt;
|
||||
@ApiModelProperty(example = "LMS 발송건수", name = "LMS 발송건수", dataType = "String")
|
||||
private String lmsSndCnt;
|
||||
@ApiModelProperty(example = "MMS 발송건수", name = "MMS 발송건수", dataType = "String")
|
||||
private String mmsSndCnt;
|
||||
@ApiModelProperty(example = "알림톡 발송건수", name = "알림톡 발송건수", dataType = "String")
|
||||
private String atlkSndCnt;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
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;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class CalcListReqDto implements Serializable {
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
private int pagePerRows;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
|
||||
private int page;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "검색시작월", name = "검색시작월",dataType = "String")
|
||||
private String startMonth;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "검색종료월", name = "검색종료월",dataType = "String")
|
||||
private String endMonth;
|
||||
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
|
||||
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String")
|
||||
private String bizrno;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package kr.co.uplus.ez.api.calculate.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class CalcListRes implements Serializable{
|
||||
|
||||
private Paging paging;
|
||||
private List<CalcList> list;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package kr.co.uplus.ez.api.calculate.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.api.stats.dto.BsnmDayListRes;
|
||||
import kr.co.uplus.ez.api.stats.dto.BsnmDayListResDto;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class CalcListResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private CalcListRes data;
|
||||
|
||||
public CalcListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public CalcListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public CalcListResDto(ApiResponseCode returnStr, CalcListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
public class CarryOver implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "날짜", name = "날짜", dataType = "String")
|
||||
private String date;
|
||||
private String lmtYm;
|
||||
@ApiModelProperty(example = "시작금액", name = "시작금액", dataType = "String")
|
||||
private String startAmount;
|
||||
@ApiModelProperty(example = "사용금액", name = "사용금액", dataType = "String")
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package kr.co.uplus.ez.api.login;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import kr.co.uplus.ez.api.login.dto.*;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.Const;
|
||||
import kr.co.uplus.ez.common.jwt.JwtService;
|
||||
import kr.co.uplus.ez.config.SecurityConfig;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -18,33 +21,11 @@ import org.springframework.security.web.authentication.logout.SecurityContextLog
|
||||
import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
|
||||
import org.springframework.security.web.savedrequest.RequestCache;
|
||||
import org.springframework.security.web.savedrequest.SavedRequest;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import kr.co.uplus.ez.api.login.dto.AuthNumReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.AuthNumResDto;
|
||||
import kr.co.uplus.ez.api.login.dto.AuthUser;
|
||||
import kr.co.uplus.ez.api.login.dto.ChkAuthNumReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.ChkAuthNumResDto;
|
||||
import kr.co.uplus.ez.api.login.dto.LoginReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.LoginRes;
|
||||
import kr.co.uplus.ez.api.login.dto.LoginResDto;
|
||||
import kr.co.uplus.ez.api.login.dto.LogoutReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.LogoutResDto;
|
||||
import kr.co.uplus.ez.api.login.dto.ResetPasswordReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.ResetPasswordResDto;
|
||||
import kr.co.uplus.ez.api.login.dto.UpdatePasswordReqDto;
|
||||
import kr.co.uplus.ez.api.login.dto.UpdatePasswordResDto;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.Const;
|
||||
import kr.co.uplus.ez.common.jwt.JwtService;
|
||||
import kr.co.uplus.ez.config.SecurityConfig;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "/api/v1/bo/login")
|
||||
@@ -102,7 +83,7 @@ public class LoginController {
|
||||
* date : 2022. 5. 17.
|
||||
* auth : ckr
|
||||
* desc : HUBEZ_BO_API_2002 - 인증번호 요청.
|
||||
* @param reqAuthNumDto
|
||||
* @param authNumReqDto
|
||||
* @return AuthNumResDto
|
||||
* @
|
||||
*/
|
||||
|
||||
@@ -1,50 +1,74 @@
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 모니터링
|
||||
* desc : 모니터링
|
||||
*/
|
||||
package kr.co.uplus.ez.api.mntrng;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import kr.co.uplus.ez.common.components.ValidComponents;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
|
||||
import kr.co.uplus.ez.api.mntrng.dto.SendListResDto;
|
||||
import kr.co.uplus.ez.api.mntrng.dto.SendListReqDto;
|
||||
import kr.co.uplus.ez.api.mntrng.dto.LiveSendSttusReqDto;
|
||||
import kr.co.uplus.ez.api.mntrng.dto.LiveSendSttusResDto;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "api/v1/bo/mntrng")
|
||||
public class MntrngController {
|
||||
@Autowired
|
||||
MntrngService mntrngService;
|
||||
|
||||
|
||||
@Autowired
|
||||
ValidComponents validComponents;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발송내역 목록 조회
|
||||
* desc : 발송내역 목록 조회
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "sendList", notes = "발송내역 목록 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "/sendList" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage sendList(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return mntrngService.sendList(paramMap);
|
||||
public SendListResDto sendList(@RequestBody @Valid SendListReqDto sendListReqDto, BindingResult bindingResult) {
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new SendListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return mntrngService.sendList(sendListReqDto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 실시간 발송 현황 정보 조회
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "liveSendSttus", notes = "실시간 발송 현황 정보 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "/liveSendSttus" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage liveSendSttus(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return mntrngService.liveSendSttus(paramMap);
|
||||
public LiveSendSttusResDto liveSendSttus() {
|
||||
return mntrngService.liveSendSttus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,20 @@
|
||||
package kr.co.uplus.ez.api.mntrng;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import kr.co.uplus.ez.api.mntrng.dto.LiveSendSttus;
|
||||
import kr.co.uplus.ez.api.mntrng.dto.SendList;
|
||||
import kr.co.uplus.ez.api.mntrng.dto.SendListReqDto;
|
||||
|
||||
@Mapper
|
||||
public class MntrngMapper {
|
||||
public interface MntrngMapper {
|
||||
|
||||
public int selectSendListTotalCnt(SendListReqDto sendListReqDto);
|
||||
|
||||
public List<SendList> selectSendList(SendListReqDto sendListReqDto);
|
||||
|
||||
public LiveSendSttus selectLiveSendSttus(LiveSendSttus liveSendSttus);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,152 +1,196 @@
|
||||
package kr.co.uplus.ez.api.mntrng;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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;
|
||||
|
||||
@Service
|
||||
public class MntrngService {
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb1")
|
||||
private SqlSessionTemplate sqlSessionMaster;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb2")
|
||||
private SqlSessionTemplate sqlSessionSlave;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발송내역 목록 조회
|
||||
* desc : 발송내역 목록 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage sendList(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("totalCnt","999");
|
||||
data.put("currentPage","1");
|
||||
dataObj.put("paging", data);
|
||||
|
||||
for(int i=0; i<10; i++) {
|
||||
data = new HashMap<>();
|
||||
data.put("no", ""+(i+1));
|
||||
data.put("sendingDt", "2022-03-12");
|
||||
data.put("custNm", "유플러스"+(i+1));
|
||||
data.put("userId", "Uplus01");
|
||||
data.put("recvNum", "010-1234-1234");
|
||||
data.put("sendNum", "010-1234-5678");
|
||||
data.put("reqChannel", "SMS");
|
||||
data.put("lastChannel", "SMS");
|
||||
data.put("mlcmnCmpny", "LGT");
|
||||
data.put("resultCd", "성공(100)");
|
||||
data.put("reqDt", "2022-03-12 12:00:56");
|
||||
data.put("comptDt", "2022-03-12 12:00:56");
|
||||
|
||||
dataList.add(data);
|
||||
public SendListResDto sendList(SendListReqDto sendListReqDto) {
|
||||
|
||||
MntrngMapper mntrngMapper = sqlSessionSlave.getMapper(MntrngMapper.class);
|
||||
|
||||
String nowPage = String.valueOf(sendListReqDto.getPage());
|
||||
int totalCnt = mntrngMapper.selectSendListTotalCnt(sendListReqDto);
|
||||
|
||||
if (totalCnt == 0) {
|
||||
|
||||
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);
|
||||
}
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
|
||||
return result;
|
||||
|
||||
int page = sendListReqDto.getPage();
|
||||
int pagePerRows = sendListReqDto.getPagePerRows();
|
||||
page = (page - 1) * pagePerRows;
|
||||
sendListReqDto.setPage(page);
|
||||
|
||||
List<SendList> sendLists = mntrngMapper.selectSendList(sendListReqDto);
|
||||
|
||||
SendListRes sendListRes = new SendListRes();
|
||||
sendListRes.setList(sendLists);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
sendListRes.setPaging(paging);
|
||||
|
||||
return new SendListResDto(ApiResponseCode.SUCCESS, sendListRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 실시간 발송 현황 정보 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage liveSendSttus(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
|
||||
// 최근 10분 발송 현황
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("channel", "SMS");
|
||||
data.put("sendingCnt", "100");
|
||||
data.put("succesCnt", "100");
|
||||
data.put("succesRatio", "100%");
|
||||
dataList.add(data);
|
||||
data = new HashMap<>();
|
||||
data.put("channel", "LMS");
|
||||
data.put("sendingCnt", "100");
|
||||
data.put("succesCnt", "100");
|
||||
data.put("succesRatio", "100%");
|
||||
dataList.add(data);
|
||||
data = new HashMap<>();
|
||||
data.put("channel", "MMS");
|
||||
data.put("sendingCnt", "100");
|
||||
data.put("succesCnt", "100");
|
||||
data.put("succesRatio", "100%");
|
||||
data = new HashMap<>();
|
||||
data.put("channel", "알림톡");
|
||||
data.put("sendingCnt", "100");
|
||||
data.put("succesCnt", "100");
|
||||
data.put("succesRatio", "100%");
|
||||
dataList.add(data);
|
||||
dataObj.put("listM", dataList);
|
||||
|
||||
// 최근 1시간 발송 현황
|
||||
dataList = new ArrayList<>();
|
||||
data = new HashMap<>();
|
||||
data.put("channel", "SMS");
|
||||
data.put("sendingCnt", "100");
|
||||
data.put("succesCnt", "100");
|
||||
data.put("succesRatio", "100%");
|
||||
dataList.add(data);
|
||||
data = new HashMap<>();
|
||||
data.put("channel", "LMS");
|
||||
data.put("sendingCnt", "100");
|
||||
data.put("succesCnt", "100");
|
||||
data.put("succesRatio", "100%");
|
||||
dataList.add(data);
|
||||
data = new HashMap<>();
|
||||
data.put("channel", "MMS");
|
||||
data.put("sendingCnt", "100");
|
||||
data.put("succesCnt", "100");
|
||||
data.put("succesRatio", "100%");
|
||||
data = new HashMap<>();
|
||||
data.put("channel", "알림톡");
|
||||
data.put("sendingCnt", "100");
|
||||
data.put("succesCnt", "100");
|
||||
data.put("succesRatio", "100%");
|
||||
dataList.add(data);
|
||||
dataObj.put("listH", dataList);
|
||||
public LiveSendSttusResDto liveSendSttus() {
|
||||
|
||||
// 당일 발송 현황
|
||||
dataList = new ArrayList<>();
|
||||
data = new HashMap<>();
|
||||
data.put("channel", "SMS");
|
||||
data.put("sendingCnt", "100");
|
||||
data.put("succesCnt", "100");
|
||||
data.put("succesRatio", "100%");
|
||||
dataList.add(data);
|
||||
data = new HashMap<>();
|
||||
data.put("channel", "LMS");
|
||||
data.put("sendingCnt", "100");
|
||||
data.put("succesCnt", "100");
|
||||
data.put("succesRatio", "100%");
|
||||
dataList.add(data);
|
||||
data = new HashMap<>();
|
||||
data.put("channel", "MMS");
|
||||
data.put("sendingCnt", "100");
|
||||
data.put("succesCnt", "100");
|
||||
data.put("succesRatio", "100%");
|
||||
data = new HashMap<>();
|
||||
data.put("channel", "알림톡");
|
||||
data.put("sendingCnt", "100");
|
||||
data.put("succesCnt", "100");
|
||||
data.put("succesRatio", "100%");
|
||||
dataList.add(data);
|
||||
dataObj.put("listD", dataList);
|
||||
|
||||
result.setData(dataObj);
|
||||
|
||||
return result;
|
||||
MntrngMapper mntrngMapper = sqlSessionSlave.getMapper(MntrngMapper.class);
|
||||
LiveSendSttusRes liveSendSttusRes = new LiveSendSttusRes();
|
||||
LiveSendSttus reqData = new LiveSendSttus();
|
||||
LiveSendSttus resultData = new LiveSendSttus();
|
||||
|
||||
try {
|
||||
// 최근1분 발송현황정보
|
||||
resultData = new LiveSendSttus();
|
||||
reqData.setReqType("M");
|
||||
reqData.setChStr("SMS");
|
||||
resultData = mntrngMapper.selectLiveSendSttus(reqData);
|
||||
liveSendSttusRes.setSendingCntSmsM(resultData.getSendCnt());
|
||||
liveSendSttusRes.setSuccesCntSmsM(resultData.getSuccCnt());
|
||||
liveSendSttusRes.setSuccesRtSmsM(resultData.getSuccRt());
|
||||
liveSendSttusRes.setStartTimeM(resultData.getStartTime());
|
||||
liveSendSttusRes.setEndTimeM(resultData.getEndTime());
|
||||
|
||||
resultData = new LiveSendSttus();
|
||||
reqData.setChStr("MMS");
|
||||
resultData = mntrngMapper.selectLiveSendSttus(reqData);
|
||||
liveSendSttusRes.setSendingCntMmsM(resultData.getSendCnt());
|
||||
liveSendSttusRes.setSuccesCntMmsM(resultData.getSuccCnt());
|
||||
liveSendSttusRes.setSuccesRtMmsM(resultData.getSuccRt());
|
||||
|
||||
resultData = new LiveSendSttus();
|
||||
reqData.setChStr("LMS");
|
||||
resultData = mntrngMapper.selectLiveSendSttus(reqData);
|
||||
liveSendSttusRes.setSendingCntLmsM(resultData.getSendCnt());
|
||||
liveSendSttusRes.setSuccesCntLmsM(resultData.getSuccCnt());
|
||||
liveSendSttusRes.setSuccesRtLmsM(resultData.getSuccRt());
|
||||
|
||||
resultData = new LiveSendSttus();
|
||||
reqData.setChStr("ALIMTALK");
|
||||
resultData = mntrngMapper.selectLiveSendSttus(reqData);
|
||||
liveSendSttusRes.setSendingCntAlmtM(resultData.getSendCnt());
|
||||
liveSendSttusRes.setSuccesCntAlmtM(resultData.getSuccCnt());
|
||||
liveSendSttusRes.setSuccesRtAlmtM(resultData.getSuccRt());
|
||||
|
||||
// 최근1시간 발송현황정보
|
||||
resultData = new LiveSendSttus();
|
||||
reqData.setReqType("H");
|
||||
reqData.setChStr("SMS");
|
||||
resultData = mntrngMapper.selectLiveSendSttus(reqData);
|
||||
liveSendSttusRes.setSendingCntSmsH(resultData.getSendCnt());
|
||||
liveSendSttusRes.setSuccesCntSmsH(resultData.getSuccCnt());
|
||||
liveSendSttusRes.setSuccesRtSmsH(resultData.getSuccRt());
|
||||
liveSendSttusRes.setStartTimeH(resultData.getStartTime());
|
||||
liveSendSttusRes.setEndTimeH(resultData.getEndTime());
|
||||
|
||||
resultData = new LiveSendSttus();
|
||||
reqData.setChStr("MMS");
|
||||
resultData = mntrngMapper.selectLiveSendSttus(reqData);
|
||||
liveSendSttusRes.setSendingCntMmsH(resultData.getSendCnt());
|
||||
liveSendSttusRes.setSuccesCntMmsH(resultData.getSuccCnt());
|
||||
liveSendSttusRes.setSuccesRtMmsH(resultData.getSuccRt());
|
||||
|
||||
resultData = new LiveSendSttus();
|
||||
reqData.setChStr("LMS");
|
||||
resultData = mntrngMapper.selectLiveSendSttus(reqData);
|
||||
liveSendSttusRes.setSendingCntLmsH(resultData.getSendCnt());
|
||||
liveSendSttusRes.setSuccesCntLmsH(resultData.getSuccCnt());
|
||||
liveSendSttusRes.setSuccesRtLmsH(resultData.getSuccRt());
|
||||
|
||||
resultData = new LiveSendSttus();
|
||||
reqData.setChStr("ALIMTALK");
|
||||
resultData = mntrngMapper.selectLiveSendSttus(reqData);
|
||||
liveSendSttusRes.setSendingCntAlmtH(resultData.getSendCnt());
|
||||
liveSendSttusRes.setSuccesCntAlmtH(resultData.getSuccCnt());
|
||||
liveSendSttusRes.setSuccesRtAlmtH(resultData.getSuccRt());
|
||||
|
||||
// 당일 발송현황정보
|
||||
resultData = new LiveSendSttus();
|
||||
reqData.setReqType("D");
|
||||
reqData.setChStr("SMS");
|
||||
resultData = mntrngMapper.selectLiveSendSttus(reqData);
|
||||
liveSendSttusRes.setSendingCntSmsD(resultData.getSendCnt());
|
||||
liveSendSttusRes.setSuccesCntSmsD(resultData.getSuccCnt());
|
||||
liveSendSttusRes.setSuccesRtSmsD(resultData.getSuccRt());
|
||||
liveSendSttusRes.setStartTimeD(resultData.getStartTime());
|
||||
liveSendSttusRes.setEndTimeD(resultData.getEndTime());
|
||||
|
||||
resultData = new LiveSendSttus();
|
||||
reqData.setChStr("MMS");
|
||||
resultData = mntrngMapper.selectLiveSendSttus(reqData);
|
||||
liveSendSttusRes.setSendingCntMmsD(resultData.getSendCnt());
|
||||
liveSendSttusRes.setSuccesCntMmsD(resultData.getSuccCnt());
|
||||
liveSendSttusRes.setSuccesRtMmsD(resultData.getSuccRt());
|
||||
|
||||
resultData = new LiveSendSttus();
|
||||
reqData.setChStr("LMS");
|
||||
resultData = mntrngMapper.selectLiveSendSttus(reqData);
|
||||
liveSendSttusRes.setSendingCntLmsD(resultData.getSendCnt());
|
||||
liveSendSttusRes.setSuccesCntLmsD(resultData.getSuccCnt());
|
||||
liveSendSttusRes.setSuccesRtLmsD(resultData.getSuccRt());
|
||||
|
||||
resultData = new LiveSendSttus();
|
||||
reqData.setChStr("ALIMTALK");
|
||||
resultData = mntrngMapper.selectLiveSendSttus(reqData);
|
||||
liveSendSttusRes.setSendingCntAlmtD(resultData.getSendCnt());
|
||||
liveSendSttusRes.setSuccesCntAlmtD(resultData.getSuccCnt());
|
||||
liveSendSttusRes.setSuccesRtAlmtD(resultData.getSuccRt());
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
||||
return new LiveSendSttusResDto(ApiResponseCode.SUCCESS, liveSendSttusRes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package kr.co.uplus.ez.api.mntrng.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class LiveSendSttus implements Serializable {
|
||||
|
||||
private String reqType;
|
||||
private String chStr;
|
||||
private String sendCnt;
|
||||
private String succCnt;
|
||||
private String succRt;
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package kr.co.uplus.ez.api.mntrng.dto;
|
||||
|
||||
public class LiveSendSttusReqDto {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package kr.co.uplus.ez.api.mntrng.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class LiveSendSttusRes implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "10분현황 시작시간", name = "10분현황 시작시간", dataType = "String")
|
||||
private String startTimeM;
|
||||
@ApiModelProperty(example = "10분현황 종료시간", name = "10분현황 종료시간", dataType = "String")
|
||||
private String endTimeM;
|
||||
|
||||
@ApiModelProperty(example = "SMS 발송건수(10분)", name = "SMS 발송건수(10분)", dataType = "String")
|
||||
private String sendingCntSmsM;
|
||||
@ApiModelProperty(example = "SMS 성공건수(10분)", name = "SMS 성공건수(10분)", dataType = "String")
|
||||
private String succesCntSmsM;
|
||||
@ApiModelProperty(example = "SMS 성공율(10분)", name = "SMS 성공율(10분)", dataType = "String")
|
||||
private String succesRtSmsM;
|
||||
|
||||
@ApiModelProperty(example = "MMS 발송건수(10분)", name = "MMS 발송건수(10분)", dataType = "String")
|
||||
private String sendingCntMmsM;
|
||||
@ApiModelProperty(example = "MMS 성공건수(10분)", name = "MMS 성공건수(10분)", dataType = "String")
|
||||
private String succesCntMmsM;
|
||||
@ApiModelProperty(example = "MMS 성공율(10분)", name = "MMS 성공율(10분)", dataType = "String")
|
||||
private String succesRtMmsM;
|
||||
|
||||
@ApiModelProperty(example = "LMS 발송건수(10분)", name = "LMS 발송건수(10분)", dataType = "String")
|
||||
private String sendingCntLmsM;
|
||||
@ApiModelProperty(example = "LMS 성공건수(10분)", name = "LMS 성공건수(10분)", dataType = "String")
|
||||
private String succesCntLmsM;
|
||||
@ApiModelProperty(example = "LMS 성공율(10분)", name = "LMS 성공율(10분)", dataType = "String")
|
||||
private String succesRtLmsM;
|
||||
|
||||
@ApiModelProperty(example = "알림톡 발송건수(10분)", name = "알림톡 발송건수(10분)", dataType = "String")
|
||||
private String sendingCntAlmtM;
|
||||
@ApiModelProperty(example = "알림톡 성공건수(10분)", name = "알림톡 성공건수(10분)", dataType = "String")
|
||||
private String succesCntAlmtM;
|
||||
@ApiModelProperty(example = "알림톡 성공율(10분)", name = "알림톡 성공율(10분)", dataType = "String")
|
||||
private String succesRtAlmtM;
|
||||
|
||||
@ApiModelProperty(example = "1시간 현황 시작시간", name = "1시간 현황 시작시간", dataType = "String")
|
||||
private String startTimeH;
|
||||
@ApiModelProperty(example = "1시간 현황 종료시간", name = "1시간 현황 종료시간", dataType = "String")
|
||||
private String endTimeH;
|
||||
|
||||
@ApiModelProperty(example = "SMS 발송건수(1시간)", name = "SMS 발송건수(1시간)", dataType = "String")
|
||||
private String sendingCntSmsH;
|
||||
@ApiModelProperty(example = "SMS 성공건수(1시간)", name = "SMS 성공건수(1시간)", dataType = "String")
|
||||
private String succesCntSmsH;
|
||||
@ApiModelProperty(example = "SMS 성공율(1시간)", name = "SMS 성공율(1시간)", dataType = "String")
|
||||
private String succesRtSmsH;
|
||||
|
||||
@ApiModelProperty(example = "MMS 발송건수(1시간)", name = "MMS 발송건수(1시간)", dataType = "String")
|
||||
private String sendingCntMmsH;
|
||||
@ApiModelProperty(example = "MMS 성공건수(1시간)", name = "MMS 성공건수(1시간)", dataType = "String")
|
||||
private String succesCntMmsH;
|
||||
@ApiModelProperty(example = "MMS 성공율(1시간)", name = "MMS 성공율(1시간)", dataType = "String")
|
||||
private String succesRtMmsH;
|
||||
|
||||
@ApiModelProperty(example = "LMS 발송건수(1시간)", name = "LMS 발송건수(1시간)", dataType = "String")
|
||||
private String sendingCntLmsH;
|
||||
@ApiModelProperty(example = "LMS 성공건수(1시간)", name = "LMS 성공건수(1시간)", dataType = "String")
|
||||
private String succesCntLmsH;
|
||||
@ApiModelProperty(example = "LMS 성공율(1시간)", name = "LMS 성공율(1시간)", dataType = "String")
|
||||
private String succesRtLmsH;
|
||||
|
||||
@ApiModelProperty(example = "알림톡 발송건수(1시간)", name = "알림톡 발송건수(1시간)", dataType = "String")
|
||||
private String sendingCntAlmtH;
|
||||
@ApiModelProperty(example = "알림톡 성공건수(1시간)", name = "알림톡 성공건수(1시간)", dataType = "String")
|
||||
private String succesCntAlmtH;
|
||||
@ApiModelProperty(example = "알림톡 성공율(1시간)", name = "알림톡 성공율(1시간)", dataType = "String")
|
||||
private String succesRtAlmtH;
|
||||
|
||||
@ApiModelProperty(example = "당일 현황 시작시간", name = "당일 현황 시작시간", dataType = "String")
|
||||
private String startTimeD;
|
||||
@ApiModelProperty(example = "당일 현황 종료시간", name = "당일 현황 종료시간", dataType = "String")
|
||||
private String endTimeD;
|
||||
@ApiModelProperty(example = "SMS 발송건수(당일)", name = "SMS 발송건수(당일)", dataType = "String")
|
||||
private String sendingCntSmsD;
|
||||
@ApiModelProperty(example = "SMS 성공건수(당일)", name = "SMS 성공건수(당일)", dataType = "String")
|
||||
private String succesCntSmsD;
|
||||
@ApiModelProperty(example = "SMS 성공율(당일)", name = "SMS 성공율(당일)", dataType = "String")
|
||||
private String succesRtSmsD;
|
||||
|
||||
@ApiModelProperty(example = "MMS 발송건수(당일)", name = "MMS 발송건수(당일)", dataType = "String")
|
||||
private String sendingCntMmsD;
|
||||
@ApiModelProperty(example = "MMS 성공건수(당일)", name = "MMS 성공건수(당일)", dataType = "String")
|
||||
private String succesCntMmsD;
|
||||
@ApiModelProperty(example = "MMS 성공율(당일)", name = "MMS 성공율(당일)", dataType = "String")
|
||||
private String succesRtMmsD;
|
||||
|
||||
@ApiModelProperty(example = "LMS 발송건수(당일)", name = "LMS 발송건수(당일)", dataType = "String")
|
||||
private String sendingCntLmsD;
|
||||
@ApiModelProperty(example = "LMS 성공건수(당일)", name = "LMS 성공건수(당일)", dataType = "String")
|
||||
private String succesCntLmsD;
|
||||
@ApiModelProperty(example = "LMS 성공율(당일)", name = "LMS 성공율(당일)", dataType = "String")
|
||||
private String succesRtLmsD;
|
||||
|
||||
@ApiModelProperty(example = "알림톡 발송건수(당일)", name = "알림톡 발송건수(당일)", dataType = "String")
|
||||
private String sendingCntAlmtD;
|
||||
@ApiModelProperty(example = "알림톡 성공건수(당일)", name = "알림톡 성공건수(당일)", dataType = "String")
|
||||
private String succesCntAlmtD;
|
||||
@ApiModelProperty(example = "알림톡 성공율(당일)", name = "알림톡 성공율(당일)", dataType = "String")
|
||||
private String succesRtAlmtD;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.mntrng.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class LiveSendSttusResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private LiveSendSttusRes data;
|
||||
|
||||
public LiveSendSttusResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public LiveSendSttusResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public LiveSendSttusResDto(ApiResponseCode returnStr, LiveSendSttusRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
37
src/main/java/kr/co/uplus/ez/api/mntrng/dto/SendList.java
Normal file
37
src/main/java/kr/co/uplus/ez/api/mntrng/dto/SendList.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package kr.co.uplus.ez.api.mntrng.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "no", name = "no", dataType = "String")
|
||||
private String no;
|
||||
@ApiModelProperty(example = "발송일자", name = "발송일자", dataType = "String")
|
||||
private String sentDate;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "발송아이디(사용자ID)", name = "발송아이디(사용자ID)", dataType = "String")
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "수신번호", name = "수신번호", dataType = "String")
|
||||
private String phone;
|
||||
@ApiModelProperty(example = "발신번호", name = "발신번호", dataType = "String")
|
||||
private String callbackNumber;
|
||||
@ApiModelProperty(example = "요청채널", name = "요청채널", dataType = "String")
|
||||
private String reqProduct;
|
||||
@ApiModelProperty(example = "최종채널", name = "최종채널", dataType = "String")
|
||||
private String doneCh;
|
||||
@ApiModelProperty(example = "이통사", name = "이통사", dataType = "String")
|
||||
private String doneTelco;
|
||||
@ApiModelProperty(example = "결과(코드)", name = "결과(코드)", dataType = "String")
|
||||
private String doneCode;
|
||||
@ApiModelProperty(example = "요청일시", name = "요청일시", dataType = "String")
|
||||
private String reqDate;
|
||||
@ApiModelProperty(example = "완료일시", name = "완료일시", dataType = "String")
|
||||
private String doneDate;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
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;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendListReqDto implements Serializable {
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
private int pagePerRows;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
|
||||
private int page;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "발송일", name = "발송일",dataType = "String")
|
||||
private String sentDate;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "요청채널", name = "요청채널", dataType = "String")
|
||||
private String reqChennel;
|
||||
|
||||
@ApiModelProperty(example = "수신번호", name = "수신번호", dataType = "String")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(example = "발신번호", name = "발신번호", dataType = "String")
|
||||
private String callbackNumber;
|
||||
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
|
||||
}
|
||||
15
src/main/java/kr/co/uplus/ez/api/mntrng/dto/SendListRes.java
Normal file
15
src/main/java/kr/co/uplus/ez/api/mntrng/dto/SendListRes.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.mntrng.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendListRes implements Serializable{
|
||||
private Paging paging;
|
||||
private List<SendList> list;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.mntrng.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendListResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private SendListRes data;
|
||||
|
||||
public SendListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public SendListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public SendListResDto(ApiResponseCode returnStr, SendListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,7 +11,6 @@ import io.swagger.annotations.ApiResponses;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.*;
|
||||
import kr.co.uplus.ez.common.components.ValidComponents;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -21,7 +20,6 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "api/v1/bo/sendNumMgt")
|
||||
@@ -145,35 +143,57 @@ public class SendNumMgtController {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발신번호 승인 목록 조회
|
||||
* @param paramMap
|
||||
* @param sendNumberApprListReqDto
|
||||
*/
|
||||
@ApiOperation(value = "/apprList", notes = "발신번호 승인 목록 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "/apprList" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage apprList(@RequestBody Map<String, Object> paramMap) {
|
||||
return sendNumService.apprList(paramMap);
|
||||
public SendNumberApprListResDto apprList(@RequestBody @Valid SendNumberApprListReqDto sendNumberApprListReqDto, BindingResult bindingResult) {
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new SendNumberApprListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return sendNumService.apprList(sendNumberApprListReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발신번호 승인 상세 정보 조회
|
||||
* @param paramMap
|
||||
* @param sendNumberApprDetailReqDto
|
||||
*/
|
||||
@ApiOperation(value = "/apprDetail", notes = "발신번호 승인 상세 정보 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "/apprDetail" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage apprDetail(@RequestBody Map<String, Object> paramMap) {
|
||||
return sendNumService.apprDetail(paramMap);
|
||||
public SendNumberApprDetailResDto apprDetail(@RequestBody @Valid SendNumberApprDetailReqDto sendNumberApprDetailReqDto, BindingResult bindingResult) {
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new SendNumberApprDetailResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return sendNumService.apprDetail(sendNumberApprDetailReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발송내역 목록 조회
|
||||
* @param paramMap
|
||||
* desc : 발신번호 승인내역 수정
|
||||
* @param updateApprReqDto
|
||||
*/
|
||||
@RequestMapping(value = "/insertAppr" , method = {RequestMethod.POST})
|
||||
@ApiOperation(value = "/updateAppr", notes = "발신번호 승인내역 수정")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "/updateAppr" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage insertAppr(@RequestBody Map<String, Object> paramMap) {
|
||||
return sendNumService.insertAppr(paramMap);
|
||||
public UpdateApprResDto updateAppr(@RequestBody @Valid UpdateApprReqDto updateApprReqDto, BindingResult bindingResult) {
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new UpdateApprResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return sendNumService.updateAppr(updateApprReqDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,22 +1,9 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.*;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.SendAdminInfo;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.SendAdminListReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.AuthFileInfo;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.DeleteNumberReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.DetailNumber;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.DetailNumberReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumber;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumberFile;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumberReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.ProfileInfo;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.ProfileListReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberInfo;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListReqDto;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
interface SendNumMgtMapper {
|
||||
@@ -36,16 +23,37 @@ interface SendNumMgtMapper {
|
||||
|
||||
int deleteNumber(DeleteNumberReqDto deleteNumberReqDto);
|
||||
|
||||
String selectRegReqNo();
|
||||
|
||||
List<InsertNumber> selectSndrnoList(InsertNumberReqDto insertNumberReqDto);
|
||||
|
||||
void insertNumber(InsertNumberReqDto insertNumberReqDto);
|
||||
|
||||
void insertNumberDoc(InsertNumberFile insertNumberFile);
|
||||
|
||||
void insertNumberList(InsertNumber insertNumber);
|
||||
|
||||
void insertNumbers(InsertNumberReqDto insertNumberReqDto);
|
||||
|
||||
String selectUserSeqByRegNo(DetailNumberReqDto detailNumberReqDto);
|
||||
|
||||
DetailNumber detailNumber(DetailNumberReqDto detailNumberReqDto);
|
||||
|
||||
List<AuthFileInfo> selectAuthFileList(DetailNumberReqDto detailNumberReqDto);
|
||||
|
||||
int selectSvcSndrnoListTotalCnt(SendNumberApprListReqDto sendNumberApprListReqDto);
|
||||
|
||||
List<SendNumberApprInfo> selectSvcSndrnoList(SendNumberApprListReqDto sendNumberApprListReqDto);
|
||||
|
||||
SendNumberApprDetailRes selectSvcSndrnoReqDetail(SendNumberApprDetailReqDto sendNumberApprDetailReqDto);
|
||||
|
||||
List<SendNumberApprNum> selectSvcSndnoList(SendNumberApprDetailReqDto sendNumberApprDetailReqDto);
|
||||
|
||||
List<SendNumberApprDoc> selectSndnoDocList(SendNumberApprDetailReqDto sendNumberApprDetailReqDto);
|
||||
|
||||
int updateSndrno(UpdateApprSendNumber updateApprSendNumber);
|
||||
|
||||
int upddateSndrnoReg(UpdateApprReqDto updateApprReqDto);
|
||||
|
||||
int updateSvcUser(UpdateApprReqDto updateApprReqDto);
|
||||
}
|
||||
|
||||
@@ -2,8 +2,10 @@ package kr.co.uplus.ez.api.sendNumMgt;
|
||||
|
||||
import kr.co.uplus.ez.api.sendNumMgt.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 kr.co.uplus.ez.common.utils.DateUtils;
|
||||
import kr.co.uplus.ez.common.utils.FileIoUtils;
|
||||
import kr.co.uplus.ez.common.utils.FileUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
@@ -11,13 +13,12 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class SendNumMgtService {
|
||||
@@ -36,7 +37,7 @@ public class SendNumMgtService {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발신 프로필 목록 조회
|
||||
* @param paramMap
|
||||
* @param profileListReqDto
|
||||
* @return
|
||||
*/
|
||||
public ProfileListResDto profileList(ProfileListReqDto profileListReqDto) {
|
||||
@@ -118,7 +119,7 @@ public class SendNumMgtService {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 문자 발신 번호 삭제
|
||||
* @param paramMap
|
||||
* @param deleteNumberReqDto
|
||||
* @return
|
||||
*/
|
||||
public DeleteNumberResDto deleteNumber(DeleteNumberReqDto deleteNumberReqDto) {
|
||||
@@ -138,172 +139,157 @@ public class SendNumMgtService {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 문자 발신 번호 등록
|
||||
* @param paramMap
|
||||
* @param insertNumberReqDto
|
||||
* @return
|
||||
*/
|
||||
public InsertNumberResDto insertNumber(InsertNumberReqDto insertNumberReqDto, MultipartHttpServletRequest multipartRequest) {
|
||||
FileUtil fileUtil = new FileUtil();
|
||||
|
||||
SendNumMgtMapper sendNumMgtMapper = sqlSessionSlave.getMapper(SendNumMgtMapper.class);
|
||||
SendNumMgtMapper sendNumMgtMapper = sqlSessionMaster.getMapper(SendNumMgtMapper.class);
|
||||
|
||||
String adminId = insertNumberReqDto.getAdminId();
|
||||
|
||||
if(StringUtils.equals("01", insertNumberReqDto.getNmineeDivCd())){
|
||||
File tenureFile = (File) multipartRequest.getFile("tenureFile");
|
||||
File businessFile = (File) multipartRequest.getFile("businessFile");
|
||||
File communicationFile = (File) multipartRequest.getFile("communicationFile");
|
||||
// 2. 중복 발신번호 체크를 위한 조회.
|
||||
List<InsertNumber> sendNumbers = sendNumMgtMapper.selectSndrnoList(insertNumberReqDto);
|
||||
List<InsertNumber> resSendNumbers = new ArrayList<>();
|
||||
|
||||
}else{
|
||||
File trustFile = (File) multipartRequest.getFile("trustFile");
|
||||
File warrantFile = (File) multipartRequest.getFile("warrantFile");
|
||||
File deputyFile = (File) multipartRequest.getFile("deputyFile");
|
||||
File tenureFile = (File) multipartRequest.getFile("tenureFile");
|
||||
File businessFile = (File) multipartRequest.getFile("businessFile");
|
||||
if(insertNumberReqDto.getList().size() == sendNumbers.size()){
|
||||
// 중복건... 오류
|
||||
}
|
||||
// 실패 항목 응답.
|
||||
if(sendNumbers.size() > 0){
|
||||
// 중복건의 대한 오류 응답.
|
||||
resSendNumbers.addAll(sendNumbers);
|
||||
}
|
||||
|
||||
// 1. 발신번호 등록
|
||||
// sendNumUploadPath
|
||||
// 2. 발신번호 등록용 파일.
|
||||
// String userSeq = sendNumMgtMapper.selectUserSeqByAdminId(adminId);
|
||||
//
|
||||
// insertNumberReqDto.setUserSeq(userSeq);
|
||||
// insertNumberReqDto.setReqCnt(insertNumberReqDto.getList().size()+1);
|
||||
// try {
|
||||
// // 1. EZ_SNDRNO_REG
|
||||
// sendNumMgtMapper.insertNumber(insertNumberReqDto);
|
||||
//
|
||||
// String path = "C:/hubeasyfiles/sndrNo/"+insertNumberReqDto.getAdminId();
|
||||
// File dir = new File(path);
|
||||
// if(!dir.isDirectory()) {
|
||||
// dir.mkdirs();
|
||||
// }
|
||||
//
|
||||
// for(int i=0;i<insertNumberReqDto.getAuthSendNum().size();i++) {
|
||||
//
|
||||
// String docTpCd = "";
|
||||
//
|
||||
// if(insertNumberReqDto.getAuthSendNum().size() == 2) { //서류 유형코드 구분
|
||||
// switch(i){
|
||||
// case 0:
|
||||
// docTpCd = "08"; // 통신서비스 이용 증명원
|
||||
// break;
|
||||
// case 1:
|
||||
// docTpCd = "07"; //재직증명서
|
||||
// break;
|
||||
// default:
|
||||
// docTpCd = "00";
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// else if(insertNumberReqDto.getAuthSendNum().size() == 4) {//서류 유형코드 구분
|
||||
// switch(i){
|
||||
// case 0:
|
||||
// docTpCd = "03"; //위임수임관계확인서류
|
||||
// break;
|
||||
// case 1:
|
||||
// docTpCd = "04"; //위임장
|
||||
// break;
|
||||
// case 2:
|
||||
// docTpCd = "05"; //대리인 신분증 사본 인증
|
||||
// break;
|
||||
// case 3:
|
||||
// docTpCd = "07"; //재직증명서
|
||||
// break;
|
||||
// default:
|
||||
// docTpCd = "00";
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// path += path +"/"+ docTpCd;
|
||||
//
|
||||
// InsertNumberFile insertFile = new InsertNumberFile();
|
||||
//
|
||||
// MultipartFile file = insertNumberReqDto.getAuthSendNum().get(i);
|
||||
// String docTitle = file.getName();
|
||||
// String fileNm = file.getOriginalFilename();
|
||||
// String filePath = path+"/"+file.getOriginalFilename();
|
||||
// long fileSize = file.getSize();
|
||||
// String regId = insertNumberReqDto.getRegId();
|
||||
//
|
||||
//
|
||||
// if(!fileUtil.upload(file, docTitle, path)) {//파일저장
|
||||
// return new InsertNumberResDto(ApiResponseCode.CM_DB_QUERY_ERR);//파일저장 실패시
|
||||
// }
|
||||
// //파일저장 성공시 insert
|
||||
// insertFile.setRegReqNo(insertNumberReqDto.getRegReqNo());
|
||||
// insertFile.setDocTpCd(docTpCd);
|
||||
// insertFile.setDocTitle(docTitle);
|
||||
// insertFile.setFileNm(fileNm);
|
||||
// insertFile.setFilePath(filePath);
|
||||
// insertFile.setFileSize(fileSize);
|
||||
// insertFile.setRegId(regId);
|
||||
//
|
||||
// // 2. EZ_SNDRNO_DOC
|
||||
// sendNumMgtMapper.insertNumberDoc(insertFile);
|
||||
// }
|
||||
// for(int j=0;j<insertNumberReqDto.getAuthBsns().size();j++) {
|
||||
//
|
||||
// String docTpCd = "";
|
||||
//
|
||||
// switch(j){//서류 유형코드 구분
|
||||
// case 0:
|
||||
// docTpCd = "06"; //사업자등록증
|
||||
// break;
|
||||
// default:
|
||||
// docTpCd = "00";
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// path += path +"/"+ docTpCd;
|
||||
//
|
||||
// InsertNumberFile insertFile = new InsertNumberFile();
|
||||
//
|
||||
// MultipartFile file = insertNumberReqDto.getAuthSendNum().get(j);
|
||||
// String docTitle = file.getName();
|
||||
// String fileNm = file.getOriginalFilename();
|
||||
// String filePath = path+"/"+file.getOriginalFilename();
|
||||
// long fileSize = file.getSize();
|
||||
// String regId = insertNumberReqDto.getRegId();
|
||||
//
|
||||
//
|
||||
// if(!fileUtil.upload(file, docTitle, path)) {//파일저장
|
||||
// return new InsertNumberResDto(ApiResponseCode.SE_UNKNOWN);// 파일저장 실패하면
|
||||
// }
|
||||
//
|
||||
// insertFile.setRegReqNo(insertNumberReqDto.getRegReqNo());
|
||||
// insertFile.setDocTpCd(docTpCd);
|
||||
// insertFile.setDocTitle(docTitle);
|
||||
// insertFile.setFileNm(fileNm);
|
||||
// insertFile.setFilePath(filePath);
|
||||
// insertFile.setFileSize(fileSize);
|
||||
// insertFile.setRegId(regId);
|
||||
// // 3. EZ_SVC_SNDRNO
|
||||
// sendNumMgtMapper.insertNumberDoc(insertFile);
|
||||
// }
|
||||
//
|
||||
// for(int k=0;k<insertNumberReqDto.getList().size();k++) {
|
||||
// InsertNumber insertNumber = insertNumberReqDto.getList().get(k);
|
||||
//
|
||||
// insertNumber.setCustSeq(insertNumberReqDto.getUserSeq());
|
||||
// insertNumber.setRegReqNo(insertNumberReqDto.getRegReqNo());
|
||||
// insertNumber.setNmineeDivCd(insertNumberReqDto.getNmineeDivCd());
|
||||
// insertNumber.setInchDivCd(insertNumberReqDto.getInchDivCd());
|
||||
//
|
||||
// sendNumMgtMapper.insertNumberList(insertNumber);
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// return new InsertNumberResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
// }
|
||||
// 1. 발신번호 SEQ 채번
|
||||
String regReqNo = sendNumMgtMapper.selectRegReqNo();
|
||||
String userSeq = sendNumMgtMapper.selectUserSeqByAdminId(adminId);
|
||||
try {
|
||||
insertNumberReqDto.setUserSeq(userSeq);
|
||||
insertNumberReqDto.setReqCnt(insertNumberReqDto.getList().size());
|
||||
insertNumberReqDto.setRegId(adminId);
|
||||
insertNumberReqDto.setRegReqNo(regReqNo);
|
||||
|
||||
return new InsertNumberResDto(ApiResponseCode.SUCCESS);
|
||||
// 2. 발신번호등록 테이블 저장. (EZ_SNDRNO_REG)
|
||||
sendNumMgtMapper.insertNumber(insertNumberReqDto);
|
||||
|
||||
String yyyyMMdd = DateUtils.date2strYMD();
|
||||
// Path : efs/admin/sendNumDoc/yyyy/mm/
|
||||
String path = sendNumUploadPath + yyyyMMdd.substring(0, 4) + File.separator + yyyyMMdd.substring(4, 6);
|
||||
File dir = new File(path);
|
||||
if(!dir.isDirectory()) {
|
||||
dir.mkdirs();
|
||||
}
|
||||
|
||||
// 3. 발신번호 테이블 저장. (EZ_SVC_SNDRNO)
|
||||
List<InsertNumber> reqSendNumbers = insertNumberReqDto.getList();
|
||||
List<InsertNumber> dbSendNumbers = new ArrayList<>();
|
||||
for(InsertNumber insertNumber: reqSendNumbers){
|
||||
for(InsertNumber insertNumber1: resSendNumbers){
|
||||
if(StringUtils.equals(insertNumber.getSendNum(), insertNumber1.getSendNum())){
|
||||
reqSendNumbers.remove(insertNumber1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (InsertNumber dbInsertNumber : reqSendNumbers){
|
||||
dbInsertNumber.setCustSeq(insertNumberReqDto.getCustSeq());
|
||||
dbInsertNumber.setRegReqNo(regReqNo);
|
||||
dbInsertNumber.setNmineeDivCd(insertNumberReqDto.getNmineeDivCd());
|
||||
dbInsertNumber.setInchDivCd(Const.INCH_DIV_CD_ADM);
|
||||
if(StringUtils.equals(Const.COMM_YES, insertNumberReqDto.getBizrAuthYn())){
|
||||
dbInsertNumber.setNmineeDivCd(Const.NMINEE_DIV_CD);
|
||||
}else{
|
||||
dbInsertNumber.setNmineeDivCd(insertNumberReqDto.getNmineeDivCd());
|
||||
}
|
||||
dbInsertNumber.setRegId(adminId);
|
||||
sendNumMgtMapper.insertNumberList(dbInsertNumber);
|
||||
}
|
||||
|
||||
// 사업자 인증이 안된 경우 파일업로드...
|
||||
if(!StringUtils.equals(Const.COMM_YES, insertNumberReqDto.getBizrAuthYn())){
|
||||
|
||||
// 4. 발신번호 등록 서류 테이블 저장. (EZ_SNDRNO_DOC)
|
||||
// DOC_NO 채번.
|
||||
String regId = insertNumberReqDto.getRegId();
|
||||
|
||||
List<MultipartFile> multipartFiles = new ArrayList<>();
|
||||
List<String> docTpCd = new ArrayList<>();
|
||||
|
||||
// 통신서비스이용 증명원 '01'
|
||||
MultipartFile communicationFile = multipartRequest.getFile("communicationFile");
|
||||
multipartFiles.add(communicationFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_01);
|
||||
|
||||
// 재직증명서 '02'
|
||||
MultipartFile tenureFile = multipartRequest.getFile("tenureFile");
|
||||
multipartFiles.add(tenureFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_02);
|
||||
// 사업자등록증 '06'
|
||||
MultipartFile businessFile = multipartRequest.getFile("businessFile");
|
||||
multipartFiles.add(businessFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_06);
|
||||
|
||||
if(StringUtils.equals("02", insertNumberReqDto.getNmineeDivCd())){
|
||||
// 위임-수임관계 확인 서류 '03'
|
||||
MultipartFile trustFile = multipartRequest.getFile("trustFile");
|
||||
multipartFiles.add(trustFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_03);
|
||||
// 위임장 '04'
|
||||
MultipartFile warrantFile = multipartRequest.getFile("warrantFile");
|
||||
multipartFiles.add(warrantFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_04);
|
||||
// 대리인신분증 사본인증 '05'
|
||||
MultipartFile deputyFile = multipartRequest.getFile("deputyFile");
|
||||
multipartFiles.add(deputyFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_05);
|
||||
// 타사업자등록증 '07'
|
||||
MultipartFile otherBusinessFile = multipartRequest.getFile("otherBusinessFile");
|
||||
multipartFiles.add(otherBusinessFile);
|
||||
docTpCd.add(Const.SNDRNO_DOC_TP_CD_07);
|
||||
}
|
||||
|
||||
// 파일 업로드 및 테이블 저장 (등록 서류 관련).
|
||||
for(int j=0; j<multipartFiles.size(); j++){
|
||||
// DOC FILE UPLOAD.
|
||||
String ext = FileIoUtils.getExtension(multipartFiles.get(j).getOriginalFilename());
|
||||
// File Nm : [reg_req_no]_[doc_no]_[doc_tp_cd].확장자
|
||||
String fileNm = regReqNo + "_" + docTpCd.get(j).substring(1,2) + "_" + docTpCd.get(j) + "." + ext;
|
||||
String titleNm = multipartFiles.get(j).getOriginalFilename();
|
||||
long fileSize = multipartFiles.get(j).getSize();
|
||||
FileUtil.upload(multipartFiles.get(j), fileNm, path);
|
||||
|
||||
// 발신번호 등록 서류 테이블 저장 (EZ_SNDRNO_DOC).
|
||||
InsertNumberFile insertFile = new InsertNumberFile();
|
||||
insertFile.setRegReqNo(regReqNo);
|
||||
insertFile.setDocNo(docTpCd.get(j).substring(1,2));
|
||||
insertFile.setDocTpCd(docTpCd.get(j));
|
||||
insertFile.setDocTitle(titleNm);
|
||||
insertFile.setFileNm(fileNm);
|
||||
insertFile.setFilePath(path);
|
||||
insertFile.setFileSize(fileSize);
|
||||
insertFile.setRegId(regId);
|
||||
sendNumMgtMapper.insertNumberDoc(insertFile);
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
return new InsertNumberResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
InsertNumberRes insertNumberRes = new InsertNumberRes();
|
||||
if(resSendNumbers.size() > 0){
|
||||
// 발신번호 중복건 응답 처리.
|
||||
insertNumberRes.setList(resSendNumbers);
|
||||
}
|
||||
|
||||
return new InsertNumberResDto(ApiResponseCode.SUCCESS, insertNumberRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 문자 발신 번호 정보 상세 조회
|
||||
* @param paramMap
|
||||
* @param detailNumberReqDto
|
||||
* @return
|
||||
*/
|
||||
public DetailNumberResDto numberDetail(DetailNumberReqDto detailNumberReqDto) {
|
||||
@@ -329,7 +315,7 @@ public class SendNumMgtService {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자ID 목록 조회
|
||||
* @param paramMap
|
||||
* @param adminListReqDto
|
||||
* @return
|
||||
*/
|
||||
public SendAdminListResDto adminList(SendAdminListReqDto adminListReqDto) {
|
||||
@@ -357,95 +343,124 @@ public class SendNumMgtService {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발신번호 승인 목록 조회
|
||||
* @param paramMap
|
||||
* @param sendNumberApprListReqDto
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage apprList(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("totalCnt","999");
|
||||
data.put("currentPage","1");
|
||||
dataObj.put("paging", data);
|
||||
public SendNumberApprListResDto apprList(SendNumberApprListReqDto sendNumberApprListReqDto) {
|
||||
|
||||
for(int i=0; i<10; i++) {
|
||||
data = new HashMap<>();
|
||||
data.put("no", ""+(i+1));
|
||||
data.put("reqApprDt", "2022-03-03");
|
||||
data.put("adminId", "Uplus01");
|
||||
data.put("register", "Uplus01");
|
||||
data.put("bRegNo", "229-81-39938");
|
||||
data.put("reqCnt", "3");
|
||||
data.put("apprCnt", "2");
|
||||
data.put("returnCnt", "1");
|
||||
data.put("apprStat", "처리완료");
|
||||
data.put("apprDt", "2022-03-03");
|
||||
SendNumMgtMapper sendNumMgtMapper = sqlSessionSlave.getMapper(SendNumMgtMapper.class);
|
||||
|
||||
dataList.add(data);
|
||||
String nowPage = String.valueOf(sendNumberApprListReqDto.getPage());
|
||||
int totalCnt = sendNumMgtMapper.selectSvcSndrnoListTotalCnt(sendNumberApprListReqDto);
|
||||
|
||||
if(totalCnt == 0) {
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
SendNumberApprListRes sendNumberApprListRes = new SendNumberApprListRes();
|
||||
sendNumberApprListRes.setList(new ArrayList<>());
|
||||
sendNumberApprListRes.setPaging(paging);
|
||||
return new SendNumberApprListResDto(ApiResponseCode.CM_NOT_FOUND, sendNumberApprListRes);
|
||||
}
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
|
||||
return result;
|
||||
int page = sendNumberApprListReqDto.getPage();
|
||||
int pagePerRows = sendNumberApprListReqDto.getPage();
|
||||
page = (page - 1) * pagePerRows;
|
||||
sendNumberApprListReqDto.setPage(page);
|
||||
|
||||
List<SendNumberApprInfo> sendNumberApprInfos = sendNumMgtMapper.selectSvcSndrnoList(sendNumberApprListReqDto);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
|
||||
SendNumberApprListRes sendNumberApprListRes = new SendNumberApprListRes();
|
||||
sendNumberApprListRes.setList(sendNumberApprInfos);
|
||||
sendNumberApprListRes.setPaging(paging);
|
||||
|
||||
return new SendNumberApprListResDto(ApiResponseCode.SUCCESS, sendNumberApprListRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발신번호 승인 상세 정보 조회
|
||||
* @param paramMap
|
||||
* @param sendNumberApprDetailReqDto
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage apprDetail(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
dataObj.put("reqApprDt", "2022-03-03");
|
||||
dataObj.put("apprDt", "2022-03-03");
|
||||
dataObj.put("adminId", "Uplus01");
|
||||
dataObj.put("register", "Uplus01");
|
||||
dataObj.put("bRegNo", "229-81-39938");
|
||||
dataObj.put("returnReason", "반려내용 - 사용거부 번호");
|
||||
dataObj.put("authSendNumNms", "통신서비스 가입증명원.jpg");
|
||||
dataObj.put("authBsnsNms", "인감증명서.jpg,사업자등록증.jpg");
|
||||
public SendNumberApprDetailResDto apprDetail(SendNumberApprDetailReqDto sendNumberApprDetailReqDto) {
|
||||
|
||||
data = new HashMap<>();
|
||||
data.put("no", "1");
|
||||
data.put("sendNum", "02-1234-5678");
|
||||
data.put("apprStat", "반려");
|
||||
dataList.add(data);
|
||||
SendNumMgtMapper sendNumMgtMapper = sqlSessionSlave.getMapper(SendNumMgtMapper.class);
|
||||
|
||||
data = new HashMap<>();
|
||||
data.put("no", "2");
|
||||
data.put("sendNum", "070-1234-5678");
|
||||
data.put("apprStat", "승인");
|
||||
dataList.add(data);
|
||||
// Detail 조회.
|
||||
SendNumberApprDetailRes sendNumberApprDetailRes = sendNumMgtMapper.selectSvcSndrnoReqDetail(sendNumberApprDetailReqDto);
|
||||
|
||||
data = new HashMap<>();
|
||||
data.put("no", "3");
|
||||
data.put("sendNum", "1588-1677");
|
||||
data.put("apprStat", "승인");
|
||||
dataList.add(data);
|
||||
// 발신번호 목록 조회
|
||||
List<SendNumberApprNum> sendNumberApprNums = sendNumMgtMapper.selectSvcSndnoList(sendNumberApprDetailReqDto);
|
||||
|
||||
dataObj.put("list", dataList);
|
||||
// 발신번호 문서 목록 조회
|
||||
List<SendNumberApprDoc> sendNumberApprDocs = sendNumMgtMapper.selectSndnoDocList(sendNumberApprDetailReqDto);
|
||||
|
||||
result.setData(dataObj);
|
||||
sendNumberApprDetailRes.setNumList(sendNumberApprNums);
|
||||
sendNumberApprDetailRes.setDocList(sendNumberApprDocs);
|
||||
|
||||
return result;
|
||||
return new SendNumberApprDetailResDto(ApiResponseCode.SUCCESS, sendNumberApprDetailRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발송내역 목록 조회
|
||||
* @param paramMap
|
||||
* desc : 발신번호 승인내역 수정
|
||||
* @param updateApprReqDto
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage insertAppr(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
return result;
|
||||
public UpdateApprResDto updateAppr(UpdateApprReqDto updateApprReqDto) {
|
||||
|
||||
SendNumMgtMapper sendNumMgtMapper = sqlSessionMaster.getMapper(SendNumMgtMapper.class);
|
||||
|
||||
// 발신번호 메모 업데이트. upddateSndrnoReg
|
||||
int totalCnt = updateApprReqDto.getList().size();
|
||||
int apvCnt = 0;
|
||||
int rejtCnt = 0;
|
||||
for(UpdateApprSendNumber updateApprSendNumber: updateApprReqDto.getList()){
|
||||
if(StringUtils.equals(Const.SNDRNO_STTUS_CD_APPR, updateApprSendNumber.getSttusCd())){
|
||||
apvCnt++;
|
||||
}else if(StringUtils.equals(Const.SNDRNO_STTUS_CD_REJECT, updateApprSendNumber.getSttusCd())){
|
||||
rejtCnt++;
|
||||
}
|
||||
updateApprSendNumber.setAdminId(updateApprReqDto.getAdminId());
|
||||
sendNumMgtMapper.updateSndrno(updateApprSendNumber);
|
||||
}
|
||||
|
||||
updateApprReqDto.setApvCnt(apvCnt);
|
||||
updateApprReqDto.setRejtCnt(rejtCnt);
|
||||
|
||||
if(totalCnt == apvCnt){
|
||||
updateApprReqDto.setReqSttusCd(Const.SNDRNO_REQ_STTUS_CD_COMPLETED);
|
||||
updateApprReqDto.setCmpltYn(Const.COMM_YES);
|
||||
}else{
|
||||
updateApprReqDto.setReqSttusCd(Const.SNDRNO_REQ_STTUS_CD_WAITING);
|
||||
}
|
||||
|
||||
int result = sendNumMgtMapper.upddateSndrnoReg(updateApprReqDto);
|
||||
|
||||
if(result > 0){
|
||||
|
||||
}
|
||||
|
||||
// 발신번호 상태 변경. updateSndrno
|
||||
//result = sendNumMgtMapper.updateSndrno(updateApprReqDto);
|
||||
|
||||
if(result > 0){
|
||||
|
||||
}
|
||||
|
||||
// 승인건이 1건이상이면 사업자 인증 'Y'
|
||||
if(apvCnt > 0){
|
||||
sendNumMgtMapper.updateSvcUser(updateApprReqDto);
|
||||
}
|
||||
|
||||
return new UpdateApprResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -18,22 +18,46 @@ public class InsertNumberReqDto implements Serializable{
|
||||
@ApiModelProperty(example = "고객사명(이름)", name = "고객사명(이름)", dataType = "String")
|
||||
private String custNm;
|
||||
|
||||
@ApiModelProperty(example = "사업자번호(생년월일)", name = "사업자번호(생년월일)", dataType = "String")
|
||||
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String")
|
||||
private String bRegNo;
|
||||
|
||||
@ApiModelProperty(example = "사업자인증여부", name = "사업자인증여부", dataType = "String")
|
||||
private String bizrAuthYn;
|
||||
|
||||
private List<InsertNumber> list;
|
||||
|
||||
@ApiModelProperty(example = "발신번호 인증 파일", name = "발신번호 인증 파일", dataType = "String")
|
||||
private List<MultipartFile> authSendNum;
|
||||
@ApiModelProperty(example = "file", name = "위임-수임관계 확인 서류", dataType = "String")
|
||||
private MultipartFile trustFile;
|
||||
|
||||
@ApiModelProperty(example = "사업자 인증 파일", name = "사업자 인증 파일", dataType = "String")
|
||||
private List<MultipartFile> authBsns;
|
||||
@ApiModelProperty(example = "file", name = "위임장", dataType = "String")
|
||||
private MultipartFile warrantFile;
|
||||
|
||||
@ApiModelProperty(example = "file", name = "대리인 신분증 사본 인증", dataType = "String")
|
||||
private MultipartFile deputyFile;
|
||||
|
||||
@ApiModelProperty(example = "file", name = "재직증명서", dataType = "String")
|
||||
private MultipartFile tenureFile;
|
||||
|
||||
@ApiModelProperty(example = "file", name = "통신서비스 이용증명원", dataType = "String")
|
||||
private MultipartFile communicationFile;
|
||||
|
||||
@ApiModelProperty(example = "file", name = "사업자등록증", dataType = "String")
|
||||
private MultipartFile businessFile;
|
||||
|
||||
@ApiModelProperty(example = "file", name = "타사업자등록증", dataType = "String")
|
||||
private MultipartFile otherBusinessFile;
|
||||
|
||||
// @ApiModelProperty(example = "발신번호 인증 파일", name = "발신번호 인증 파일", dataType = "String")
|
||||
// private List<MultipartFile> authSendNum;
|
||||
|
||||
// @ApiModelProperty(example = "사업자 인증 파일", name = "사업자 인증 파일", dataType = "String")
|
||||
// private List<MultipartFile> authBsns;
|
||||
|
||||
@ApiModelProperty(example = "명의자 구분 코드", name = "명의자 구분 코드", dataType = "String")
|
||||
private String nmineeDivCd;
|
||||
|
||||
@ApiModelProperty(example = "인입채널 구분 코드", name = "인입채널 구분 코드", dataType = "String")
|
||||
private String inchDivCd;
|
||||
// @ApiModelProperty(example = "인입채널 구분 코드", name = "인입채널 구분 코드", dataType = "String")
|
||||
// private String inchDivCd;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "등록 ID", name = "등록 ID", dataType = "String", hidden=true)
|
||||
@@ -42,10 +66,14 @@ public class InsertNumberReqDto implements Serializable{
|
||||
@ApiModelProperty(example = "이용자 일련번호", name = "이용자 일련번호", dataType = "String", hidden=true)
|
||||
private String userSeq;
|
||||
|
||||
@ApiModelProperty(example = "등록요청번호", name = "등록요청번호", dataType = "String", hidden=true)
|
||||
private String regReqNo;
|
||||
@ApiModelProperty(example = "일련번호", name = "일련번호", dataType = "String", hidden=true)
|
||||
private String custSeq;
|
||||
|
||||
@ApiModelProperty(example = "요청건수", name = "요청건수", dataType = "String", hidden=true)
|
||||
private int reqCnt;
|
||||
|
||||
@ApiModelProperty(example = "", name = "", dataType = "String", hidden=true)
|
||||
private String regReqNo;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class InsertNumberRes extends ResponseMessage implements Serializable{
|
||||
|
||||
private List<InsertNumber> list;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class InsertNumberResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
// 데이터.
|
||||
private Object data;
|
||||
private InsertNumberRes data;
|
||||
|
||||
public InsertNumberResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
@@ -23,7 +23,7 @@ public class InsertNumberResDto extends ResponseMessage implements Serializable{
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public InsertNumberResDto(ApiResponseCode returnStr, Object data) {
|
||||
public InsertNumberResDto(ApiResponseCode returnStr, InsertNumberRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendAdminInfo implements Serializable{
|
||||
@@ -17,4 +17,10 @@ public class SendAdminInfo implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
|
||||
@ApiModelProperty(example = "사업자인증여부", name = "사업자인증여부", dataType = "String")
|
||||
private String bizrAuthYn;
|
||||
|
||||
@ApiModelProperty(example = "", name = "", dataType = "String")
|
||||
private String custSeq;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendNumberApprDetailReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "등록요청번호", name = "등록요청번호", dataType = "String")
|
||||
private String regReqNo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendNumberApprDetailRes implements Serializable{
|
||||
private Paging paging;
|
||||
private List<SendNumberApprNum> numList;
|
||||
private List<SendNumberApprDoc> docList;
|
||||
|
||||
@ApiModelProperty(example = "요록요청번호", name = "요록요청번호", dataType = "String")
|
||||
private String regReqNo;
|
||||
@ApiModelProperty(example = "요청일", name = "요청일", notes = "YYYY-MM-DD", dataType = "String")
|
||||
private String regDt;
|
||||
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
|
||||
private String adminId;
|
||||
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String")
|
||||
private String bizrno;
|
||||
@ApiModelProperty(example = "명의자 구분", name = "명의자 구분", dataType = "String")
|
||||
private String nmineeDivCd;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", notes = "고객사명( 개인: 이름)", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "완료일", name = "완료일", notes = "YYYY-MM-DD", dataType = "String")
|
||||
private String cmpltDt;
|
||||
@ApiModelProperty(example = "본인인증휴대폰번호", name = "본인인증휴대폰번호", dataType = "String")
|
||||
private String slfAuthHp;
|
||||
@ApiModelProperty(example = "메모", name = "메모", dataType = "String")
|
||||
private String memo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendNumberApprDetailResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
// 데이터.
|
||||
private SendNumberApprDetailRes data;
|
||||
|
||||
public SendNumberApprDetailResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public SendNumberApprDetailResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public SendNumberApprDetailResDto(ApiResponseCode returnStr, SendNumberApprDetailRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendNumberApprDoc implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "Integer")
|
||||
private Integer no;
|
||||
@ApiModelProperty(example = "문서명", name = "문서명", dataType = "String")
|
||||
private String docTitle;
|
||||
@ApiModelProperty(example = "저장위치", name = "저장위치", dataType = "String")
|
||||
private String filePath;
|
||||
@ApiModelProperty(example = "저장파일명", name = "저장파일명", dataType = "String")
|
||||
private String fileNm;
|
||||
@ApiModelProperty(example = "파일 구분", name = "파일 구분", dataType = "String")
|
||||
private String docTpCd;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendNumberApprInfo implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "Integer")
|
||||
private Integer no;
|
||||
@ApiModelProperty(example = "요록요청번호", name = "요록요청번호", dataType = "String")
|
||||
private String regReqNo;
|
||||
@ApiModelProperty(example = "요청일", name = "요청일", notes = "YYYY-MM-DD", dataType = "String")
|
||||
private String regDt;
|
||||
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
|
||||
private String adminId;
|
||||
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String")
|
||||
private String bizrno;
|
||||
@ApiModelProperty(example = "명의자 구분", name = "명의자 구분", dataType = "String")
|
||||
private String nmineeDivCd;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", notes = "고객사명( 개인: 이름)", dataType = "String")
|
||||
private String custNm;
|
||||
|
||||
@ApiModelProperty(example = "요청건수", name = "요청건수", dataType = "int")
|
||||
private int reqCnt;
|
||||
@ApiModelProperty(example = "승인건수", name = "승인건수", dataType = "int")
|
||||
private int apvCnt;
|
||||
@ApiModelProperty(example = "반려건수", name = "반려건수", dataType = "int")
|
||||
private int rejtCnt;
|
||||
@ApiModelProperty(example = "승인상태", name = "승인상태", notes = "항목 : 01:승인대기/02:승인완료/03:반려", dataType = "String")
|
||||
private String reqSttusCd;
|
||||
@ApiModelProperty(example = "완료일", name = "완료일", notes = "YYYY-MM-DD", dataType = "String")
|
||||
private String cmpltDt;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendNumberApprListReqDto implements Serializable{
|
||||
|
||||
|
||||
@ApiModelProperty(example = "상태", name = "상태", notes = "항목 : 전체(Defalut)/승인대기/처리완료", dataType = "String")
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "명의자구분", name = "명의자구분", notes = "항목 : 전체/사업자(본인, 대표, 임직원)/타사업자", dataType = "String")
|
||||
private String searchType2;
|
||||
|
||||
@ApiModelProperty(example = "검색어", name = "사업자번호", dataType = "String")
|
||||
private String searchText1;
|
||||
|
||||
@ApiModelProperty(example = "검색어(입력)", name = "고객사명", dataType = "String")
|
||||
private String searchText2;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수",notes = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "int")
|
||||
private int pagePerRows;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
|
||||
private int page;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendNumberApprListRes implements Serializable{
|
||||
private Paging paging;
|
||||
private List<SendNumberApprInfo> list;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendNumberApprListResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
// 데이터.
|
||||
private SendNumberApprListRes data;
|
||||
|
||||
public SendNumberApprListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public SendNumberApprListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public SendNumberApprListResDto(ApiResponseCode returnStr, SendNumberApprListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendNumberApprNum implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "일련번호", name = "일련번호", dataType = "String")
|
||||
private String seqNo;
|
||||
@ApiModelProperty(example = "발신번호", name = "발신번호", dataType = "String")
|
||||
private String sndrno;
|
||||
@ApiModelProperty(example = "발신번호 상태코드", name = "발신번호 상태코드", dataType = "String")
|
||||
private String sttusCd;
|
||||
@ApiModelProperty(example = "발신번호등록번호", name = "발신번호등록번호", dataType = "String")
|
||||
private String regReqNo;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UpdateApprReqDto implements Serializable{
|
||||
|
||||
private List<UpdateApprSendNumber> list;
|
||||
|
||||
@ApiModelProperty(example = "발신번호 등록번호", name = "발신번호 등록번호", dataType = "String", hidden=true)
|
||||
private String regReqNo;
|
||||
|
||||
@ApiModelProperty(example = "메모", name = "메모", dataType = "String")
|
||||
private String memo;
|
||||
|
||||
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
|
||||
private String adminId;
|
||||
|
||||
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "int")
|
||||
private int apvCnt;
|
||||
|
||||
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "int")
|
||||
private int rejtCnt;
|
||||
|
||||
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
|
||||
private String reqSttusCd;
|
||||
|
||||
@ApiModelProperty(example = "처리완료여부", name = "처리완료여부", dataType = "String")
|
||||
private String cmpltYn;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UpdateApprResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
// 데이터.
|
||||
private Object data;
|
||||
|
||||
public UpdateApprResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public UpdateApprResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public UpdateApprResDto(ApiResponseCode returnStr, Object data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UpdateApprSendNumber implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "일련번호", name = "일련번호", dataType = "String")
|
||||
private String seqNo;
|
||||
@ApiModelProperty(example = "발신번호", name = "발신번호", dataType = "String")
|
||||
private String sndrno;
|
||||
@ApiModelProperty(example = "발신번호 상태코드", name = "발신번호 상태코드", dataType = "String")
|
||||
private String sttusCd;
|
||||
@ApiModelProperty(example = "발신번호등록번호", name = "발신번호등록번호", dataType = "String")
|
||||
private String regReqNo;
|
||||
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String")
|
||||
private String adminId;
|
||||
|
||||
|
||||
}
|
||||
@@ -7,12 +7,16 @@ import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface StatsMapper {
|
||||
|
||||
/** */
|
||||
List<MonthList> selectMonStatList(MonthListReqDto monthListReqDto);
|
||||
|
||||
/** */
|
||||
List<DayList> selectDayStatList(DayListReqDto dayListReqDto);
|
||||
|
||||
/** 월별톨계 목록 조회 */
|
||||
List<BsnmMonthList> selectCustMstatList(BsnmMonthListReqDto bsnmMonthListReqDto);
|
||||
|
||||
/** 일별통계 목록 조회 */
|
||||
List<BsnmDayList> selectCustDstatList(BsnmDayListReqDto bsnmDayListReqDto);
|
||||
/** 월별통계 카운트 조회 */
|
||||
int selectCustMstatListTotalCnt(BsnmMonthListReqDto bsnmMonthListReqDto);
|
||||
/** 일별통계 카운트 조회 */
|
||||
int selectCustDstatListTotalCnt(BsnmDayListReqDto bsnmDayListReqDto);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package kr.co.uplus.ez.api.stats;
|
||||
import kr.co.uplus.ez.api.stats.dto.*;
|
||||
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 org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
@@ -29,7 +31,7 @@ public class StatsService {
|
||||
* auth : ckr
|
||||
* desc : 월별 통계 목록 조회
|
||||
* @param monthListReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public MonthListResDto monthList(MonthListReqDto monthListReqDto) {
|
||||
StatsMapper statsMapper = sqlSessionSlave.getMapper(StatsMapper.class);
|
||||
@@ -47,17 +49,17 @@ public class StatsService {
|
||||
* auth : ckr
|
||||
* desc : 월별 통계 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage monthListExcel(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
for(int i=1; i<=4; i++) {
|
||||
data = new HashMap<>();
|
||||
data.put("date", "2022-0"+i);
|
||||
data = new HashMap<>();
|
||||
data.put("date", "2022-0"+i);
|
||||
data.put("allSendCnt", "40000000");
|
||||
data.put("allSuccesCnt", "40000000(100%)");
|
||||
data.put("smsSendCnt", "10000000");
|
||||
@@ -68,21 +70,21 @@ public class StatsService {
|
||||
data.put("mmsSuccesCnt", "10000000(100%)");
|
||||
data.put("notiTalkSendCnt", "10000000");
|
||||
data.put("notiTalkSuccesCnt", "10000000(100%)");
|
||||
|
||||
dataList.add(data);
|
||||
|
||||
dataList.add(data);
|
||||
}
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 일별 통계 목록 조회
|
||||
* desc : 일별 통계 목록 조회
|
||||
* @param dayListReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public DayListResDto dayList(DayListReqDto dayListReqDto) {
|
||||
StatsMapper statsMapper = sqlSessionSlave.getMapper(StatsMapper.class);
|
||||
@@ -100,17 +102,17 @@ public class StatsService {
|
||||
* auth : ckr
|
||||
* desc : 일별 통계 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage dayListExcel(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
for(int i=1; i<=9; i++) {
|
||||
data = new HashMap<>();
|
||||
data.put("date", "2022-03-0"+i);
|
||||
data = new HashMap<>();
|
||||
data.put("date", "2022-03-0"+i);
|
||||
data.put("allSendCnt", "40000000");
|
||||
data.put("allSuccesCnt", "40000000(100%)");
|
||||
data.put("smsSendCnt", "10000000");
|
||||
@@ -121,12 +123,12 @@ public class StatsService {
|
||||
data.put("mmsSuccesCnt", "10000000(100%)");
|
||||
data.put("notiTalkSendCnt", "10000000");
|
||||
data.put("notiTalkSuccesCnt", "10000000(100%)");
|
||||
|
||||
dataList.add(data);
|
||||
|
||||
dataList.add(data);
|
||||
}
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -135,17 +137,43 @@ public class StatsService {
|
||||
* auth : ckr
|
||||
* desc : 사업자 월별 통계 목록 조회
|
||||
* @param bsnmMonthListReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public BsnmMonthListResDto bsnmMonthList(BsnmMonthListReqDto bsnmMonthListReqDto) {
|
||||
|
||||
StatsMapper statsMapper = sqlSessionSlave.getMapper(StatsMapper.class);
|
||||
|
||||
String nowPage = String.valueOf(bsnmMonthListReqDto.getPage());
|
||||
int totalCnt = statsMapper.selectCustMstatListTotalCnt(bsnmMonthListReqDto);
|
||||
|
||||
if (totalCnt == 0) {
|
||||
|
||||
BsnmMonthListRes bsnmMonthListRes = new BsnmMonthListRes();
|
||||
bsnmMonthListRes.setList(new ArrayList<>());
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
bsnmMonthListRes.setPaging(paging);
|
||||
|
||||
return new BsnmMonthListResDto(ApiResponseCode.CM_NOT_FOUND, bsnmMonthListRes);
|
||||
}
|
||||
|
||||
int page = bsnmMonthListReqDto.getPage();
|
||||
int pagePerRows = bsnmMonthListReqDto.getPagePerRows();
|
||||
page = (page - 1) * pagePerRows;
|
||||
bsnmMonthListReqDto.setPage(page);
|
||||
|
||||
List<BsnmMonthList> bsnmMonthLists = statsMapper.selectCustMstatList(bsnmMonthListReqDto);
|
||||
|
||||
BsnmMonthListRes bsnmMonthListRes = new BsnmMonthListRes();
|
||||
bsnmMonthListRes.setList(bsnmMonthLists);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
bsnmMonthListRes.setPaging(paging);
|
||||
|
||||
return new BsnmMonthListResDto(ApiResponseCode.SUCCESS, bsnmMonthListRes);
|
||||
}
|
||||
|
||||
@@ -154,16 +182,16 @@ public class StatsService {
|
||||
* auth : ckr
|
||||
* desc : 사업자 월별 통계 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage bsnmMonthListExcel(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
for(int i=1; i<=4; i++) {
|
||||
data = new HashMap<>();
|
||||
data = new HashMap<>();
|
||||
data.put("date", "2022-0"+i);
|
||||
data.put("custNm", "유플러스");
|
||||
data.put("bRegNo", "사업자번호");
|
||||
@@ -177,12 +205,12 @@ public class StatsService {
|
||||
data.put("mmsSuccesCnt", "10000000(100%)");
|
||||
data.put("notiTalkSendCnt", "10000000");
|
||||
data.put("notiTalkSuccesCnt", "10000000(100%)");
|
||||
|
||||
dataList.add(data);
|
||||
|
||||
dataList.add(data);
|
||||
}
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -191,16 +219,42 @@ public class StatsService {
|
||||
* auth : ckr
|
||||
* desc : 사업자 일별 통계 목록 조회
|
||||
* @param bsnmDayListReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public BsnmDayListResDto bsnmDayList(BsnmDayListReqDto bsnmDayListReqDto) {
|
||||
StatsMapper statsMapper = sqlSessionSlave.getMapper(StatsMapper.class);
|
||||
|
||||
String nowPage = String.valueOf(bsnmDayListReqDto.getPage());
|
||||
int totalCnt = statsMapper.selectCustDstatListTotalCnt(bsnmDayListReqDto);
|
||||
|
||||
if (totalCnt == 0) {
|
||||
|
||||
BsnmDayListRes bsnmDayListRes = new BsnmDayListRes();
|
||||
bsnmDayListRes.setList(new ArrayList<>());
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
bsnmDayListRes.setPaging(paging);
|
||||
|
||||
return new BsnmDayListResDto (ApiResponseCode.CM_NOT_FOUND, bsnmDayListRes);
|
||||
}
|
||||
|
||||
int page = bsnmDayListReqDto.getPage();
|
||||
int pagePerRows = bsnmDayListReqDto.getPagePerRows();
|
||||
page = (page -1) * pagePerRows;
|
||||
bsnmDayListReqDto.setPage(page);
|
||||
|
||||
List<BsnmDayList> bsnmDayLists = statsMapper.selectCustDstatList(bsnmDayListReqDto);
|
||||
|
||||
BsnmDayListRes bsnmDayListRes = new BsnmDayListRes();
|
||||
bsnmDayListRes.setList(bsnmDayLists);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
bsnmDayListRes.setPaging(paging);
|
||||
|
||||
return new BsnmDayListResDto(ApiResponseCode.SUCCESS, bsnmDayListRes);
|
||||
}
|
||||
|
||||
@@ -209,16 +263,16 @@ public class StatsService {
|
||||
* auth : ckr
|
||||
* desc : 사업자 일별 통계 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage bsnmDayListExcel(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
for(int i=1; i<=9; i++) {
|
||||
data = new HashMap<>();
|
||||
data = new HashMap<>();
|
||||
data.put("date", "2022-03-0"+i);
|
||||
data.put("custNm", "유플러스");
|
||||
data.put("bRegNo", "사업자번호");
|
||||
@@ -232,12 +286,12 @@ public class StatsService {
|
||||
data.put("mmsSuccesCnt", "10000000(100%)");
|
||||
data.put("notiTalkSendCnt", "10000000");
|
||||
data.put("notiTalkSuccesCnt", "10000000(100%)");
|
||||
|
||||
dataList.add(data);
|
||||
|
||||
dataList.add(data);
|
||||
}
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@ public class BsnmDayList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "날짜", name = "날짜", dataType = "String")
|
||||
private String sumYmd;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String")
|
||||
private String bizrno;
|
||||
@ApiModelProperty(example = "전체 발송건수", name = "전체 발송건수", dataType = "String")
|
||||
private String sndCnt;
|
||||
@ApiModelProperty(example = "전체 성공건수", name = "전체 성공건수", dataType = "String")
|
||||
|
||||
@@ -10,10 +10,19 @@ import java.io.Serializable;
|
||||
@Data
|
||||
public class BsnmDayListReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "조회시작월", name = "조회시작월", dataType = "String")
|
||||
private String startMon;
|
||||
@ApiModelProperty(example = "조회종료월", name = "조회종료월",dataType = "String")
|
||||
private String endMon;
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "조회시작일", name = "조회시작일", dataType = "String")
|
||||
private String startDay;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "조회종료일", name = "조회종료일",dataType = "String")
|
||||
private String endDay;
|
||||
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
|
||||
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String")
|
||||
private String bizrno;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
|
||||
@@ -5,9 +5,12 @@ import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class BsnmDayListRes implements Serializable{
|
||||
|
||||
private Paging paging;
|
||||
private List<BsnmDayList> list;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,11 @@ import java.io.Serializable;
|
||||
public class BsnmMonthList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "날짜", name = "날짜", dataType = "String")
|
||||
private String sumYmd;
|
||||
private String sumYm;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String")
|
||||
private String bizrno;
|
||||
@ApiModelProperty(example = "전체 발송건수", name = "전체 발송건수", dataType = "String")
|
||||
private String sndCnt;
|
||||
@ApiModelProperty(example = "전체 성공건수", name = "전체 성공건수", dataType = "String")
|
||||
|
||||
@@ -10,11 +10,20 @@ import java.io.Serializable;
|
||||
@Data
|
||||
public class BsnmMonthListReqDto implements Serializable {
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "조회시작월", name = "조회시작월", dataType = "String")
|
||||
private String startMon;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "조회종료월", name = "조회종료월",dataType = "String")
|
||||
private String endMon;
|
||||
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
|
||||
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String")
|
||||
private String bizrno;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
private int pagePerRows;
|
||||
|
||||
@@ -5,9 +5,12 @@ import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class BsnmMonthListRes implements Serializable{
|
||||
|
||||
private Paging paging;
|
||||
private List<BsnmMonthList> list;
|
||||
}
|
||||
|
||||
@@ -10,17 +10,17 @@ import java.io.Serializable;
|
||||
@Data
|
||||
public class DayListReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "조회시작월", name = "조회시작월", dataType = "String")
|
||||
private String startMon;
|
||||
@ApiModelProperty(example = "조회종료월", name = "조회종료월",dataType = "String")
|
||||
private String endMon;
|
||||
@ApiModelProperty(example = "조회시작일", name = "조회시작일", dataType = "String")
|
||||
private String startDay;
|
||||
@ApiModelProperty(example = "조회종료일", name = "조회종료일",dataType = "String")
|
||||
private String endDay;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
private int pagePerRows;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
|
||||
private int page;
|
||||
// @NotNull
|
||||
// @ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
// private int pagePerRows;
|
||||
//
|
||||
// @NotNull
|
||||
// @ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
|
||||
// private int page;
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import java.io.Serializable;
|
||||
public class MonthList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "날짜", name = "날짜", dataType = "String")
|
||||
private String sumYmd;
|
||||
private String sumYm;
|
||||
@ApiModelProperty(example = "전체 발송건수", name = "전체 발송건수", dataType = "String")
|
||||
private String sndCnt;
|
||||
@ApiModelProperty(example = "전체 성공건수", name = "전체 성공건수", dataType = "String")
|
||||
|
||||
@@ -84,5 +84,24 @@ public class Const {
|
||||
/** 가입 상태 코드(99:해지) */
|
||||
public static final String SUBS_STTUS_CD_BREAK = "99";
|
||||
|
||||
public static final String SNDRNO_DOC_TP_CD_01 = "01";
|
||||
public static final String SNDRNO_DOC_TP_CD_02 = "02";
|
||||
public static final String SNDRNO_DOC_TP_CD_03 = "03";
|
||||
public static final String SNDRNO_DOC_TP_CD_04 = "04";
|
||||
public static final String SNDRNO_DOC_TP_CD_05 = "05";
|
||||
public static final String SNDRNO_DOC_TP_CD_06 = "06";
|
||||
public static final String SNDRNO_DOC_TP_CD_07 = "07";
|
||||
|
||||
public static final String INCH_DIV_CD_HOME = "01";
|
||||
public static final String INCH_DIV_CD_ADM = "02";
|
||||
|
||||
public static final String NMINEE_DIV_CD = "01";
|
||||
public static final String NMINEE_DIV_CD_OTHER = "02";
|
||||
|
||||
public static final String SNDRNO_REQ_STTUS_CD_WAITING = "01";
|
||||
public static final String SNDRNO_REQ_STTUS_CD_COMPLETED = "02";
|
||||
|
||||
public static final String SNDRNO_STTUS_CD_APPR = "01";
|
||||
public static final String SNDRNO_STTUS_CD_COMPLETED = "02";
|
||||
public static final String SNDRNO_STTUS_CD_REJECT = "03";
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package kr.co.uplus.ez.common.jwt;
|
||||
|
||||
import static kr.co.uplus.ez.config.SecurityConfig.LOGIN_API_URL;
|
||||
import static kr.co.uplus.ez.config.SecurityConfig.PUBLIC_API_URL;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -19,25 +22,34 @@ import io.jsonwebtoken.impl.TextCodec;
|
||||
import kr.co.uplus.ez.common.data.Const;
|
||||
import kr.co.uplus.ez.common.utils.WebUtils;
|
||||
|
||||
public abstract class JwtAuthFilter extends OncePerRequestFilter {
|
||||
public abstract class JwtAuthFilter extends OncePerRequestFilter {
|
||||
|
||||
protected final JwtProperties jwtProps;
|
||||
|
||||
|
||||
public JwtAuthFilter(JwtProperties jwtProps) {
|
||||
this.jwtProps = jwtProps;
|
||||
}
|
||||
|
||||
public abstract String getToken(HttpServletRequest request);
|
||||
|
||||
public abstract void onValidateSuccess(HttpServletRequest request, HttpServletResponse response, Claims claims);
|
||||
|
||||
public abstract void onValidateException(HttpServletRequest request, HttpServletResponse response,
|
||||
JwtException exception);
|
||||
public abstract void onValidateException(HttpServletRequest request, HttpServletResponse response, JwtException exception);
|
||||
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
|
||||
throws ServletException, IOException {
|
||||
if (WebUtils.isResourceRequest(request) || WebUtils.isMatchedUriPattern(request, "/api/v1/bo/login/**")) {
|
||||
if (WebUtils.isResourceRequest(request) || WebUtils.isMatchedUriPattern(request, "/login",
|
||||
"/api/v1/bo/login/**",
|
||||
"/v2/api-docs",
|
||||
"/swagger-resources",
|
||||
"/swagger-resources/**",
|
||||
"/configuration/ui",
|
||||
"/configuration/security",
|
||||
"/swagger-ui.html",
|
||||
"/webjars/**",
|
||||
"/v3/api-docs/**",
|
||||
"/swagger-ui/**",
|
||||
"/")) {
|
||||
chain.doFilter(request, response);
|
||||
return;
|
||||
}
|
||||
@@ -45,7 +57,7 @@ public abstract class JwtAuthFilter extends OncePerRequestFilter {
|
||||
// 쿠키에서 토큰 추출 (client - server token)
|
||||
String token = getToken(request);
|
||||
|
||||
if (token == null) {
|
||||
if(token == null) {
|
||||
chain.doFilter(request, response); // go to the next filter in the filter chain
|
||||
return;
|
||||
}
|
||||
@@ -55,24 +67,26 @@ public abstract class JwtAuthFilter extends OncePerRequestFilter {
|
||||
|
||||
try {
|
||||
// 4. 토큰 검증
|
||||
claims = Jwts.parser().setSigningKey(TextCodec.BASE64.decode(jwtProps.getKeyString())).parseClaimsJws(token)
|
||||
claims = Jwts.parser()
|
||||
.setSigningKey(TextCodec.BASE64.decode(jwtProps.getKeyString()))
|
||||
.parseClaimsJws(token)
|
||||
.getBody();
|
||||
|
||||
String subject = claims.getSubject();
|
||||
if (subject != null) {
|
||||
String subject = claims.getSubject();
|
||||
if(subject != null) {
|
||||
onValidateSuccess(request, response, claims);
|
||||
|
||||
// 5. 스프링 용 UsernamePasswordAuthenticationToken 객체 생성
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> principalMap = (Map<String, Object>) claims.get("principal");
|
||||
Map<String,Object> principalMap = (Map<String,Object>) claims.get("principal");
|
||||
JwtUser user = JwtUser.createAuthUser(principalMap);
|
||||
UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(user, null,
|
||||
user.getAuthorities());
|
||||
UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(user, null, user.getAuthorities());
|
||||
|
||||
// 6. 사용자 인증 처리 (Now, user is authenticated)
|
||||
SecurityContextHolder.getContext().setAuthentication(auth);
|
||||
}
|
||||
} catch (JwtException e) {
|
||||
}
|
||||
catch(JwtException e) {
|
||||
onValidateException(request, response, e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
@@ -1,103 +1,103 @@
|
||||
package kr.co.uplus.ez.common.security;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletRequestWrapper;
|
||||
|
||||
import org.springframework.web.filter.GenericFilterBean;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ConfigProps;
|
||||
import kr.co.uplus.ez.common.utils.WebUtils;
|
||||
|
||||
|
||||
// http://www.servletsuite.com/servlets/xssflt.htm
|
||||
public class XssFilter extends GenericFilterBean {
|
||||
private final ConfigProps cprops;
|
||||
|
||||
public XssFilter(ConfigProps cprops) {
|
||||
this.cprops = cprops;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
||||
throws IOException, ServletException {
|
||||
if (skip(request)) {
|
||||
chain.doFilter(request, response);
|
||||
}
|
||||
else {
|
||||
chain.doFilter(new RequestWrapper((HttpServletRequest) request), response);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean skip(ServletRequest request) {
|
||||
return WebUtils.isMatchedUri((HttpServletRequest)request, cprops.getXssExcludes());
|
||||
}
|
||||
|
||||
/**
|
||||
* 이 wrapper를 사용해도 request.getParameterMap()에는 원본 파라미터가 저장돼 있다.
|
||||
*/
|
||||
public static class RequestWrapper extends HttpServletRequestWrapper {
|
||||
public RequestWrapper(HttpServletRequest request) {
|
||||
super(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getParameterValues(String name) {
|
||||
String[] values = super.getParameterValues(name);
|
||||
if (values == null) {
|
||||
return null;
|
||||
}
|
||||
int count = values.length;
|
||||
String[] encodedValues = new String[count];
|
||||
for (int i = 0; i < count; i++) {
|
||||
encodedValues[i] = removeXSS(values[i]);
|
||||
}
|
||||
return encodedValues;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParameter(String name) {
|
||||
String value = super.getParameter(name);
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
return removeXSS(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHeader(String name) {
|
||||
String value = super.getHeader(name);
|
||||
if (value == null)
|
||||
return null;
|
||||
return removeXSS(value);
|
||||
}
|
||||
}
|
||||
|
||||
private static Pattern p1 = Pattern.compile("eval\\((.*?)\\)");
|
||||
private static Pattern p2 = Pattern.compile("onload(.*?)=");
|
||||
public static String removeXSS(String value) {
|
||||
value = value.replaceAll("<", "<").replaceAll(">", ">");
|
||||
value = value.replaceAll("\\(", "(").replaceAll("\\)", ")");
|
||||
value = value.replaceAll("'", "'");
|
||||
value = value.replaceAll("javascript:", "").replaceAll("vbscript:", "").replaceAll("script", "");
|
||||
value = p1.matcher(value).replaceAll("");
|
||||
value = p2.matcher(value).replaceAll("");
|
||||
return value;
|
||||
}
|
||||
|
||||
public static String recoverXSS(String value) {
|
||||
if (value == null || "".equals(value))
|
||||
return value;
|
||||
value = value.replaceAll("<", "<").replaceAll(">", ">");
|
||||
value = value.replaceAll("(", "\\(").replaceAll(")", "\\)");
|
||||
value = value.replaceAll("'", "'");
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
//package kr.co.uplus.ez.common.security;
|
||||
//
|
||||
//import java.io.IOException;
|
||||
//import java.util.regex.Pattern;
|
||||
//
|
||||
//import javax.servlet.FilterChain;
|
||||
//import javax.servlet.ServletException;
|
||||
//import javax.servlet.ServletRequest;
|
||||
//import javax.servlet.ServletResponse;
|
||||
//import javax.servlet.http.HttpServletRequest;
|
||||
//import javax.servlet.http.HttpServletRequestWrapper;
|
||||
//
|
||||
//import org.springframework.web.filter.GenericFilterBean;
|
||||
//
|
||||
//import kr.co.uplus.ez.common.data.ConfigProps;
|
||||
//import kr.co.uplus.ez.common.utils.WebUtils;
|
||||
//
|
||||
//
|
||||
//// http://www.servletsuite.com/servlets/xssflt.htm
|
||||
//public class XssFilter extends GenericFilterBean {
|
||||
// private final ConfigProps cprops;
|
||||
//
|
||||
// public XssFilter(ConfigProps cprops) {
|
||||
// this.cprops = cprops;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
||||
// throws IOException, ServletException {
|
||||
// if (skip(request)) {
|
||||
// chain.doFilter(request, response);
|
||||
// }
|
||||
// else {
|
||||
// chain.doFilter(new RequestWrapper((HttpServletRequest) request), response);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private boolean skip(ServletRequest request) {
|
||||
// return WebUtils.isMatchedUri((HttpServletRequest)request, cprops.getXssExcludes());
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 이 wrapper를 사용해도 request.getParameterMap()에는 원본 파라미터가 저장돼 있다.
|
||||
// */
|
||||
// public static class RequestWrapper extends HttpServletRequestWrapper {
|
||||
// public RequestWrapper(HttpServletRequest request) {
|
||||
// super(request);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String[] getParameterValues(String name) {
|
||||
// String[] values = super.getParameterValues(name);
|
||||
// if (values == null) {
|
||||
// return null;
|
||||
// }
|
||||
// int count = values.length;
|
||||
// String[] encodedValues = new String[count];
|
||||
// for (int i = 0; i < count; i++) {
|
||||
// encodedValues[i] = removeXSS(values[i]);
|
||||
// }
|
||||
// return encodedValues;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getParameter(String name) {
|
||||
// String value = super.getParameter(name);
|
||||
// if (value == null) {
|
||||
// return null;
|
||||
// }
|
||||
// return removeXSS(value);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getHeader(String name) {
|
||||
// String value = super.getHeader(name);
|
||||
// if (value == null)
|
||||
// return null;
|
||||
// return removeXSS(value);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private static Pattern p1 = Pattern.compile("eval\\((.*?)\\)");
|
||||
// private static Pattern p2 = Pattern.compile("onload(.*?)=");
|
||||
// public static String removeXSS(String value) {
|
||||
// value = value.replaceAll("<", "<").replaceAll(">", ">");
|
||||
// value = value.replaceAll("\\(", "(").replaceAll("\\)", ")");
|
||||
// value = value.replaceAll("'", "'");
|
||||
// value = value.replaceAll("javascript:", "").replaceAll("vbscript:", "").replaceAll("script", "");
|
||||
// value = p1.matcher(value).replaceAll("");
|
||||
// value = p2.matcher(value).replaceAll("");
|
||||
// return value;
|
||||
// }
|
||||
//
|
||||
// public static String recoverXSS(String value) {
|
||||
// if (value == null || "".equals(value))
|
||||
// return value;
|
||||
// value = value.replaceAll("<", "<").replaceAll(">", ">");
|
||||
// value = value.replaceAll("(", "\\(").replaceAll(")", "\\)");
|
||||
// value = value.replaceAll("'", "'");
|
||||
// return value;
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@@ -99,7 +99,6 @@ public class MainViewController {
|
||||
result.setData(true);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
log.info("data : {}", result);
|
||||
@@ -144,7 +143,7 @@ public class MainViewController {
|
||||
*
|
||||
* break; }else { logger.info(rowindex+"번 행 : "+columnindex+"번 열 값은: "+value);
|
||||
* // xcelData.put(value, value) } } } XSSFCell cell=row.getCell(columnindex); }
|
||||
* result.setSuccess(true); } } catch (IOException e) { // TODO Auto-generated
|
||||
* result.setSuccess(true); } } catch (IOException e) {
|
||||
* catch block e.printStackTrace(); } return result; }
|
||||
*/
|
||||
}
|
||||
@@ -29,8 +29,9 @@
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
esi.SUBS_DT
|
||||
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
|
||||
@@ -38,13 +39,13 @@
|
||||
, esi.SUBS_STTUS_CD
|
||||
, eci.CUST_TY_CD
|
||||
,(
|
||||
SELECT
|
||||
sum(ecm.SND_CNT)
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT ecm
|
||||
WHERE
|
||||
ecm.USER_SEQ = esu.USER_SEQ
|
||||
AND DATE_FORMAT(ecm.SUM_YM, '%Y%m') BETWEEN DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 MONTH), '%Y%m') AND DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -37 MONTH), '%Y%m')) AS SND_CNT
|
||||
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
|
||||
@@ -70,7 +71,7 @@
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
esi.SUBS_DT
|
||||
DATE_FORMAT(esi.SUBS_DT, '%Y-%m-%d') AS SUBS_DT
|
||||
, eig.NORG_NM
|
||||
, eiu.LOGIN_ID
|
||||
, eci.CUST_NM
|
||||
@@ -80,12 +81,12 @@
|
||||
, eci.CUST_TY_CD
|
||||
,(
|
||||
SELECT
|
||||
sum(ecm.SND_CNT)
|
||||
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 DATE_FORMAT(ecm.SUM_YM, '%Y%m') BETWEEN DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 MONTH), '%Y%m') AND DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -37 MONTH), '%Y%m')) AS SND_CNT
|
||||
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
|
||||
@@ -98,8 +99,10 @@
|
||||
ON eiu.EX_DEPT_CD = eig.NORG_CD
|
||||
WHERE 1 = 1
|
||||
<include refid="attractListCondition"/>
|
||||
ORDER BY esi.SUBS_DT DESC
|
||||
) A , ( SELECT @ROWNUM := #{page} ) AS R
|
||||
ORDER BY
|
||||
esi.SUBS_DT DESC
|
||||
LIMIT 100) A ,
|
||||
( SELECT @ROWNUM := 0 ) AS R
|
||||
</select>
|
||||
|
||||
|
||||
@@ -135,19 +138,29 @@
|
||||
<select id="selectAttractDetail" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailRes">
|
||||
/* attractMgt-mapper.xml(selectAttractDetail) */
|
||||
SELECT
|
||||
esi.SUBS_DT
|
||||
DATE_FORMAT(esi.SUBS_DT, '%Y-%m-%d') AS SUBS_DT
|
||||
, esi.SUBS_STTUS_CD
|
||||
, eci.CUST_NM
|
||||
, esi.PROD_CD
|
||||
, eci.REPR_NM
|
||||
, eci.CUST_TY_CD
|
||||
, eci.BIZRNO
|
||||
, eci.CORPNO
|
||||
, eci.ZIPCD
|
||||
, eci.ADDR1
|
||||
, eci.ADDR2
|
||||
, esi.SUBSMNGR_ID
|
||||
, esi.SUBSMNGR_NM
|
||||
, eci.CORPNO AS CPR_REG_NO
|
||||
, eci.ZIPCD AS ADR1
|
||||
, eci.ADDR1 AS ADR2
|
||||
, eci.ADDR2 AS ADR3
|
||||
, 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
|
||||
,(
|
||||
SELECT
|
||||
PROD_NM
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_PROD_INFO
|
||||
WHERE
|
||||
PROD_CD = esi.PROD_CD) AS PLAN
|
||||
FROM
|
||||
hubez_common.EZ_SUBS_INFO esi
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||
@@ -163,98 +176,307 @@
|
||||
</select>
|
||||
|
||||
<select id="selectSndCountList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetail">
|
||||
SELECT
|
||||
DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS sumYm
|
||||
, ecm.SND_CNT
|
||||
, ecm.SUCC_CNT
|
||||
, S.SND_CNT AS SND_CNT_S
|
||||
, S.SUCC_CNT AS SUCC_CNT_S
|
||||
, L.SND_CNT AS SND_CNT_L
|
||||
, L.SUCC_CNT AS SUCC_CNT_L
|
||||
, M.SND_CNT AS SND_CNT_M
|
||||
, M.SUCC_CNT AS SUCC_CNT_M
|
||||
, A.SND_CNT AS SND_CNT_A
|
||||
, A.SUCC_CNT AS SUCC_CNT_A
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(IFNULL(SND_CNT,0) + IFNULL(FBACK_CNT,0)) AS SND_CNT
|
||||
,SUM(IFNULL(SUCC_CNT,0) + IFNULL(FBACK_SUCC_CNT,0)) AS SUCC_CNT
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ
|
||||
) ecm,
|
||||
(
|
||||
SELECT
|
||||
S1.SUM_YM
|
||||
,S1.USER_SEQ
|
||||
,SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) AS SND_CNT
|
||||
,SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) AS SUCC_CNT
|
||||
FROM
|
||||
(SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(SND_CNT) AS SND_CNT
|
||||
,SUM(SUCC_CNT) AS SUCC_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'SMS'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ) S1
|
||||
LEFT OUTER JOIN
|
||||
(SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(FBACK_CNT) AS FBACK_CNT
|
||||
,SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND RPLCSND_CH_CD = 'SMS'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ) S2
|
||||
ON S1.SUM_YM = S2.SUM_YM
|
||||
AND S1.USER_SEQ = S2.USER_SEQ
|
||||
GROUP BY S1.SUM_YM, S1.USER_SEQ ) S,
|
||||
(
|
||||
SELECT
|
||||
S1.SUM_YM
|
||||
,S1.USER_SEQ
|
||||
,SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) AS SND_CNT
|
||||
,SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) AS SUCC_CNT
|
||||
FROM
|
||||
(SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(SND_CNT) AS SND_CNT
|
||||
,SUM(SUCC_CNT) AS SUCC_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'LMS'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ) S1
|
||||
LEFT OUTER JOIN
|
||||
(SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(FBACK_CNT) AS FBACK_CNT
|
||||
,SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND RPLCSND_CH_CD = 'LMS'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ) S2
|
||||
ON S1.SUM_YM = S2.SUM_YM
|
||||
AND S1.USER_SEQ = S2.USER_SEQ
|
||||
GROUP BY S1.SUM_YM, S1.USER_SEQ ) AS L,
|
||||
(
|
||||
SELECT
|
||||
S1.SUM_YM
|
||||
,S1.USER_SEQ
|
||||
,SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) AS SND_CNT
|
||||
,SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) AS SUCC_CNT
|
||||
FROM
|
||||
(SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(SND_CNT) AS SND_CNT
|
||||
,SUM(SUCC_CNT) AS SUCC_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'MMS'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ) S1
|
||||
LEFT OUTER JOIN
|
||||
(SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(FBACK_CNT) AS FBACK_CNT
|
||||
,SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND RPLCSND_CH_CD = 'MMS'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ) S2
|
||||
ON S1.SUM_YM = S2.SUM_YM
|
||||
AND S1.USER_SEQ = S2.USER_SEQ
|
||||
GROUP BY S1.SUM_YM, S1.USER_SEQ ) AS M,
|
||||
(
|
||||
SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(SND_CNT) AS SND_CNT
|
||||
,SUM(SUCC_CNT) AS SUCC_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ ) AS A
|
||||
WHERE 1=1
|
||||
AND ecm.SUM_YM = S.SUM_YM
|
||||
AND ecm.SUM_YM = L.SUM_YM
|
||||
AND ecm.SUM_YM = M.SUM_YM
|
||||
AND ecm.SUM_YM = A.SUM_YM
|
||||
AND ecm.USER_SEQ = S.USER_SEQ
|
||||
AND ecm.USER_SEQ = L.USER_SEQ
|
||||
AND ecm.USER_SEQ = M.USER_SEQ
|
||||
AND ecm.USER_SEQ = A.USER_SEQ
|
||||
ORDER BY ecm.SUM_YM DESC
|
||||
</select>
|
||||
|
||||
SELECT
|
||||
T1.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ecm.SUM_YM
|
||||
<select id="sendNumberListExcel" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetail">
|
||||
SELECT
|
||||
DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS SUM_YM
|
||||
, ecm.SND_CNT
|
||||
, S.SND_CNT AS SND_CNT_S
|
||||
, L.SND_CNT AS SND_CNT_L
|
||||
, M.SND_CNT AS SND_CNT_M
|
||||
, A.SND_CNT AS SND_CNT_A
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT ecm
|
||||
JOIN (
|
||||
(
|
||||
SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(IFNULL(SND_CNT,0) + IFNULL(FBACK_CNT,0)) AS SND_CNT
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ
|
||||
) ecm,
|
||||
(
|
||||
SELECT
|
||||
S1.SUM_YM
|
||||
,S1.USER_SEQ
|
||||
,SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) AS SND_CNT
|
||||
FROM
|
||||
(SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(SND_CNT) AS SND_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'SMS'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ) S1
|
||||
LEFT OUTER JOIN
|
||||
(SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(FBACK_CNT) AS FBACK_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND RPLCSND_CH_CD = 'SMS'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ) S2
|
||||
ON S1.SUM_YM = S2.SUM_YM
|
||||
AND S1.USER_SEQ = S2.USER_SEQ
|
||||
GROUP BY S1.SUM_YM, S1.USER_SEQ ) S,
|
||||
(
|
||||
SELECT
|
||||
SUM(SND_CNT) AS SND_CNT
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT
|
||||
WHERE
|
||||
SND_CH_CD = 'SMS') AS S
|
||||
JOIN (
|
||||
S1.SUM_YM
|
||||
,S1.USER_SEQ
|
||||
,SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) AS SND_CNT
|
||||
FROM
|
||||
(SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(SND_CNT) AS SND_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'LMS'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ) S1
|
||||
LEFT OUTER JOIN
|
||||
(SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(FBACK_CNT) AS FBACK_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND RPLCSND_CH_CD = 'LMS'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ) S2
|
||||
ON S1.SUM_YM = S2.SUM_YM
|
||||
AND S1.USER_SEQ = S2.USER_SEQ
|
||||
GROUP BY S1.SUM_YM, S1.USER_SEQ ) AS L,
|
||||
(
|
||||
SELECT
|
||||
S1.SUM_YM
|
||||
,S1.USER_SEQ
|
||||
,SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) AS SND_CNT
|
||||
FROM
|
||||
(SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(SND_CNT) AS SND_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'MMS'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ) S1
|
||||
LEFT OUTER JOIN
|
||||
(SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(FBACK_CNT) AS FBACK_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND RPLCSND_CH_CD = 'MMS'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ) S2
|
||||
ON S1.SUM_YM = S2.SUM_YM
|
||||
AND S1.USER_SEQ = S2.USER_SEQ
|
||||
GROUP BY S1.SUM_YM, S1.USER_SEQ ) AS M,
|
||||
(
|
||||
SELECT
|
||||
SUM(SND_CNT) AS SND_CNT
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT
|
||||
WHERE
|
||||
SND_CH_CD = 'MMS') AS M
|
||||
JOIN (
|
||||
SELECT
|
||||
SUM(SND_CNT) AS SND_CNT
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT
|
||||
WHERE
|
||||
SND_CH_CD = 'LMS') AS L
|
||||
JOIN (
|
||||
SELECT
|
||||
SUM(SND_CNT) AS SND_CNT
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT
|
||||
WHERE
|
||||
SND_CH_CD = 'ALIMTALK') AS A
|
||||
WHERE DATE_FORMAT(ecm.SUM_YM, '%Y%m') BETWEEN DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 MONTH), '%Y%m')
|
||||
AND DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -37 MONTH), '%Y%m')
|
||||
AND ecm.USER_SEQ = #{userSeq}
|
||||
) T1
|
||||
UNION ALL
|
||||
SELECT
|
||||
T2.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ecm.SUM_YM
|
||||
, ecm.SND_CNT
|
||||
, S.SND_CNT AS SND_CNT_S
|
||||
, L.SND_CNT AS SND_CNT_L
|
||||
, M.SND_CNT AS SND_CNT_M
|
||||
, A.SND_CNT AS SND_CNT_A
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT ecm
|
||||
JOIN (
|
||||
SELECT
|
||||
SND_CNT
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT
|
||||
WHERE
|
||||
SND_CH_CD = 'SMS') AS S
|
||||
JOIN (
|
||||
SELECT
|
||||
SND_CNT
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT
|
||||
WHERE
|
||||
SND_CH_CD = 'MMS') AS M
|
||||
JOIN (
|
||||
SELECT
|
||||
SND_CNT
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT
|
||||
WHERE
|
||||
SND_CH_CD = 'LMS') AS L
|
||||
JOIN (
|
||||
SELECT
|
||||
SUM(SND_CNT) AS SND_CNT
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT
|
||||
WHERE
|
||||
SND_CH_CD = 'ALIMTALK') AS A
|
||||
WHERE DATE_FORMAT(ecm.SUM_YM, '%Y%m') BETWEEN DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 MONTH), '%Y%m')
|
||||
AND DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -37 MONTH), '%Y%m')
|
||||
AND ecm.USER_SEQ = #{userSeq}
|
||||
ORDER BY
|
||||
ecm.SUM_YM DESC) T2
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(SND_CNT) AS SND_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND USER_SEQ = #{userSeq}
|
||||
GROUP BY SUM_YM, USER_SEQ ) AS A
|
||||
WHERE 1=1
|
||||
AND ecm.SUM_YM = S.SUM_YM
|
||||
AND ecm.SUM_YM = L.SUM_YM
|
||||
AND ecm.SUM_YM = M.SUM_YM
|
||||
AND ecm.SUM_YM = A.SUM_YM
|
||||
AND ecm.USER_SEQ = S.USER_SEQ
|
||||
AND ecm.USER_SEQ = L.USER_SEQ
|
||||
AND ecm.USER_SEQ = M.USER_SEQ
|
||||
AND ecm.USER_SEQ = A.USER_SEQ
|
||||
ORDER BY ecm.SUM_YM DESC
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -3,5 +3,107 @@
|
||||
|
||||
<mapper namespace="kr.co.uplus.ez.api.calculate.CalculateMapper">
|
||||
|
||||
<select id="selectCalculateListTotalCnt" parameterType="kr.co.uplus.ez.api.calculate.dto.CalcListReqDto" resultType="int">
|
||||
SELECT COUNT(*) AS TOTALCNT
|
||||
FROM
|
||||
(SELECT
|
||||
eci.CUST_NM
|
||||
,eci.BIZRNO
|
||||
,esi.SUBS_ID
|
||||
FROM ${HUBEZ_COMMON}.EZ_SUBS_INFO esi
|
||||
JOIN ${HUBEZ_COMMON}.EZ_CUST_INFO eci
|
||||
ON esi.CUST_SEQ = eci.CUST_SEQ
|
||||
WHERE 1=1
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND eci.CUST_NM LIKE CONCAT('%',#{custNm},'%')
|
||||
</if>
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND eci.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
|
||||
</if>
|
||||
) A
|
||||
JOIN
|
||||
(SELECT MAX(COLEC_TMS) AS COLEC_TMS
|
||||
,eud.USE_YM AS USE_YM
|
||||
,eud.SUBS_ID AS SUBS_ID
|
||||
FROM ${HUBEZ_ADMIN}.EZ_UTXNCOLEC_DTL eud
|
||||
WHERE 1=1
|
||||
<![CDATA[
|
||||
AND eud.USE_YM >= STR_TO_DATE(CONCAT(#{startMonth},'01'),'%Y%m%d')
|
||||
AND eud.USE_YM < DATE_ADD(STR_TO_DATE(CONCAT(#{endMonth},'01'),'%Y%m%d'), INTERVAL 1 MONTH)
|
||||
]]>
|
||||
GROUP BY eud.USE_YM, eud.SUBS_ID) B
|
||||
ON A.SUBS_ID = B.SUBS_ID
|
||||
</select>
|
||||
|
||||
<select id="selectCalculateList" parameterType="kr.co.uplus.ez.api.calculate.dto.CalcListReqDto" resultType="kr.co.uplus.ez.api.calculate.dto.CalcList">
|
||||
SELECT
|
||||
A.CUST_NM
|
||||
,A.BIZRNO
|
||||
,B.USE_YM
|
||||
,B.PROD_NM
|
||||
,B.PROD_AMT
|
||||
,B.START_AMT
|
||||
,B.USE_AMT
|
||||
,B.CFWD_AMT
|
||||
,B.MRT_USE_AMT
|
||||
,B.EXTNC_AMT
|
||||
,B.BILLING_AMT
|
||||
,B.TOTAL_SND_CNT
|
||||
,B.SMS_SND_CNT
|
||||
,B.LMS_SND_CNT
|
||||
,B.MMS_SND_CNT
|
||||
,B.ATLK_SND_CNT
|
||||
FROM
|
||||
(SELECT
|
||||
eci.CUST_NM
|
||||
,eci.BIZRNO
|
||||
,esi.SUBS_ID
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_SUBS_INFO esi
|
||||
JOIN ${HUBEZ_COMMON}.EZ_CUST_INFO eci
|
||||
ON esi.CUST_SEQ = eci.CUST_SEQ
|
||||
WHERE 1=1
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND eci.CUST_NM LIKE CONCAT('%',#{custNm},'%')
|
||||
</if>
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND eci.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
|
||||
</if>
|
||||
) A
|
||||
JOIN
|
||||
(SELECT MAX(COLEC_TMS) AS COLEC_TMS
|
||||
,DATE_FORMAT(eud.USE_YM, '%Y-%m') AS USE_YM
|
||||
,eud.SUBS_ID AS SUBS_ID
|
||||
,eud.PROD_NM AS PROD_NM
|
||||
,ROUND(IFNULL(eud.PROD_AMT,0)) AS PROD_AMT
|
||||
,ROUND(SUM(IFNULL(eud.FX_LMT_AMT,0) + IFNULL(eud.CFWD_AMT,0))) AS START_AMT -- 시작금액 : 정액한도금액+이월금액
|
||||
,ROUND(SUM(IFNULL(eud.FX_USE_AMT,0) + IFNULL(eud.CFWD_USE_AMT,0) + IFNULL(eud.MRT_USE_AMT,0))) AS USE_AMT -- 사용금액 : 정액사용금액 + 이월사용금액 + 종량사용금액
|
||||
,ROUND(IFNULL(eud.CFWD_AMT,0)) AS CFWD_AMT -- 이월금액
|
||||
,ROUND(IFNULL(eud.MRT_USE_AMT,0)) AS MRT_USE_AMT -- 종량금액
|
||||
,ROUND(IFNULL(eud.EXTNC_AMT,0)) AS EXTNC_AMT -- 소멸금액 : 소멸처리금액
|
||||
,ROUND(IFNULL((SELECT IFNULL(t2.RAT_AMT,0)
|
||||
FROM ${HUBEZ_ADMIN}.EZ_RAT_TXN t1
|
||||
JOIN ${HUBEZ_ADMIN}.EZ_RATTXN_DTL t2
|
||||
ON t1.RAT_YM = t2.RAT_YM
|
||||
AND t1.RAT_TMS = t2.RAT_TMS
|
||||
WHERE t1.USE_YM = eud.USE_YM
|
||||
AND t1.COLEC_TMS = eud.COLEC_TMS
|
||||
AND t2.SUBS_ID = eud.SUBS_ID ),0)) AS BILLING_AMT -- 청구금액 : 과금금액
|
||||
,SUM(IFNULL(eud.SMS_USE_CNT,0) + IFNULL(eud.LMS_USE_CNT,0) + IFNULL(eud.MMS_USE_CNT,0) + IFNULL(eud.ATLK_USE_CNT,0)) AS TOTAL_SND_CNT
|
||||
,IFNULL(eud.SMS_USE_CNT,0) AS SMS_SND_CNT
|
||||
,IFNULL(eud.LMS_USE_CNT,0) AS LMS_SND_CNT
|
||||
,IFNULL(eud.MMS_USE_CNT,0) AS MMS_SND_CNT
|
||||
,IFNULL(eud.ATLK_USE_CNT,0) AS ATLK_SND_CNT
|
||||
FROM ${HUBEZ_ADMIN}.EZ_UTXNCOLEC_DTL eud
|
||||
WHERE 1=1
|
||||
<![CDATA[
|
||||
AND eud.USE_YM >= STR_TO_DATE(CONCAT(#{startMonth},'01'),'%Y%m%d')
|
||||
AND eud.USE_YM < DATE_ADD(STR_TO_DATE(CONCAT(#{endMonth},'01'),'%Y%m%d'), INTERVAL 1 MONTH)
|
||||
]]>
|
||||
GROUP BY eud.USE_YM, eud.SUBS_ID) B
|
||||
ON A.SUBS_ID = B.SUBS_ID
|
||||
ORDER BY B.USE_YM DESC, B.SUBS_ID DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -357,20 +357,24 @@
|
||||
<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
|
||||
eul.FX_LMT_AMT + CFWD_AMT AS START_AMOUNT
|
||||
,eul.FX_USE_AMT + eul.CFWDR_USE_AMT AS USE_AMOUNT
|
||||
,eul.FX_BLNC + eul.CFWD_RSTRT_BLNC AS KRRR_AMOUNT
|
||||
,EXTNC_AMT AS EXTSH_AMOUNT
|
||||
eul.LMT_YM
|
||||
,SUM(IFNULL(eul.FX_LMT_AMT,0) + IFNULL(CFWD_AMT,0)) AS START_AMOUNT
|
||||
,SUM(IFNULL(eul.FX_LMT_AMT,0) + IFNULL(CFWD_AMT,0) + IFNULL(eld.DDCT_AMT,0)) AS USE_AMOUNT
|
||||
,SUM(IFNULL(eul.FX_BLNC,0) + IFNULL(eul.CFWD_RSTRT_BLNC,0)) AS KRRR_AMOUNT
|
||||
,SUM(IFNULL(eul.EXTNC_AMT,0)) AS EXTSH_AMOUNT
|
||||
,esu.USER_ID
|
||||
,DATE_FORMAT(NOW() , '%Y-%m-%d') AS DATE
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_SVC_USER esu
|
||||
INNER JOIN ${HUBEZ_ADMIN}.EZ_USER_LMT eul
|
||||
ON
|
||||
eul.USER_SEQ = esu.USER_SEQ
|
||||
AND eul.LMT_YM BETWEEN DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 4 MONTH) , '%Y%m') AND DATE_FORMAT(NOW() , '%Y%m')
|
||||
WHERE
|
||||
esu.USER_ID = #{serviceId}
|
||||
hubez_common.EZ_SVC_USER esu
|
||||
INNER JOIN hubez_admin.EZ_USER_LMT eul
|
||||
ON eul.USER_SEQ = esu.USER_SEQ
|
||||
INNER JOIN hubez_admin.EZ_LMTDCT_DTL eld
|
||||
ON eld.USER_SEQ = eul.USER_SEQ
|
||||
AND eld.LMT_YM = eul.LMT_YM
|
||||
WHERE 1=1
|
||||
AND esu.USER_ID = #{serviceId}
|
||||
AND eul.LMT_YM BETWEEN DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 4 MONTH) , '%Y%m') AND DATE_FORMAT(NOW() , '%Y%m')
|
||||
AND eld.DDCT_TP_CD IN ('01','03')
|
||||
GROUP BY eul.LMT_YM, eul.USER_SEQ
|
||||
ORDER BY
|
||||
eul.LMT_YM DESC
|
||||
</select>
|
||||
@@ -732,8 +736,9 @@
|
||||
SELECT USER_ID from ${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
WHERE USER_ID = #{adminId}
|
||||
</select>
|
||||
|
||||
|
||||
<update id="updateAdminInfoTotal" parameterType="kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto">
|
||||
/* custMgt-mapper.xml(updateAdminInfoTotal) */
|
||||
UPDATE ${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
SET
|
||||
CHG_ID = #{userId}
|
||||
@@ -746,7 +751,7 @@
|
||||
</if>
|
||||
WHERE USER_ID = #{userId}
|
||||
</update>
|
||||
|
||||
|
||||
<insert id="insertMemo" parameterType="kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto">
|
||||
/* custMgt-mapper.xml(insertMemo) */
|
||||
INSERT INTO ${HUBEZ_COMMON}.EZ_USER_MEMO(
|
||||
@@ -766,9 +771,9 @@
|
||||
, #{userId}
|
||||
, NOW()
|
||||
FROM ${HUBEZ_COMMON}.EZ_SVC_USER esu
|
||||
WHERE esu.USER_ID = #{userId}
|
||||
WHERE esu.USER_ID = #{userId}
|
||||
</insert>
|
||||
|
||||
|
||||
<select id="selectAdminSendingLimt" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
FX_LMT_AMT AS fxLmtAmt
|
||||
@@ -776,7 +781,7 @@
|
||||
FROM ${HUBEZ_ADMIN}.EZ_USER_LMT
|
||||
WHERE USER_SEQ = (SELECT USER_SEQ FROM ${HUBEZ_COMMON}.EZ_SVC_USER WHERE USER_ID = #{userId})
|
||||
</select>
|
||||
|
||||
|
||||
<update id="updateAdminSendingLimit" parameterType="map">
|
||||
UPDATE ${HUBEZ_ADMIN}.EZ_USER_LMT
|
||||
SET
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
, T1.STTUS_CD
|
||||
, T1.HP_NO
|
||||
, T1.AUTHCHR_FAIL_CNT
|
||||
, T1.LOGIN_FAIL_CNT
|
||||
, CASE
|
||||
WHEN DATE_ADD(T1.PWD_CHG_DT, INTERVAL 90 DAY) <![CDATA[ < ]]> NOW() THEN 'Y'
|
||||
ELSE 'N'
|
||||
|
||||
@@ -3,5 +3,157 @@
|
||||
|
||||
<mapper namespace="kr.co.uplus.ez.api.mntrng.MntrngMapper">
|
||||
|
||||
<select id="selectSendListTotalCnt" parameterType="kr.co.uplus.ez.api.mntrng.dto.SendListReqDto" resultType="int">
|
||||
SELECT
|
||||
COUNT(*) AS TOTALCNT
|
||||
FROM ${HUBEZ_SEND}.EZ_MSG_LOG eml
|
||||
WHERE DATE_FORMAT(eml.SENT_DATE,'%Y%m%d') = #{sentDate}
|
||||
<if test='reqChennel != null and reqChennel != "" and reqChennel != "ALL"'>
|
||||
AND eml.REQ_PRODUCT = #{reqChennel}
|
||||
</if>
|
||||
<if test='phone != null and phone != ""'>
|
||||
AND eml.PHONE LIKE CONCAT('%',#{phone},'%')
|
||||
</if>
|
||||
<if test='callbackNumber != null and callbackNumber != ""'>
|
||||
AND eml.CALLBACK_NUMBER LIKE CONCAT('%',#{callbackNumber},'%')
|
||||
</if>
|
||||
<if test='custNm != null and custNm != ""'>
|
||||
AND eml.ORDER_ID IN (
|
||||
SELECT
|
||||
T3.ORDER_ID
|
||||
FROM ${HUBEZ_COMMON}.EZ_CUST_INFO T1
|
||||
JOIN ${HUBEZ_COMMON}.EZ_SVC_USER T2
|
||||
ON T1.CUST_SEQ = T2.CUST_SEQ
|
||||
JOIN ${HUBEZ_ADMIN}.EZ_SNDDCT_REQ T3
|
||||
ON T2.USER_SEQ = T3.SNDREQ_USER_SEQ
|
||||
WHERE T1.CUST_NM LIKE CONCAT('%',#{custNm},'%'))
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectSendList" parameterType="kr.co.uplus.ez.api.mntrng.dto.SendListReqDto" resultType="kr.co.uplus.ez.api.mntrng.dto.SendList">
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
DATE_FORMAT(SENT_DATE,'%Y-%m-%d') AS SENT_DATE
|
||||
,(SELECT
|
||||
esc.CUST_NM
|
||||
FROM ${HUBEZ_ADMIN}.EZ_SNDDCT_REQ esr
|
||||
join ${HUBEZ_COMMON}.EZ_SVC_USER esu
|
||||
on esr.SNDREQ_USER_SEQ = esu.USER_SEQ
|
||||
join ${HUBEZ_COMMON}.EZ_CUST_INFO esc
|
||||
on esu.CUST_SEQ = esc.CUST_SEQ
|
||||
WHERE esr.ORDER_ID = eml.ORDER_ID) AS CUST_NM
|
||||
,(SELECT
|
||||
esu.USER_ID
|
||||
FROM ${HUBEZ_ADMIN}.EZ_SNDDCT_REQ esr
|
||||
join ${HUBEZ_COMMON}.EZ_SVC_USER esu
|
||||
on esr.SNDREQ_USER_SEQ = esu.USER_SEQ
|
||||
WHERE esr.ORDER_ID = eml.ORDER_ID) AS USER_ID
|
||||
,eml.PHONE
|
||||
,eml.CALLBACK_NUMBER
|
||||
,eml.REQ_PRODUCT
|
||||
,eml.DONE_CH
|
||||
,eml.DONE_TELCO
|
||||
,eml.DONE_CODE
|
||||
,DATE_FORMAT(eml.REQ_DATE,'%Y-%m-%d %T') AS REQ_DATE
|
||||
,DATE_FORMAT(eml.DONE_DATE,'%Y-%m-%d %T') AS DONE_DATE
|
||||
FROM ${HUBEZ_SEND}.EZ_MSG_LOG eml
|
||||
WHERE 1=1
|
||||
AND DATE_FORMAT(eml.SENT_DATE,'%Y%m%d') = #{sentDate}
|
||||
<if test='reqChennel != null and reqChennel != "" and reqChennel != "ALL"'>
|
||||
AND eml.REQ_PRODUCT = #{reqChennel}
|
||||
</if>
|
||||
<if test='phone != null and phone != ""'>
|
||||
AND eml.PHONE LIKE CONCAT('%',#{phone},'%')
|
||||
</if>
|
||||
<if test='callbackNumber != null and callbackNumber != ""'>
|
||||
AND eml.CALLBACK_NUMBER LIKE CONCAT('%',#{callbackNumber},'%')
|
||||
</if>
|
||||
<if test='custNm != null and custNm != ""'>
|
||||
AND eml.ORDER_ID IN (
|
||||
SELECT
|
||||
T3.ORDER_ID
|
||||
FROM ${HUBEZ_COMMON}.EZ_CUST_INFO T1
|
||||
JOIN ${HUBEZ_COMMON}.EZ_SVC_USER T2
|
||||
ON T1.CUST_SEQ = T2.CUST_SEQ
|
||||
JOIN ${HUBEZ_ADMIN}.EZ_SNDDCT_REQ T3
|
||||
ON T2.USER_SEQ = T3.SNDREQ_USER_SEQ
|
||||
WHERE T1.CUST_NM = LIKE CONCAT('%',#{custNm},'%'))
|
||||
</if>
|
||||
ORDER BY eml.SENT_DATE DESC
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<select id="selectLiveSendSttus" parameterType="kr.co.uplus.ez.api.mntrng.dto.LiveSendSttus" resultType="kr.co.uplus.ez.api.mntrng.dto.LiveSendSttus">
|
||||
SELECT
|
||||
IFNULL(SUM(T1.SEND_CNT + T2.FB_SEND_CNT), 0) AS SEND_CNT
|
||||
,IFNULL(SUM(T1.SUCC_CNT+T2.FB_SUCC_CNT), 0) AS SUCC_CNT
|
||||
,IFNULL(ROUND((SUM(T1.SUCC_CNT+T2.FB_SUCC_CNT) / SUM(T1.SEND_CNT+T2.FB_SEND_CNT) * 100), 2), 0) AS SUCC_RT
|
||||
<if test='reqType != null and reqType != ""'>
|
||||
<if test='reqType eq "M"'>
|
||||
,DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -10 MINUTE), '%Y.%m.%d %H:%i') AS START_TIME
|
||||
</if>
|
||||
<if test='reqType eq "H"'>
|
||||
,DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 HOUR), '%Y.%m.%d %H:%i') AS START_TIME
|
||||
</if>
|
||||
<if test='reqType eq "D"'>
|
||||
,DATE_FORMAT(NOW(),'%Y.%m.%d 00:00') AS START_TIME
|
||||
</if>
|
||||
</if>
|
||||
,DATE_FORMAT(NOW(),'%Y.%m.%d %H:%i') AS END_TIME
|
||||
FROM
|
||||
(SELECT
|
||||
SUM(IFNULL(SEND_CNT,0)) AS SEND_CNT
|
||||
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
|
||||
FROM ${HUBEZ_COMMON}.EZ_WEB_MSG
|
||||
WHERE 1=1
|
||||
AND CH_STR = #{chStr}
|
||||
<if test='reqType != null and reqType != ""'>
|
||||
<if test='reqType eq "M"'>
|
||||
<![CDATA[
|
||||
AND REQ_DT > DATE_ADD(NOW(), INTERVAL -10 MINUTE)
|
||||
]]>
|
||||
</if>
|
||||
<if test='reqType eq "H"'>
|
||||
<![CDATA[
|
||||
AND REQ_DT > DATE_ADD(NOW(), INTERVAL -1 HOUR)
|
||||
]]>
|
||||
</if>
|
||||
<if test='reqType eq "D"'>
|
||||
<![CDATA[
|
||||
AND REQ_DT >= STR_TO_DATE(DATE_FORMAT(NOW(),'%Y%m%d'), '%Y%m%d')
|
||||
]]>
|
||||
</if>
|
||||
</if>
|
||||
GROUP BY CH_STR) T1,
|
||||
(SELECT
|
||||
SUM(IFNULL(FB_SUCC_CNT,0)+IFNULL(FB_FAIL_CNT,0)) AS FB_SEND_CNT
|
||||
,SUM(IFNULL(FB_SUCC_CNT,0)) AS FB_SUCC_CNT
|
||||
FROM ${HUBEZ_COMMON}.EZ_WEB_MSG
|
||||
WHERE 1=1
|
||||
AND FB_CH_STR = #{chStr}
|
||||
<if test='reqType != null and reqType != ""'>
|
||||
<if test='reqType eq "M"'>
|
||||
<![CDATA[
|
||||
AND REQ_DT > DATE_ADD(NOW(), INTERVAL -10 MINUTE)
|
||||
]]>
|
||||
</if>
|
||||
<if test='reqType eq "H"'>
|
||||
<![CDATA[
|
||||
AND REQ_DT > DATE_ADD(NOW(), INTERVAL -1 HOUR)
|
||||
]]>
|
||||
</if>
|
||||
<if test='reqType eq "D"'>
|
||||
<![CDATA[
|
||||
AND REQ_DT >= STR_TO_DATE(DATE_FORMAT(NOW(),'%Y%m%d'), '%Y%m%d')
|
||||
]]>
|
||||
</if>
|
||||
</if>
|
||||
GROUP BY FB_CH_STR) T2
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -93,16 +93,13 @@
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
hubez_common.EZ_CUST_INFO eci
|
||||
hubez_common.EZ_CUST_INFO eci
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON
|
||||
eci.CUST_SEQ = esu.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SNDRNO_REG esr
|
||||
eci.CUST_SEQ = esu.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SVC_SNDRNO ess
|
||||
ON
|
||||
esu.USER_SEQ = esr.USER_SEQ
|
||||
LEFT JOIN hubez_common.EZ_SVC_SNDRNO ess
|
||||
ON
|
||||
eci.CUST_SEQ = ess.CUST_SEQ
|
||||
eci.CUST_SEQ = ess.CUST_SEQ
|
||||
WHERE 1=1
|
||||
<include refid="numberListCondition"></include>
|
||||
</select>
|
||||
@@ -121,7 +118,7 @@
|
||||
, esu.USER_ID AS adminId
|
||||
, ess.REG_ID AS register
|
||||
, eci.BIZRNO AS bRegNo
|
||||
, esr.REG_REQ_NO
|
||||
, ess.REG_REQ_NO
|
||||
,(
|
||||
SELECT
|
||||
ecd.DTL_CD_NM
|
||||
@@ -160,14 +157,12 @@
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON
|
||||
eci.CUST_SEQ = esu.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SNDRNO_REG esr
|
||||
ON
|
||||
esu.USER_SEQ = esr.USER_SEQ
|
||||
LEFT JOIN hubez_common.EZ_SVC_SNDRNO ess
|
||||
INNER JOIN hubez_common.EZ_SVC_SNDRNO ess
|
||||
ON
|
||||
eci.CUST_SEQ = ess.CUST_SEQ
|
||||
WHERE 1=1
|
||||
<include refid="numberListCondition"></include>
|
||||
ORDER BY ess.REG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
@@ -218,7 +213,9 @@
|
||||
SELECT
|
||||
esu.USER_ID AS adminId,
|
||||
eci.BIZRNO AS bRegNo,
|
||||
eci.CUST_NM AS custNm
|
||||
eci.CUST_NM AS custNm,
|
||||
esu.BIZR_AUTH_YN,
|
||||
eci.CUST_SEQ
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_SVC_USER esu, ${HUBEZ_COMMON}.EZ_CUST_INFO eci
|
||||
WHERE
|
||||
@@ -249,14 +246,30 @@
|
||||
AND ess.SNDRNO = #{regNo}
|
||||
</delete>
|
||||
|
||||
<select id="selectSndrnoList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumberReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumber">
|
||||
/* sendNumMgt-mapper.xml(selectSndrnoList) */
|
||||
SELECT
|
||||
ess.SNDRNO AS sendNum
|
||||
FROM
|
||||
hubez_common.EZ_SVC_SNDRNO ess
|
||||
WHERE
|
||||
ess.CUST_SEQ = #{custSeq}
|
||||
AND ess.SNDRNO IN
|
||||
<foreach collection="list" item="item" index="i" open="(" separator="," close=")">
|
||||
#{item.sendNum}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectRegReqNo" resultType="String">
|
||||
SELECT CONCAT(DATE_FORMAT(NOW(), '%Y%m'), LPAD(${HUBEZ_COMMON}.FUN_NEXT_SEQ('SNDRNO_REG_SEQ'), 7, '0')) AS REG_REQ_NO
|
||||
</select>
|
||||
|
||||
<insert id="insertNumber" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumberReqDto">
|
||||
/* sendNumMgt-mapper.xml(insertNumber) */
|
||||
<selectKey resultType="String" keyProperty="" order="BEFORE">
|
||||
SELECT CONCAT(DATE_FORMAT(NOW(), '%Y%m'), LPAD(${HUBEZ_COMMON}.FUN_NEXT_SEQ('SNDRNO_REG_SEQ'), 7, '0')) AS REG_REQ_NO
|
||||
</selectKey>
|
||||
INSERT INTO
|
||||
${HUBEZ_COMMON}.EZ_SNDRNO_REG (
|
||||
REQ_STTUS_CD
|
||||
REG_REQ_NO
|
||||
,REQ_STTUS_CD
|
||||
,REQ_CNT
|
||||
,APV_CNT
|
||||
,REJT_CNT
|
||||
@@ -268,15 +281,16 @@
|
||||
,CHG_DT
|
||||
)
|
||||
VALUES(
|
||||
'01'
|
||||
#{regReqNo}
|
||||
,'01'
|
||||
,#{reqCnt}
|
||||
,0
|
||||
,0
|
||||
,NOW()
|
||||
,#{userSeq}
|
||||
,#{madangId}
|
||||
,#{adminId}
|
||||
,NOW()
|
||||
,#{madangId}
|
||||
,#{adminId}
|
||||
,NOW()
|
||||
)
|
||||
</insert>
|
||||
@@ -310,7 +324,44 @@
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertNumberList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumberReqDto">
|
||||
<insert id="insertNumbers" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumberReqDto">
|
||||
INSERT INTO
|
||||
${HUBEZ_COMMON}.EZ_SVC_SNDRNO(
|
||||
SNDRNO
|
||||
,REG_TP_CD
|
||||
,SNDRNO_NM
|
||||
,CUST_SEQ
|
||||
,REG_REQ_NO
|
||||
,STTUS_CD
|
||||
,USE_YN
|
||||
,NMINEE_DIV_CD
|
||||
,INCH_DIV_CD
|
||||
,REG_ID
|
||||
,REG_DT
|
||||
,CHG_ID
|
||||
,CHG_DT
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator="," open="(" close=")">
|
||||
#{item.sendNum}
|
||||
,'02'
|
||||
,#{item.sendNm}
|
||||
,#{custSeq}
|
||||
,#{regReqNo}
|
||||
,'01'
|
||||
,'Y'
|
||||
,#{nmineeDivCd}
|
||||
,#{inchDivCd}
|
||||
,#{regId}
|
||||
,NOW()
|
||||
,#{regId}
|
||||
,NOW()
|
||||
</foreach>
|
||||
|
||||
|
||||
</insert>
|
||||
|
||||
<insert id="insertNumberList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumber">
|
||||
/* sendNumMgt-mapper.xml(insertNumberList) */
|
||||
INSERT INTO
|
||||
${HUBEZ_COMMON}.EZ_SVC_SNDRNO(
|
||||
@@ -419,4 +470,194 @@
|
||||
WHERE
|
||||
REG_REQ_NO = #{regReqNo}
|
||||
</select>
|
||||
|
||||
<select id="selectSvcSndrnoListTotalCnt" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberApprListReqDto" resultType="int">
|
||||
/* sendNumMgt-mapper.xml(selectSvcSndrnoListTotalCnt) */
|
||||
SELECT
|
||||
count(*)
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ess.REG_REQ_NO
|
||||
FROM
|
||||
hubez_common.EZ_SVC_SNDRNO ess
|
||||
INNER JOIN hubez_common.EZ_SNDRNO_REG esr
|
||||
ON
|
||||
ess.REG_REQ_NO = esr.REG_REQ_NO
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON
|
||||
esu.USER_SEQ = esr.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON
|
||||
eci.CUST_SEQ = esu.CUST_SEQ
|
||||
AND ess.INCH_DIV_CD = '01'
|
||||
<include refid="selectSvcSndrnoListCondition" />
|
||||
GROUP BY
|
||||
ess.REG_REQ_NO) AS T1
|
||||
</select>
|
||||
|
||||
<select id="selectSvcSndrnoList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberApprListReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberApprInfo">
|
||||
/* sendNumMgt-mapper.xml(selectSvcSndrnoList) */
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
esr.REG_REQ_NO
|
||||
, DATE_FORMAT(esr.REG_DT, '%Y-%m-%d') AS REG_DT
|
||||
, esu.USER_ID AS adminId
|
||||
, eci.BIZRNO
|
||||
,(
|
||||
SELECT
|
||||
ecd.DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL ecd
|
||||
WHERE
|
||||
ecd.GRP_CD = 'NMINEE_DIV_CD'
|
||||
AND ecd.DTL_CD = ess.NMINEE_DIV_CD) AS nmineeDivCd
|
||||
, eci.CUST_NM
|
||||
, esr.REQ_CNT
|
||||
, esr.APV_CNT
|
||||
, esr.REJT_CNT
|
||||
,(
|
||||
SELECT
|
||||
ecd.DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL ecd
|
||||
WHERE
|
||||
ecd.GRP_CD = 'SNDRNO_REQ_STTUS_CD'
|
||||
AND ecd.DTL_CD = esr.REQ_STTUS_CD) AS REQ_STTUS_CD
|
||||
, DATE_FORMAT(esr.CMPLT_DT, '%Y-%m-%d') AS CMPLT_DT
|
||||
FROM
|
||||
hubez_common.EZ_SVC_SNDRNO ess
|
||||
INNER JOIN hubez_common.EZ_SNDRNO_REG esr
|
||||
ON ess.REG_REQ_NO = esr.REG_REQ_NO
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON esu.USER_SEQ = esr.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
AND ess.INCH_DIV_CD = '01'
|
||||
<include refid="selectSvcSndrnoListCondition" />
|
||||
GROUP BY ess.REG_REQ_NO
|
||||
ORDER BY esr.REG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<sql id="selectSvcSndrnoListCondition">
|
||||
<if test='searchType1 != null and searchType1 != ""'>
|
||||
AND esr.REQ_STTUS_CD = #{searchType1}
|
||||
</if>
|
||||
<if test='searchType2 != null and searchType2 != ""'>
|
||||
AND ess.NMINEE_DIV_CD = #{searchType2}
|
||||
</if>
|
||||
<if test='searchText1 != null and searchText1 != ""'>
|
||||
AND eci.BIZRNO = #{searchText1}
|
||||
</if>
|
||||
<if test='searchText2 != null and searchText2 != ""'>
|
||||
AND eci.CUST_NM = #{searchText2}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectSvcSndrnoReqDetail" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberApprDetailReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberApprDetailRes">
|
||||
/* sendNumMgt-mapper.xml(selectSvcSndrnoReqDetail) */
|
||||
SELECT
|
||||
esr.REG_REQ_NO
|
||||
, DATE_FORMAT(esr.REG_DT, '%Y-%m-%d') AS REG_DT
|
||||
, DATE_FORMAT(esr.CMPLT_DT, '%Y-%m-%d') AS CMPLT_DT
|
||||
, esu.USER_ID AS adminId
|
||||
, eci.CUST_NM
|
||||
, eci.BIZRNO
|
||||
,(
|
||||
SELECT
|
||||
ecd.DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL ecd
|
||||
WHERE
|
||||
ecd.GRP_CD = 'NMINEE_DIV_CD'
|
||||
AND ecd.DTL_CD = ess.NMINEE_DIV_CD) AS nmineeDivCd
|
||||
, esr.SLF_AUTH_HP
|
||||
, esr.MEMO
|
||||
FROM
|
||||
hubez_common.EZ_SVC_SNDRNO ess
|
||||
INNER JOIN hubez_common.EZ_SNDRNO_REG esr
|
||||
ON ess.REG_REQ_NO = esr.REG_REQ_NO
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON esu.USER_SEQ = esr.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
AND esr.REG_REQ_NO = #{regReqNo}
|
||||
GROUP BY ess.REG_REQ_NO
|
||||
</select>
|
||||
|
||||
<select id="selectSvcSndnoList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberApprDetailReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberApprNum">
|
||||
/* sendNumMgt-mapper.xml(selectSvcSndnoList) */
|
||||
SELECT
|
||||
ess.SNDRNO
|
||||
, ess.STTUS_CD
|
||||
, ess.SEQ_NO
|
||||
, ess.REG_REQ_NO
|
||||
FROM
|
||||
hubez_common.EZ_SVC_SNDRNO ess
|
||||
WHERE
|
||||
ess.REG_REQ_NO = #{regReqNo}
|
||||
</select>
|
||||
|
||||
<select id="selectSndnoDocList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberApprDetailReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberApprDoc">
|
||||
/* sendNumMgt-mapper.xml(selectSndnoDocList) */
|
||||
SELECT
|
||||
esd.DOC_TITLE ,
|
||||
esd.FILE_PATH ,
|
||||
esd.FILE_NM ,
|
||||
esd.DOC_TP_CD
|
||||
FROM
|
||||
hubez_common.EZ_SNDRNO_DOC esd
|
||||
WHERE
|
||||
esd.REG_REQ_NO = #{regReqNo}
|
||||
</select>
|
||||
|
||||
<update id="updateSndrno" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.UpdateApprSendNumber">
|
||||
/* sendNumMgt-mapper.xml(updateSndrno) */
|
||||
UPDATE
|
||||
hubez_common.EZ_SVC_SNDRNO
|
||||
SET
|
||||
CHG_ID = #{adminId}
|
||||
, CHG_DT = NOW()
|
||||
, STTUS_CD = #{sttusCd}
|
||||
WHERE SEQ_NO = #{seqNo}
|
||||
AND SNDRNO = #{sndrno}
|
||||
</update>
|
||||
|
||||
<update id="upddateSndrnoReg" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.UpdateApprReqDto">
|
||||
/* sendNumMgt-mapper.xml(upddateSndrnoReg) */
|
||||
UPDATE
|
||||
hubez_common.EZ_SNDRNO_REG
|
||||
SET
|
||||
CHG_ID = #{adminId}
|
||||
, CHG_DT = NOW()
|
||||
, MEMO = #{memo}
|
||||
, APV_CNT = #{apvCnt}
|
||||
, REJT_CNT = #{rejtCnt}
|
||||
<if test='cmpltYn != null and cmpltYn != ""'>
|
||||
, CMPLT_DT = NOW()
|
||||
</if>
|
||||
<if test='reqSttusCd != null and reqSttusCd != ""'>
|
||||
, REQ_STTUS_CD = #{reqSttusCd}
|
||||
</if>
|
||||
WHERE REG_REQ_NO = #{regReqNo}
|
||||
</update>
|
||||
|
||||
<update id="updateSvcUser" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.UpdateApprReqDto">
|
||||
/* sendNumMgt-mapper.xml(updateSvcUser) */
|
||||
UPDATE
|
||||
hubez_common.EZ_SVC_USER
|
||||
SET
|
||||
BIZR_AUTH_YN = 'Y'
|
||||
, CHG_ID = #{adminId}
|
||||
, CHG_DT = NOW()
|
||||
WHERE
|
||||
USER_ID = #{adminId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -31,7 +31,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_MON_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
) ecm1,
|
||||
(
|
||||
SELECT
|
||||
@@ -41,7 +41,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_MON_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'SMS'
|
||||
) S1,
|
||||
(
|
||||
@@ -52,7 +52,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_MON_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'LMS'
|
||||
) L1,
|
||||
(
|
||||
@@ -63,7 +63,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_MON_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'MMS'
|
||||
) M1,
|
||||
(
|
||||
@@ -74,7 +74,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_MON_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
) A1
|
||||
UNION ALL
|
||||
@@ -104,7 +104,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_MON_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
GROUP BY SUM_YM ) ecm,
|
||||
(SELECT
|
||||
SUM_YM
|
||||
@@ -114,7 +114,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_MON_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'SMS'
|
||||
GROUP BY SUM_YM ) S,
|
||||
(SELECT
|
||||
@@ -125,7 +125,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_MON_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'LMS'
|
||||
GROUP BY SUM_YM ) L,
|
||||
( SELECT
|
||||
@@ -136,7 +136,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_MON_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'MMS'
|
||||
GROUP BY SUM_YM ) M,
|
||||
( SELECT
|
||||
@@ -147,7 +147,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_MON_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
GROUP BY SUM_YM ) A
|
||||
WHERE 1=1
|
||||
@@ -187,7 +187,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_DAY_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
|
||||
) ecm1,
|
||||
(
|
||||
SELECT
|
||||
@@ -197,7 +197,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_DAY_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'SMS'
|
||||
) S1,
|
||||
(
|
||||
@@ -208,7 +208,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_DAY_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'LMS'
|
||||
) L1,
|
||||
(
|
||||
@@ -219,7 +219,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_DAY_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'MMS'
|
||||
) M1,
|
||||
(
|
||||
@@ -230,7 +230,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_DAY_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
) A1
|
||||
UNION ALL
|
||||
@@ -260,7 +260,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_DAY_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
|
||||
GROUP BY SUM_YMD ) ecm,
|
||||
(SELECT
|
||||
SUM_YMD
|
||||
@@ -270,7 +270,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_DAY_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'SMS'
|
||||
GROUP BY SUM_YMD ) S,
|
||||
(SELECT
|
||||
@@ -281,7 +281,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_DAY_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'LMS'
|
||||
GROUP BY SUM_YMD ) L,
|
||||
( SELECT
|
||||
@@ -292,7 +292,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_DAY_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'MMS'
|
||||
GROUP BY SUM_YMD ) M,
|
||||
( SELECT
|
||||
@@ -303,7 +303,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_DAY_STAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SUM_YMD BETWEEN STR_TO_DATE(#{startDay},'%Y%m%d') AND STR_TO_DATE(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
GROUP BY SUM_YMD ) A
|
||||
WHERE 1=1
|
||||
@@ -324,7 +324,7 @@
|
||||
,USER_SEQ
|
||||
FROM ${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND CUST_NM LIKE CONCAT('%',#{custNm},'%')
|
||||
</if>
|
||||
@@ -366,7 +366,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
GROUP BY SUM_YM, USER_SEQ) ecm,
|
||||
(SELECT
|
||||
S1.SUM_YM
|
||||
@@ -383,7 +383,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'SMS'
|
||||
GROUP BY SUM_YM, USER_SEQ) S1
|
||||
LEFT OUTER JOIN
|
||||
@@ -395,7 +395,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND STR_TO_DATE(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND RPLCSND_CH_CD = 'SMS'
|
||||
GROUP BY SUM_YM, USER_SEQ) S2
|
||||
@@ -417,7 +417,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'LMS'
|
||||
GROUP BY SUM_YM, USER_SEQ) S1
|
||||
LEFT OUTER JOIN
|
||||
@@ -429,7 +429,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND RPLCSND_CH_CD = 'LMS'
|
||||
GROUP BY SUM_YM, USER_SEQ) S2
|
||||
@@ -451,7 +451,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'MMS'
|
||||
GROUP BY SUM_YM, USER_SEQ) S1
|
||||
LEFT OUTER JOIN
|
||||
@@ -463,7 +463,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND RPLCSND_CH_CD = 'MMS'
|
||||
GROUP BY SUM_YM, USER_SEQ) S2
|
||||
@@ -479,7 +479,7 @@
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YM BETWEEN DATE_FORMAT(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SUM_YM BETWEEN STR_TO_DATE(CONCAT(#{startMon},'01'),'%Y%m%d') AND DATE_FORMAT(CONCAT(#{endMon},'01'),'%Y%m%d')
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
GROUP BY SUM_YM, USER_SEQ ) A
|
||||
WHERE 1=1
|
||||
@@ -497,7 +497,7 @@
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND ecm.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
|
||||
</if>
|
||||
ORDER BY ecm.SUM_YM, ecm.USER_SEQ DESC
|
||||
ORDER BY ecm.SUM_YM DESC, ecm.USER_SEQ DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
</select>
|
||||
|
||||
@@ -689,7 +689,7 @@
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND ecd.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
|
||||
</if>
|
||||
ORDER BY ecd.SUM_YMD, ecd.USER_SEQ DESC
|
||||
ORDER BY ecd.SUM_YMD DESC, ecd.USER_SEQ DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user