mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 21:36:44 +09:00
리스크관리 / 유치채널현황 관리 / 채널관리 추가
This commit is contained in:
@@ -8,10 +8,7 @@ package kr.co.uplus.ez.api.attractMgt;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import kr.co.uplus.ez.api.attractMgt.dto.ChannelListExcelReqDto;
|
||||
import kr.co.uplus.ez.api.attractMgt.dto.ChannelListExcelResDto;
|
||||
import kr.co.uplus.ez.api.attractMgt.dto.ChannelListReqDto;
|
||||
import kr.co.uplus.ez.api.attractMgt.dto.ChannelListResDto;
|
||||
import kr.co.uplus.ez.api.attractMgt.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;
|
||||
@@ -75,7 +72,7 @@ public class AttractMgtController {
|
||||
* date : 2022. 4. 26.
|
||||
* auth : ckr
|
||||
* desc : 유치 채널 상세 조회
|
||||
* @param paramMap
|
||||
* @param channelDetailReqDto
|
||||
* @return
|
||||
* @
|
||||
*/
|
||||
@@ -83,8 +80,11 @@ public class AttractMgtController {
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "/channelDetail" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage channelDetail(@RequestBody Map<String, Object> paramMap) {
|
||||
return attractService.channelDetail(paramMap);
|
||||
public ChannelDetailResDto channelDetail(@RequestBody @Valid ChannelDetailReqDto channelDetailReqDto, BindingResult bindingResult) {
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new ChannelDetailResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return attractService.channelDetail(channelDetailReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,6 +95,7 @@ public class AttractMgtController {
|
||||
* @return
|
||||
* @
|
||||
*/
|
||||
@Deprecated
|
||||
@RequestMapping(value = "/sendNumberListExcel" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage sendNumberListExcel(@RequestBody Map<String, Object> paramMap) {
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
package kr.co.uplus.ez.api.attractMgt;
|
||||
|
||||
import kr.co.uplus.ez.api.attractMgt.dto.ChannelListReqDto;
|
||||
import kr.co.uplus.ez.api.attractMgt.dto.*;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface AttractMgtMapper {
|
||||
|
||||
int selectAttractListTotalCnt(ChannelListReqDto channelListReqDto);
|
||||
|
||||
List<ChannelInfo> selectAttractList(ChannelListReqDto channelListReqDto);
|
||||
|
||||
List<ChannelInfo> selectAttractExcelList(ChannelListExcelReqDto channelListExcelReqDto);
|
||||
|
||||
ChannelDetailRes selectAttractDetail(ChannelDetailReqDto channelDetailReqDto);
|
||||
|
||||
List<ChannelDetail> selectSndCountList(ChannelDetailReqDto channelDetailReqDto);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package kr.co.uplus.ez.api.attractMgt;
|
||||
|
||||
import kr.co.uplus.ez.api.attractMgt.dto.ChannelListExcelReqDto;
|
||||
import kr.co.uplus.ez.api.attractMgt.dto.ChannelListExcelResDto;
|
||||
import kr.co.uplus.ez.api.attractMgt.dto.ChannelListReqDto;
|
||||
import kr.co.uplus.ez.api.attractMgt.dto.ChannelListResDto;
|
||||
import kr.co.uplus.ez.api.attractMgt.dto.*;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
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 java.util.ArrayList;
|
||||
@@ -16,6 +17,14 @@ import java.util.Map;
|
||||
@Service
|
||||
public class AttractMgtService {
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb1")
|
||||
private SqlSessionTemplate sqlSessionMaster;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb2")
|
||||
private SqlSessionTemplate sqlSessionSlave;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
@@ -24,8 +33,40 @@ public class AttractMgtService {
|
||||
* @return
|
||||
*/
|
||||
public ChannelListResDto channelList(ChannelListReqDto channelListReqDto) {
|
||||
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
|
||||
|
||||
return new ChannelListResDto(ApiResponseCode.SUCCESS);
|
||||
String nowPage = String.valueOf(channelListReqDto.getPage());
|
||||
int totalCnt = attractMgtMapper.selectAttractListTotalCnt(channelListReqDto);
|
||||
|
||||
if (totalCnt == 0) {
|
||||
|
||||
ChannelListRes channelListRes = new ChannelListRes();
|
||||
channelListRes.setList(new ArrayList<>());
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
channelListRes.setPaging(paging);
|
||||
|
||||
return new ChannelListResDto(ApiResponseCode.CM_NOT_FOUND, channelListRes);
|
||||
}
|
||||
|
||||
int page = channelListReqDto.getPage();
|
||||
int pagePerRows = channelListReqDto.getPagePerRows();
|
||||
page = (page - 1) * pagePerRows;
|
||||
channelListReqDto.setPage(page);
|
||||
|
||||
List<ChannelInfo> channelInfos = attractMgtMapper.selectAttractList(channelListReqDto);
|
||||
|
||||
ChannelListRes channelListRes = new ChannelListRes();
|
||||
channelListRes.setList(channelInfos);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
channelListRes.setPaging(paging);
|
||||
|
||||
return new ChannelListResDto(ApiResponseCode.SUCCESS, channelListRes);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,78 +77,29 @@ public class AttractMgtService {
|
||||
* @return
|
||||
*/
|
||||
public ChannelListExcelResDto channelListExcel(ChannelListExcelReqDto channelListExcelReqDto) {
|
||||
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
|
||||
|
||||
return new ChannelListExcelResDto(ApiResponseCode.SUCCESS);
|
||||
List<ChannelInfo> channelInfos = attractMgtMapper.selectAttractExcelList(channelListExcelReqDto);
|
||||
ChannelListExcelRes channelListExcelRes = new ChannelListExcelRes();
|
||||
channelListExcelRes.setList(channelInfos);
|
||||
return new ChannelListExcelResDto(ApiResponseCode.SUCCESS, channelListExcelRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 유치 채널 상세 조회
|
||||
* @param paramMap
|
||||
* @param channelDetailReqDto
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage channelDetail(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("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;
|
||||
public ChannelDetailResDto channelDetail(ChannelDetailReqDto channelDetailReqDto) {
|
||||
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
|
||||
|
||||
ChannelDetailRes channelDetailRes = attractMgtMapper.selectAttractDetail(channelDetailReqDto);
|
||||
List<ChannelDetail> channelDetails = attractMgtMapper.selectSndCountList(channelDetailReqDto);
|
||||
channelDetailRes.setList(channelDetails);
|
||||
|
||||
return new ChannelDetailResDto(ApiResponseCode.SUCCESS, channelDetailRes);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,6 +109,7 @@ public class AttractMgtService {
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public ApiResponseMessage sendNumberListExcel(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package kr.co.uplus.ez.api.attractMgt.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class ChannelDetail implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "날짜", name = "날짜", dataType = "String")
|
||||
private String sumYm;
|
||||
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String")
|
||||
private String sndCnt;
|
||||
@ApiModelProperty(example = "SMS발송건수", name = "SMS발송건수", dataType = "String")
|
||||
private String sndCntS;
|
||||
@ApiModelProperty(example = "LMS발송건수", name = "LMS발송건수", dataType = "String")
|
||||
private String sndCntL;
|
||||
@ApiModelProperty(example = "MMS발송건수", name = "MMS발송건수", dataType = "String")
|
||||
private String sndCntM;
|
||||
@ApiModelProperty(example = "알림톡발송건수", name = "알림톡발송건수", dataType = "String")
|
||||
private String sndCntA;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.attractMgt.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class ChannelDetailReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "사용자일련번호", name = "사용자일련번호", dataType = "String")
|
||||
private String userSeq;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package kr.co.uplus.ez.api.attractMgt.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 ChannelDetailRes implements Serializable {
|
||||
|
||||
private Paging paging;
|
||||
private List<ChannelDetail> list;
|
||||
|
||||
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "String")
|
||||
private String no;
|
||||
@ApiModelProperty(example = "가입일", name = "가입일", dataType = "String")
|
||||
private String subsDt;
|
||||
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String")
|
||||
private String norgNm;
|
||||
@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 bizrno;
|
||||
@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 sndCnt;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.attractMgt.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 ChannelDetailResDto extends ResponseMessage implements Serializable {
|
||||
|
||||
// 데이터.
|
||||
private ChannelDetailRes data;
|
||||
|
||||
public ChannelDetailResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public ChannelDetailResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public ChannelDetailResDto(ApiResponseCode returnStr, ChannelDetailRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -11,22 +11,22 @@ public class ChannelInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "String")
|
||||
private String no;
|
||||
@ApiModelProperty(example = "고객사명(이름)", name = "고객사명(이름)", dataType = "String")
|
||||
@ApiModelProperty(example = "가입일", name = "가입일", dataType = "String")
|
||||
private String subsDt;
|
||||
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String")
|
||||
private String norgNm;
|
||||
@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 bRegNo;
|
||||
@ApiModelProperty(example = "템플릿 코드", name = "템플릿 코드", dataType = "String")
|
||||
private String tmpltCd;
|
||||
@ApiModelProperty(example = "템플릿명", name = "템플릿명", dataType = "String")
|
||||
private String tmpltNm;
|
||||
@ApiModelProperty(example = "템플릿 유형", name = "템플릿 유형", notes = "항목 : (01: 기본형(Default), 02:부가정보형, 03:광고추가형, 04:복합형)", dataType = "String")
|
||||
private String tmpltType;
|
||||
@ApiModelProperty(example = "상태", name = "상태" , notes = "항목 : (T:신청완료, R:검수요청완료, Q:카카오 검수중, A:템플릿승인, S:반려)" , dataType = "String")
|
||||
private String stat;
|
||||
@ApiModelProperty(example = "반려사유", name = "반려사유", dataType = "String")
|
||||
private String returnReason;
|
||||
@ApiModelProperty(example = "발신프로필", name = "발신프로필", dataType = "String")
|
||||
private String sendProfile;
|
||||
@ApiModelProperty(example = "최종수정일자", name = "최종수정일자", dataType = "String")
|
||||
private String lastChgDt;
|
||||
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String")
|
||||
private String bizrno;
|
||||
@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 sndCnt;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package kr.co.uplus.ez.api.attractMgt.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class ChannelListExcelRes implements Serializable {
|
||||
|
||||
private List<ChannelInfo> list;
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import java.io.Serializable;
|
||||
public class ChannelListExcelResDto extends ResponseMessage implements Serializable {
|
||||
|
||||
// 데이터.
|
||||
private ChannelListRes data;
|
||||
private ChannelListExcelRes data;
|
||||
|
||||
public ChannelListExcelResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
@@ -23,7 +23,7 @@ public class ChannelListExcelResDto extends ResponseMessage implements Serializa
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public ChannelListExcelResDto(ApiResponseCode returnStr, ChannelListRes data) {
|
||||
public ChannelListExcelResDto(ApiResponseCode returnStr, ChannelListExcelRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
|
||||
@@ -9,11 +9,25 @@ import java.io.Serializable;
|
||||
@Data
|
||||
public class ChannelListReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
|
||||
private String searchType2;
|
||||
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String")
|
||||
private String searchText1;
|
||||
@ApiModelProperty(example = "검색시작일", name = "검색시작일", dataType = "String")
|
||||
private String subsStDt;
|
||||
@ApiModelProperty(example = "검색종료일", name = "검색종료일", dataType = "String")
|
||||
private String subsEdDt;
|
||||
@ApiModelProperty(example = "상태", name = "상태", dataType = "String")
|
||||
private String subsSttusCd;
|
||||
@ApiModelProperty(example = "회원구분", name = "회원구분", dataType = "String")
|
||||
private String custTyCd;
|
||||
@ApiModelProperty(example = "유치자ID", name = "유치자ID", dataType = "String")
|
||||
private String loginId;
|
||||
|
||||
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String")
|
||||
private String norgNm;
|
||||
@ApiModelProperty(example = "상세검색조건", name = "상세검색조건", dataType = "String")
|
||||
private String searchType;
|
||||
@ApiModelProperty(example = "검색어", name = "검색어", dataType = "String")
|
||||
private String searchText;
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
private int pagePerRows;
|
||||
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "String")
|
||||
private int page;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package kr.co.uplus.ez.api.channelMgt;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.*;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -13,9 +10,8 @@ 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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ChannelMgtService {
|
||||
@@ -34,7 +30,7 @@ public class ChannelMgtService {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 알림톡 템플릿 목록 조회
|
||||
* @param paramMap
|
||||
* @param tmpltListReqDto
|
||||
* @return
|
||||
*/
|
||||
public TmpltListResDto tmpltList(TmpltListReqDto tmpltListReqDto) {
|
||||
|
||||
@@ -34,6 +34,8 @@ public interface RiskMgtMapper {
|
||||
|
||||
void insertMsgBlckword(MsgInsertIntrcpReqDto msgInsertIntrcpReqDto);
|
||||
|
||||
String selectMsgBlckWordSeq();
|
||||
|
||||
void insertBlckwordDtl(List<MsgBlckwordList> msgBlckwordLists);
|
||||
|
||||
int updateMsgBlckword(MsgUpdateIntrcplReqDto msgUpdateIntrcplReqDto);
|
||||
|
||||
@@ -28,10 +28,10 @@ public class RiskMgtService {
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb2")
|
||||
private SqlSessionTemplate sqlSessionSlave;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발신번호 차단 목록 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 발신번호 차단 목록 조회
|
||||
*
|
||||
* @param sendNumIntrcpListReqDto
|
||||
* @return SendNumIntrcpListResDto
|
||||
*/
|
||||
@@ -74,49 +74,48 @@ public class RiskMgtService {
|
||||
|
||||
return new SendNumIntrcpListResDto(ApiResponseCode.SUCCESS, sendNumIntrcpListRes);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발신번호 차단 상세 정보 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 발신번호 차단 상세 정보 조회
|
||||
*
|
||||
* @param sendNumIntrcpDetailReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public SendNumIntrcpDetailResDto sendNumIntrcpDetail(SendNumIntrcpDetailReqDto sendNumIntrcpDetailReqDto) {
|
||||
|
||||
RiskMgtMapper riskMgtMapper = sqlSessionSlave.getMapper(RiskMgtMapper.class);
|
||||
|
||||
SendNumIntrcpDetail sendNumIntrcpDetail = riskMgtMapper.selectSndrnoBlckDetail(sendNumIntrcpDetailReqDto.getBlckSndrno());
|
||||
SendNumIntrcpDetail sendNumIntrcpDetail = riskMgtMapper
|
||||
.selectSndrnoBlckDetail(sendNumIntrcpDetailReqDto.getBlckSndrno());
|
||||
|
||||
if(sendNumIntrcpDetail == null){
|
||||
if (sendNumIntrcpDetail == null) {
|
||||
return new SendNumIntrcpDetailResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
return new SendNumIntrcpDetailResDto(ApiResponseCode.SUCCESS, sendNumIntrcpDetail);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발신번호 차단 신규 등록
|
||||
* date : 2022. 4. 25. auth : ckr desc : 발신번호 차단 신규 등록
|
||||
*
|
||||
* @param insertIntrcpReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public SendNumInsertIntrcpResDto sendNumInsertIntrcp(SendNumInsertIntrcpReqDto insertIntrcpReqDto) {
|
||||
|
||||
RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class);
|
||||
|
||||
try{
|
||||
try {
|
||||
insertIntrcpReqDto.setBlckYn(Const.COMM_YES);
|
||||
//regId 들고오기
|
||||
// regId 들고오기
|
||||
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
UserDetails userDetails = (UserDetails) principal;
|
||||
String regId = userDetails.getUsername();
|
||||
|
||||
|
||||
insertIntrcpReqDto.setRegId(regId);
|
||||
|
||||
|
||||
riskMgtMapper.insertSndrnoBlck(insertIntrcpReqDto);
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
return new SendNumInsertIntrcpResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
@@ -124,51 +123,53 @@ public class RiskMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발신번호 차단 수정
|
||||
* date : 2022. 4. 25. auth : ckr desc : 발신번호 차단 수정
|
||||
*
|
||||
* @param sendNumUpdateIntrcplReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public SendNumUpdateIntrcpResDto sendNumUpdateIntrcp(SendNumUpdateIntrcplReqDto sendNumUpdateIntrcplReqDto) {
|
||||
|
||||
RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class);
|
||||
sendNumUpdateIntrcplReqDto.setChgId("test");;
|
||||
|
||||
// sendNumUpdateIntrcplReqDto.setChgId("test");;
|
||||
// regId 들고오기
|
||||
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
UserDetails userDetails = (UserDetails) principal;
|
||||
String chgId = userDetails.getUsername();
|
||||
sendNumUpdateIntrcplReqDto.setChgId(chgId);
|
||||
|
||||
int result = riskMgtMapper.updateSndrnoBlck(sendNumUpdateIntrcplReqDto);
|
||||
|
||||
if(result > 0){
|
||||
if (result > 0) {
|
||||
return new SendNumUpdateIntrcpResDto(ApiResponseCode.SUCCESS);
|
||||
}else{
|
||||
} else {
|
||||
return new SendNumUpdateIntrcpResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발신번호 차단 삭제
|
||||
* date : 2022. 4. 25. auth : ckr desc : 발신번호 차단 삭제
|
||||
*
|
||||
* @param sendNumDeleteIntrcpReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public SendNumDeleteIntrcpResDto sendNumDeleteIntrcp(SendNumDeleteIntrcpReqDto sendNumDeleteIntrcpReqDto) {
|
||||
RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class);
|
||||
|
||||
int result = riskMgtMapper.deleteSndrnoBlck(sendNumDeleteIntrcpReqDto);
|
||||
|
||||
if(result > 0){
|
||||
if (result > 0) {
|
||||
return new SendNumDeleteIntrcpResDto(ApiResponseCode.SUCCESS);
|
||||
}else{
|
||||
} else {
|
||||
return new SendNumDeleteIntrcpResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 080수신번호 차단 목록 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 080수신번호 차단 목록 조회
|
||||
*
|
||||
* @param zezNumIntrcpListReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public ZezNumIntrcpListResDto zezNumIntrcpList(ZezNumIntrcpListReqDto zezNumIntrcpListReqDto) {
|
||||
|
||||
@@ -210,11 +211,10 @@ public class RiskMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 메시지 차단 목록 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 메시지 차단 목록 조회
|
||||
*
|
||||
* @param msgNumIntrcpListReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public MsgIntrcpListResDto msgIntrcpList(MsgIntrcpListReqDto msgNumIntrcpListReqDto) {
|
||||
|
||||
@@ -257,11 +257,10 @@ public class RiskMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 메시지 차단 상세 정보 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 메시지 차단 상세 정보 조회
|
||||
*
|
||||
* @param msgIntrcpDetailReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public MsgIntrcpDetailResDto msgIntrcpDetail(MsgIntrcpDetailReqDto msgIntrcpDetailReqDto) {
|
||||
|
||||
@@ -269,7 +268,7 @@ public class RiskMgtService {
|
||||
|
||||
MsgIntrcpDetail msgIntrcpDetail = riskMgtMapper.selectMsgBlckwordDetail(msgIntrcpDetailReqDto);
|
||||
|
||||
if(msgIntrcpDetail == null){
|
||||
if (msgIntrcpDetail == null) {
|
||||
return new MsgIntrcpDetailResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -281,21 +280,38 @@ public class RiskMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 메시지 차단 신규 등록
|
||||
* date : 2022. 4. 25. auth : ckr desc : 메시지 차단 신규 등록
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public MsgInsertIntrcpResDto msgInsertIntrcp(MsgInsertIntrcpReqDto msgInsertIntrcpReqDto) {
|
||||
|
||||
RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class);
|
||||
|
||||
try{
|
||||
// regId 들고오기
|
||||
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
UserDetails userDetails = (UserDetails) principal;
|
||||
String regId = userDetails.getUsername();
|
||||
try {
|
||||
String seqNoStr = riskMgtMapper.selectMsgBlckWordSeq();
|
||||
long seqNo = Long.parseLong(seqNoStr);
|
||||
// seq select
|
||||
msgInsertIntrcpReqDto.setSeqNo(seqNo);
|
||||
msgInsertIntrcpReqDto.setRegId(regId);
|
||||
msgInsertIntrcpReqDto.setBlckYn(Const.COMM_YES);
|
||||
riskMgtMapper.insertMsgBlckword(msgInsertIntrcpReqDto);
|
||||
//TODO 차단문구 등록
|
||||
riskMgtMapper.insertBlckwordDtl(msgInsertIntrcpReqDto.getList());
|
||||
}catch (Exception e){
|
||||
// TODO 차단문구 등록
|
||||
|
||||
// 리스트에 regId 넣기
|
||||
List<MsgBlckwordList> list = msgInsertIntrcpReqDto.getList();
|
||||
for (MsgBlckwordList msgBlckword : list) {
|
||||
msgBlckword.setSeqNo(seqNo);
|
||||
msgBlckword.setRegId(regId);
|
||||
}
|
||||
|
||||
riskMgtMapper.insertBlckwordDtl(list);
|
||||
|
||||
} catch (Exception e) {
|
||||
return new MsgInsertIntrcpResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
@@ -303,39 +319,52 @@ public class RiskMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 메시지 차단 수정
|
||||
* date : 2022. 4. 25. auth : ckr desc : 메시지 차단 수정
|
||||
*
|
||||
* @param msgUpdateIntrcplReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public MsgUpdateIntrcpResDto msgUpdateIntrcp(MsgUpdateIntrcplReqDto msgUpdateIntrcplReqDto) {
|
||||
|
||||
RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class);
|
||||
|
||||
// regId 들고오기
|
||||
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
UserDetails userDetails = (UserDetails) principal;
|
||||
String regId = userDetails.getUsername();
|
||||
|
||||
msgUpdateIntrcplReqDto.setRegId(regId);
|
||||
int result = riskMgtMapper.updateMsgBlckword(msgUpdateIntrcplReqDto);
|
||||
|
||||
if(result > 0){
|
||||
if (result > 0) {
|
||||
|
||||
int subResult = riskMgtMapper.deleteBlckwordDtl(msgUpdateIntrcplReqDto.getSeqNo());
|
||||
|
||||
if(subResult > 0){
|
||||
riskMgtMapper.insertBlckwordDtl(msgUpdateIntrcplReqDto.getList());
|
||||
if (subResult > 0) {
|
||||
//들고온 seqNo Long 형변환
|
||||
long seqNo = Long.parseLong(msgUpdateIntrcplReqDto.getSeqNo());
|
||||
|
||||
List<MsgBlckwordList> list = msgUpdateIntrcplReqDto.getList();
|
||||
|
||||
for (MsgBlckwordList msgBlckword : list) {
|
||||
msgBlckword.setSeqNo(seqNo);
|
||||
msgBlckword.setRegId(regId);
|
||||
}
|
||||
riskMgtMapper.insertBlckwordDtl(list);
|
||||
}
|
||||
|
||||
return new MsgUpdateIntrcpResDto(ApiResponseCode.SUCCESS);
|
||||
}else{
|
||||
} else {
|
||||
return new MsgUpdateIntrcpResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 메시지 차단 삭제
|
||||
* date : 2022. 4. 25. auth : ckr desc : 메시지 차단 삭제
|
||||
*
|
||||
* @param msgDeleteIntrcpReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public MsgDeleteIntrcpResDto msgDeleteIntrcp(MsgDeleteIntrcpReqDto msgDeleteIntrcpReqDto) {
|
||||
|
||||
@@ -348,11 +377,10 @@ public class RiskMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 차단 내역 목록 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 차단 내역 목록 조회
|
||||
*
|
||||
* @param webInsertIntrcpReqDto
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public WebIntrcpListResDto webIntrcpList(WebInsertIntrcpReqDto webInsertIntrcpReqDto) {
|
||||
|
||||
|
||||
@@ -4,13 +4,15 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigInteger;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class MsgBlckwordList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "일련번호", name = "일련번호", dataType = "String")
|
||||
private String seqNo;
|
||||
@ApiModelProperty(example = "차단문구", name = "차단문구", dataType = "String")
|
||||
private long seqNo;
|
||||
@ApiModelProperty(example = "차단문구", name = "차단문구", dataType = "String")
|
||||
private String word;
|
||||
@ApiModelProperty(example = "등록자 ID", name = "등록자 ID", dataType = "String")
|
||||
private String regId;
|
||||
}
|
||||
@@ -9,13 +9,18 @@ import java.util.List;
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class MsgInsertIntrcpReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "등록자", name = "등록자", dataType = "String")
|
||||
private long seqNo;
|
||||
@ApiModelProperty(example = "등록자", name = "등록자", dataType = "String")
|
||||
private String regId;
|
||||
@ApiModelProperty(example = "차단사유", name = "차단사유", dataType = "String")
|
||||
private String blckRsnCd;
|
||||
@ApiModelProperty(example = "차단조건", name = "차단조건", dataType = "String")
|
||||
private String blckContCd;
|
||||
@ApiModelProperty(example = "차단여부", name = "차단여부", dataType = "String")
|
||||
private String blckYn;
|
||||
@ApiModelProperty(example = "메모", name = "메모", dataType = "String")
|
||||
private String memo;
|
||||
|
||||
|
||||
private List<MsgBlckwordList> list;
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
@@ -11,6 +12,8 @@ public class MsgIntrcpDetail implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "일련번호", name = "일련번호", dataType = "String")
|
||||
private String seqNo;
|
||||
@ApiModelProperty(example = "등록자ID", name = "등록자ID", dataType = "String")
|
||||
private String regId;
|
||||
@ApiModelProperty(example = "차단사유", name = "차단사유", dataType = "String")
|
||||
private String blckRsnCd;
|
||||
@ApiModelProperty(example = "차단조건", name = "차단조건", dataType = "String")
|
||||
@@ -22,6 +25,6 @@ public class MsgIntrcpDetail implements Serializable {
|
||||
@ApiModelProperty(example = "메모", name = "메모", dataType = "String")
|
||||
private String memo;
|
||||
|
||||
private java.util.List<MsgBlckwordList> list;
|
||||
private List<MsgBlckwordList> list;
|
||||
|
||||
}
|
||||
@@ -12,5 +12,5 @@ public class MsgIntrcpDetailReqDto implements Serializable {
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "일련번호", name = "일련번호", dataType = "String")
|
||||
private String seqNo;
|
||||
private long seqNo;
|
||||
}
|
||||
@@ -11,6 +11,8 @@ public class MsgIntrcpList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "리스트 번호", name = "리스트 번호", dataType = "String")
|
||||
private String no;
|
||||
@ApiModelProperty(example = "일련번호", name = "일련번호", dataType = "String")
|
||||
private String seqNo;
|
||||
@ApiModelProperty(example = "차단메시지", name = "차단메시지", dataType = "String")
|
||||
private String word;
|
||||
@ApiModelProperty(example = "차단여부", name = "차단여부", dataType = "String")
|
||||
|
||||
@@ -9,7 +9,9 @@ import java.io.Serializable;
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class MsgIntrcpListReqDto implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(example = "일련번호", name = "일련번호", dataType = "String")
|
||||
private String seqNo;
|
||||
@ApiModelProperty(example = "등록자", name = "등록자", dataType = "String")
|
||||
private String regId;
|
||||
@ApiModelProperty(example = "차단사유", name = "차단사유",dataType = "String")
|
||||
|
||||
@@ -20,6 +20,8 @@ public class MsgUpdateIntrcplReqDto implements Serializable {
|
||||
private String blckYn;
|
||||
@ApiModelProperty(example = "메모", name = "메모", dataType = "String")
|
||||
private String memo;
|
||||
@ApiModelProperty(example = "등록자ID", name = "등록자ID", dataType = "String")
|
||||
private String regId;
|
||||
|
||||
private List<MsgBlckwordList> list;
|
||||
}
|
||||
@@ -26,6 +26,6 @@ public class SendNumUpdateIntrcplReqDto implements Serializable {
|
||||
@ApiModelProperty(example = "메모", name = "메모", dataType = "String")
|
||||
private String meno;
|
||||
|
||||
@ApiModelProperty(example = "마지막 수정일", name = "마지막 수정일", dataType = "String")
|
||||
@ApiModelProperty(example = "변경 ID", name = "변경 ID", dataType = "String")
|
||||
private String chgId;
|
||||
}
|
||||
@@ -5,37 +5,20 @@
|
||||
*/
|
||||
package kr.co.uplus.ez.api.sendNumMgt;
|
||||
|
||||
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.sendNumMgt.dto.SendAdminListReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.SendAdminListResDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.DeleteNumberReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.DeleteNumberResDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.DetailNumberReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.DetailNumberResDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumberReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumberResDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.ProfileListReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.ProfileListResDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListResDto;
|
||||
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.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "api/v1/bo/sendNumMgt")
|
||||
@@ -50,8 +33,7 @@ public class SendNumMgtController {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 발신 프로필 목록 조회
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
* @param profileListReqDto
|
||||
*/
|
||||
@ApiOperation(value = "/profileList", notes = "발신 프로필 목록 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@@ -70,15 +52,13 @@ public class SendNumMgtController {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 문자 발신 번호 목록 조회
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
* @param sendNumberListReqDto
|
||||
*/
|
||||
|
||||
@ApiOperation(value = "/numberList", notes = "문자 발신 번호 목록 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "numberList", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public SendNumberListResDto numberList(@RequestBody @Valid SendNumberListReqDto sendNumberListReqDto, BindingResult bindingResult) throws Exception{
|
||||
public SendNumberListResDto numberList(@RequestBody @Valid SendNumberListReqDto sendNumberListReqDto, BindingResult bindingResult) {
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new SendNumberListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
@@ -90,15 +70,13 @@ public class SendNumMgtController {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 문자 발신 번호 삭제
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
* @param deleteNumberReqDto
|
||||
*/
|
||||
|
||||
@ApiOperation(value = "/deleteNumber", notes = "문자 발신 번호 삭제")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "deleteNumber", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public DeleteNumberResDto deleteNumber(@RequestBody @Valid DeleteNumberReqDto deleteNumberReqDto, BindingResult bindingResult) throws Exception{
|
||||
public DeleteNumberResDto deleteNumber(@RequestBody @Valid DeleteNumberReqDto deleteNumberReqDto, BindingResult bindingResult) {
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new DeleteNumberResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
@@ -110,15 +88,13 @@ public class SendNumMgtController {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 문자 발신 번호 등록
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
* @param insertNumberReqDto
|
||||
*/
|
||||
|
||||
@ApiOperation(value = "/insertNumber", notes = "문자 발신 번호 등록")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "insertNumber", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public InsertNumberResDto insertNumber(@RequestBody @Valid InsertNumberReqDto insertNumberReqDto, BindingResult bindingResult) throws Exception{
|
||||
public InsertNumberResDto insertNumber(@RequestBody @Valid InsertNumberReqDto insertNumberReqDto, BindingResult bindingResult) {
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new InsertNumberResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
@@ -131,14 +107,13 @@ public class SendNumMgtController {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 문자 발신 번호 정보 상세 조회
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
* @param detailNumberReqDto
|
||||
*/
|
||||
@ApiOperation(value = "/numberDetail", notes = "문자 발신 번호 정보 상세 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "numberDetail", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public DetailNumberResDto numberDetail(@RequestBody @Valid DetailNumberReqDto detailNumberReqDto, BindingResult bindingResult) throws Exception{
|
||||
public DetailNumberResDto numberDetail(@RequestBody @Valid DetailNumberReqDto detailNumberReqDto, BindingResult bindingResult) {
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new DetailNumberResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
@@ -151,14 +126,13 @@ public class SendNumMgtController {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자ID 목록 조회
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
* @param adminListReqDto
|
||||
*/
|
||||
@ApiOperation(value = "/adminList", notes = "관리자ID 목록 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "adminList", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public SendAdminListResDto adminList(@RequestBody @Valid SendAdminListReqDto adminListReqDto, BindingResult bindingResult) throws Exception{
|
||||
public SendAdminListResDto adminList(@RequestBody @Valid SendAdminListReqDto adminListReqDto, BindingResult bindingResult) {
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new SendAdminListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
@@ -172,11 +146,10 @@ public class SendNumMgtController {
|
||||
* auth : ckr
|
||||
* desc : 발신번호 승인 목록 조회
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/apprList" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage apprList(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
public ApiResponseMessage apprList(@RequestBody Map<String, Object> paramMap) {
|
||||
return sendNumService.apprList(paramMap);
|
||||
}
|
||||
|
||||
@@ -185,11 +158,10 @@ public class SendNumMgtController {
|
||||
* auth : ckr
|
||||
* desc : 발신번호 승인 상세 정보 조회
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/apprDetail" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage apprDetail(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
public ApiResponseMessage apprDetail(@RequestBody Map<String, Object> paramMap) {
|
||||
return sendNumService.apprDetail(paramMap);
|
||||
}
|
||||
|
||||
@@ -198,11 +170,10 @@ public class SendNumMgtController {
|
||||
* auth : ckr
|
||||
* desc : 발송내역 목록 조회
|
||||
* @param paramMap
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/insertAppr" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage insertAppr(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
public ApiResponseMessage insertAppr(@RequestBody Map<String, Object> paramMap) {
|
||||
return sendNumService.insertAppr(paramMap);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,51 +1,21 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
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.Paging;
|
||||
import kr.co.uplus.ez.common.utils.FileUtil;
|
||||
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 org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
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.SendAdminListRes;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.SendAdminListResDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.AuthFileInfo;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.AuthFileList;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.DeleteNumberReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.DeleteNumberResDto;
|
||||
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.DetailNumberResDto;
|
||||
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.InsertNumberResDto;
|
||||
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.ProfileListRes;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.ProfileListResDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberInfo;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListReqDto;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListRes;
|
||||
import kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListResDto;
|
||||
import kr.co.uplus.ez.api.sysMgt.SysMgtMapper;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.AdminDetail;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.AdminDetailResDto;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.InsertAdminReqDto;
|
||||
import kr.co.uplus.ez.api.sysMgt.dto.InsertAdminResDto;
|
||||
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.common.utils.EncryptionUtil;
|
||||
import kr.co.uplus.ez.common.utils.FileUtil;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class SendNumMgtService {
|
||||
@@ -105,7 +75,7 @@ public class SendNumMgtService {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 문자 발신 번호 목록 조회
|
||||
* @param paramMap
|
||||
* @param sendNumberListReqDto
|
||||
* @return
|
||||
*/
|
||||
public SendNumberListResDto numberList(SendNumberListReqDto sendNumberListReqDto) {
|
||||
|
||||
@@ -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 InsertNumber implements Serializable{
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@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 SendNumberInfo implements Serializable{
|
||||
@@ -24,7 +24,7 @@ public class SendNumberInfo implements Serializable{
|
||||
@ApiModelProperty(example = "인앱채널 구분", name = "인앱채널 구분", dataType = "String")
|
||||
private String inchDivCd;
|
||||
@ApiModelProperty(example = "발신번호", name = "발신번호", dataType = "String")
|
||||
private String regNo;
|
||||
private String sndrno;
|
||||
@ApiModelProperty(example = "승인상태", name = "승인상태", notes = "항목 : 01:승인대기/02:승인완료/03:반려", dataType = "String")
|
||||
private String sttusCd;
|
||||
@ApiModelProperty(example = "등록방법", name = "등록방법", notes = "항목 : 01:본인인증, 02:서류심사", dataType = "String")
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package kr.co.uplus.ez.api.sendNumMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class SendNumberListReqDto implements Serializable{
|
||||
@@ -20,6 +19,8 @@ public class SendNumberListReqDto implements Serializable{
|
||||
private String searchType3;
|
||||
@ApiModelProperty(example = "상세검색", name = "상세검색", notes = "항목 : 사업자번호(생년월일), 발신번호, 고객사명(이름)", dataType = "String")
|
||||
private String searchType4;
|
||||
@ApiModelProperty(example = "등록방법", name = "등록방법", notes = "항목 : 서류심사, 본인인증", dataType = "String")
|
||||
private String searchType5;
|
||||
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", notes = "검색어(입력항목)", dataType = "String")
|
||||
private String searchText1;
|
||||
|
||||
|
||||
@@ -48,4 +48,8 @@ testId:
|
||||
cmpyNm: 임시회사
|
||||
paymMthd: 2
|
||||
custTyCd: 02
|
||||
|
||||
|
||||
file-resource:
|
||||
info:
|
||||
sendNumber:
|
||||
path: /efs/admin/sendNumber/
|
||||
@@ -48,4 +48,9 @@ testId:
|
||||
dadr: 0층
|
||||
cmpyNm: 임시회사
|
||||
paymMthd: 2
|
||||
custTyCd: 02
|
||||
custTyCd: 02
|
||||
|
||||
file-resource:
|
||||
info:
|
||||
sendNumber:
|
||||
path: /efs/admin/sendNumber/
|
||||
@@ -30,4 +30,26 @@ spring:
|
||||
|
||||
schedule:
|
||||
sample:
|
||||
init: 60000
|
||||
init: 60000
|
||||
|
||||
# 2차인증 제외 ID목록.
|
||||
authentication:
|
||||
without:
|
||||
id: superadminuser,jambler01,jambler02,jambler03,jambler04,jambler05,jambler06
|
||||
|
||||
testId:
|
||||
prodCd: LPZ0045389
|
||||
rpsnBday: 19800101
|
||||
brno: 1234567890
|
||||
cono: 9876543210987
|
||||
zipCd: 04389
|
||||
badr: 서울특별시 용산구 한강대로 32
|
||||
dadr: 0층
|
||||
cmpyNm: 임시회사
|
||||
paymMthd: 2
|
||||
custTyCd: 02
|
||||
|
||||
file-resource:
|
||||
info:
|
||||
sendNumber:
|
||||
path: /efs/admin/sendNumber/
|
||||
@@ -47,4 +47,9 @@ testId:
|
||||
dadr: 0층
|
||||
cmpyNm: 임시회사
|
||||
paymMthd: 2
|
||||
custTyCd: 02
|
||||
custTyCd: 02
|
||||
|
||||
file-resource:
|
||||
info:
|
||||
sendNumber:
|
||||
path: /efs/admin/sendNumber/
|
||||
@@ -119,14 +119,142 @@
|
||||
<if test="norgNm != null and norgNm != ''">
|
||||
AND eig.NORG_NM = #{norgNm}
|
||||
</if>
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND eci.CUST_NM = #{custNm}
|
||||
</if>
|
||||
<if test="userNm != null and userNm != ''">
|
||||
AND esu.USER_NM = #{userNm}
|
||||
</if>
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND eci.BIZRNO = #{bizrno}
|
||||
<if test="searchType != null and searchType != ''">
|
||||
<if test="searchType == '01' and searchText != null and searchText != ''">
|
||||
AND UPPER(eci.CUST_NM) LIKE UPPER(CONCAT('%', #{searchText}, '%'))
|
||||
</if>
|
||||
<if test="searchType == '02' and searchText != null and searchText != ''">
|
||||
AND UPPER(esu.USER_NM) LIKE UPPER(CONCAT('%', #{searchText}, '%'))
|
||||
</if>
|
||||
<if test="searchType == '03' and searchText != null and searchText != ''">
|
||||
AND eci.BIZRNO = #{searchText}
|
||||
</if>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<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
|
||||
, 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
|
||||
FROM
|
||||
hubez_common.EZ_SUBS_INFO esi
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON eci.CUST_SEQ = esi.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON esu.USER_SEQ = esi.USER_SEQ
|
||||
INNER JOIN hubez_imdb.EZ_IM_USER eiu
|
||||
ON eiu.LOGIN_ID = esi.ATTRCTOR_ID
|
||||
INNER JOIN hubez_imdb.EZ_IM_GROUP eig
|
||||
ON eiu.EX_DEPT_CD = eig.NORG_CD
|
||||
WHERE 1 = 1
|
||||
AND esu.USER_SEQ = #{userSeq}
|
||||
</select>
|
||||
|
||||
<select id="selectSndCountList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetail">
|
||||
|
||||
SELECT
|
||||
T1.*
|
||||
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
|
||||
SUM(SND_CNT) AS SND_CNT
|
||||
FROM
|
||||
hubez_common.EZ_CUST_MSTAT
|
||||
WHERE
|
||||
SND_CH_CD = 'SMS') AS S
|
||||
JOIN (
|
||||
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
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -96,7 +96,7 @@
|
||||
UPDATE
|
||||
${HUBEZ_COMMON}.EZ_SNDRNO_BLCK
|
||||
SET
|
||||
CHG_ID = #{}
|
||||
CHG_ID = #{chgId}
|
||||
, CHG_DT = NOW()
|
||||
<if test="sndblckTpCd != null and sndblckTpCd != ''">
|
||||
, SNDBLCK_TP_CD = #{sndblckTpCd}
|
||||
@@ -209,7 +209,7 @@
|
||||
emb.SEQ_NO
|
||||
, ebd.WORD
|
||||
, emb.BLCK_YN
|
||||
, DATE_FORMAT(emb.CHG_DT , '%Y-%m-%d') AS CHG_DT
|
||||
, DATE_FORMAT(emb.REG_DT , '%Y-%m-%d') AS LAST_CHG_DT
|
||||
,(
|
||||
SELECT
|
||||
DTL_CD_NM
|
||||
@@ -227,7 +227,7 @@
|
||||
<include refid="msgBlckwordListCondition"/>
|
||||
ORDER BY emb.CHG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows} ) A
|
||||
,( SELECT @ROWNUM := 7 ) AS R;
|
||||
,( SELECT @ROWNUM := #{page} ) AS R;
|
||||
</select>
|
||||
|
||||
<sql id="msgBlckwordListCondition">
|
||||
@@ -245,11 +245,11 @@
|
||||
<select id="selectMsgBlckwordDetail" parameterType="kr.co.uplus.ez.api.riskMgt.dto.MsgIntrcpDetailReqDto" resultType="kr.co.uplus.ez.api.riskMgt.dto.MsgIntrcpDetail">
|
||||
/* riskMgt-mapper.xml(selectMsgBlckwordDetail) */
|
||||
SELECT
|
||||
emb.SEQ_NO
|
||||
, emb.BLCK_CONT_CD
|
||||
, emb.BLCK_RSN_CD
|
||||
, emb.MEMO
|
||||
, emb.BLCK_YN
|
||||
SEQ_NO
|
||||
, BLCK_CONT_CD
|
||||
, BLCK_RSN_CD
|
||||
, MEMO
|
||||
, BLCK_YN
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_MSG_BLCKWORD emb
|
||||
WHERE emb.SEQ_NO = #{seqNo}
|
||||
@@ -265,11 +265,16 @@
|
||||
WHERE ebd.SEQ_NO = #{seqNo}
|
||||
</select>
|
||||
|
||||
<select id="selectMsgBlckWordSeq" resultType="String">
|
||||
SELECT ${HUBEZ_COMMON}.FUN_NEXT_SEQ('MSG_BLCKWORD_SEQ')
|
||||
</select>
|
||||
|
||||
<insert id="insertMsgBlckword" parameterType="kr.co.uplus.ez.api.riskMgt.dto.MsgInsertIntrcpReqDto">
|
||||
/* riskMgt-mapper.xml(insertMsgBlckword) */
|
||||
INSERT
|
||||
INTO ${HUBEZ_COMMON}.EZ_MSG_BLCKWORD (
|
||||
BLCK_CONT_CD
|
||||
SEQ_NO
|
||||
, BLCK_CONT_CD
|
||||
, BLCK_RSN_CD
|
||||
, BLCK_YN
|
||||
, MEMO
|
||||
@@ -278,29 +283,30 @@
|
||||
, CHG_ID
|
||||
, CHG_DT
|
||||
) VALUES(
|
||||
#{blckContCd}
|
||||
#{seqNo}
|
||||
, #{blckContCd}
|
||||
, #{blckRsnCd}
|
||||
, #{blckYn}
|
||||
, #{memo}
|
||||
, #{regId}
|
||||
, NOW()
|
||||
, #{regId}
|
||||
, NOW())
|
||||
, NOW())
|
||||
</insert>
|
||||
|
||||
<insert id="insertBlckwordDtl" parameterType="java.util.List">
|
||||
/* riskMgt-mapper.xml(insertBlckwordDtl) */
|
||||
INSERT
|
||||
INTO ${HUBEZ_COMMON}.EZ_BLCKWORD_DTL (
|
||||
SEQ_NO
|
||||
SEQ_NO
|
||||
, WORD
|
||||
, REG_ID
|
||||
, REG_DT
|
||||
) VALUES(
|
||||
#{seqNo}
|
||||
, #{word}
|
||||
, #{regId}
|
||||
, NOW())
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" index="i"
|
||||
separator=",">
|
||||
(#{item.seqNo}, #{item.word}, #{item.regId}, NOW() )
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateMsgBlckword" parameterType="kr.co.uplus.ez.api.riskMgt.dto.MsgUpdateIntrcplReqDto">
|
||||
@@ -308,7 +314,7 @@
|
||||
UPDATE
|
||||
${HUBEZ_COMMON}.EZ_MSG_BLCKWORD
|
||||
SET
|
||||
CHG_ID = #{chgId}
|
||||
CHG_ID = #{regId}
|
||||
, CHG_DT = NOW()
|
||||
<if test="blckContCd != null and blckContCd != ''">
|
||||
, BLCK_CONT_CD = #{blckContCd}
|
||||
|
||||
@@ -88,66 +88,90 @@
|
||||
</if>
|
||||
</if>
|
||||
</sql>
|
||||
<select id="selectSendNumberTotalCnt" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListReqDto" resultType="int">
|
||||
/* sendNumMgt-mapper.xml(selectSendNumberTotalCnt) */
|
||||
<select id="selectSendNumberTotalCnt" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListReqDto" resultType="int">
|
||||
/* sendNumMgt-mapper.xml(selectSendNumberTotalCnt) */
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM hubez_common.EZ_SVC_SNDRNO ess
|
||||
LEFT JOIN hubez_common.EZ_SNDRNO_REG esr
|
||||
ON ess.REG_REQ_NO = esr.REG_REQ_NO
|
||||
LEFT JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON esr.USER_SEQ = esu.USER_SEQ
|
||||
LEFT JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON esu.CUST_SEQ = eci.CUST_SEQ
|
||||
FROM
|
||||
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
|
||||
ON
|
||||
esu.USER_SEQ = esr.USER_SEQ
|
||||
LEFT JOIN hubez_common.EZ_SVC_SNDRNO ess
|
||||
ON
|
||||
eci.CUST_SEQ = ess.CUST_SEQ
|
||||
WHERE 1=1
|
||||
<include refid="numberListCondition"></include>
|
||||
</select>
|
||||
|
||||
<select id="selectSendNumberList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberListReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.SendNumberInfo">
|
||||
/* sendNumMgt-mapper.xml(selectSendNumberList) */
|
||||
/* sendNumMgt-mapper.xml(selectSendNumberList) */
|
||||
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
eci.CUST_NM AS custNm
|
||||
,esu.USER_ID AS adminId
|
||||
,ess.REG_ID AS register
|
||||
,eci.BIZRNO AS bRegNo
|
||||
,CASE WHEN ess.NMINEE_DIV_CD = '01' THEN '사업자(본인, 대표, 임직원)'
|
||||
WHEN ess.NMINEE_DIV_CD = '02' THEN '타사업자'
|
||||
ELSE '-'
|
||||
END AS nmineeDivCd
|
||||
,CASE WHEN ess.INCH_DIV_CD = '01' THEN '홈페이지'
|
||||
WHEN ess.INCH_DIV_CD = '02' THEN '어드민'
|
||||
ELSE '-'
|
||||
END AS inchDivCd
|
||||
,ess.SNDRNO AS regNo
|
||||
,CASE WHEN ess.STTUS_CD = '01' THEN '승인대기'
|
||||
WHEN ess.STTUS_CD = '02' THEN '승인완료'
|
||||
WHEN ess.STTUS_CD = '03' THEN '반려'
|
||||
ELSE '-'
|
||||
END AS sttusCd
|
||||
,CASE WHEN ess.REG_TP_CD = '01' THEN '본인인증'
|
||||
WHEN ess.REG_TP_CD = '02' THEN '서류심사'
|
||||
ELSE '-'
|
||||
END AS regTpCd
|
||||
,ess.REG_DT AS regDt
|
||||
FROM hubez_common.EZ_SVC_SNDRNO ess
|
||||
LEFT JOIN hubez_common.EZ_SNDRNO_REG esr
|
||||
ON ess.REG_REQ_NO = esr.REG_REQ_NO
|
||||
LEFT JOIN hubez_common.EZ_SVC_USER esu
|
||||
ON esr.USER_SEQ = esu.USER_SEQ
|
||||
LEFT JOIN hubez_common.EZ_CUST_INFO eci
|
||||
ON esu.CUST_SEQ = eci.CUST_SEQ
|
||||
WHERE 1=1
|
||||
<include refid="numberListCondition"></include>
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
( SELECT @ROWNUM := #{page} ) AS R
|
||||
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
eci.CUST_NM AS custNm
|
||||
, ess.SNDRNO
|
||||
, esu.USER_ID AS adminId
|
||||
, ess.REG_ID AS register
|
||||
, eci.BIZRNO AS bRegNo
|
||||
, esr.REG_REQ_NO
|
||||
,(
|
||||
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
|
||||
,(
|
||||
SELECT
|
||||
ecd.DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL ecd
|
||||
WHERE
|
||||
ecd.GRP_CD = 'INCH_DIV_CD'
|
||||
AND ecd.DTL_CD = ess.INCH_DIV_CD) AS inchDivCd
|
||||
,(
|
||||
SELECT
|
||||
ecd.DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL ecd
|
||||
WHERE
|
||||
ecd.GRP_CD = 'SNDRNO_STTUS_CD'
|
||||
AND ecd.DTL_CD = ess.STTUS_CD) AS sttusCd
|
||||
,(
|
||||
SELECT
|
||||
ecd.DTL_CD_NM
|
||||
FROM
|
||||
hubez_common.EZ_CD_DTL ecd
|
||||
WHERE
|
||||
ecd.GRP_CD = 'SNDRNO_REG_TP_CD'
|
||||
AND ecd.DTL_CD = ess.REG_TP_CD) AS regTpCd
|
||||
, DATE_FORMAT(ess.REG_DT, '%Y-%m-%d') AS regDt
|
||||
FROM
|
||||
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
|
||||
ON
|
||||
esu.USER_SEQ = esr.USER_SEQ
|
||||
LEFT JOIN hubez_common.EZ_SVC_SNDRNO ess
|
||||
ON
|
||||
eci.CUST_SEQ = ess.CUST_SEQ
|
||||
WHERE 1=1
|
||||
<include refid="numberListCondition"></include>
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<sql id="numberListCondition">
|
||||
<if test='searchType1 != null and searchType1 != ""'>
|
||||
AND ess.STTUS_CD = #{searchType1}
|
||||
@@ -158,6 +182,9 @@
|
||||
<if test='searchType3 != null and searchType3 != ""'>
|
||||
AND ess.INCH_DIV_CD = #{searchType3}
|
||||
</if>
|
||||
<if test="searchType5 != null and searchType5 != ''">
|
||||
AND ess.REG_TP_CD = #{searchType5}
|
||||
</if>
|
||||
<if test='searchText1 != null and searchText1 != ""'>
|
||||
<if test='searchType4 != null and searchType4 != ""'>
|
||||
<choose>
|
||||
@@ -176,50 +203,50 @@
|
||||
</sql>
|
||||
|
||||
<select id="selectAdminTotalCnt" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendAdminListReqDto" resultType="int">
|
||||
/* sendNumMgt-mapper.xml(selectAdminTotalCnt) */
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_SVC_USER esu, ${HUBEZ_COMMON}.EZ_CUST_INFO eci
|
||||
WHERE
|
||||
esu.CUST_SEQ = eci.CUST_SEQ
|
||||
AND esu.USER_ID = #{searchText1}
|
||||
/* sendNumMgt-mapper.xml(selectAdminTotalCnt) */
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_SVC_USER esu, ${HUBEZ_COMMON}.EZ_CUST_INFO eci
|
||||
WHERE
|
||||
esu.CUST_SEQ = eci.CUST_SEQ
|
||||
AND esu.USER_ID = #{searchText1}
|
||||
</select>
|
||||
|
||||
<select id="selectAdminList" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.SendAdminListReqDto" resultType="kr.co.uplus.ez.api.sendNumMgt.dto.SendAdminInfo">
|
||||
/* sendNumMgt-mapper.xml(selectAdminList) */
|
||||
SELECT
|
||||
esu.USER_ID AS adminId,
|
||||
eci.BIZRNO AS bRegNo,
|
||||
eci.CUST_NM AS custNm
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_SVC_USER esu, ${HUBEZ_COMMON}.EZ_CUST_INFO eci
|
||||
WHERE
|
||||
esu.CUST_SEQ = eci.CUST_SEQ
|
||||
AND esu.USER_ID = #{searchText1}
|
||||
/* sendNumMgt-mapper.xml(selectAdminList) */
|
||||
SELECT
|
||||
esu.USER_ID AS adminId,
|
||||
eci.BIZRNO AS bRegNo,
|
||||
eci.CUST_NM AS custNm
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_SVC_USER esu, ${HUBEZ_COMMON}.EZ_CUST_INFO eci
|
||||
WHERE
|
||||
esu.CUST_SEQ = eci.CUST_SEQ
|
||||
AND esu.USER_ID = #{searchText1}
|
||||
</select>
|
||||
|
||||
<select id="selectUserSeqByAdminId" parameterType="String" resultType="String">
|
||||
/* sendNumMgt-mapper.xml(selectUserSeqByAdminId) */
|
||||
SELECT
|
||||
USER_SEQ
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
WHERE
|
||||
USER_ID = #{adminId}
|
||||
/* sendNumMgt-mapper.xml(selectUserSeqByAdminId) */
|
||||
SELECT
|
||||
USER_SEQ
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
WHERE
|
||||
USER_ID = #{adminId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteNumber" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.DeleteNumberReqDto">
|
||||
/* sendNumMgt-mapper.xml(deleteNumber) */
|
||||
DELETE FROM ess
|
||||
USING ${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 esr.USER_SEQ = esu.USER_SEQ
|
||||
WHERE
|
||||
esu.USER_ID = #{adminId}
|
||||
AND ess.SNDRNO = #{regNo}
|
||||
/* sendNumMgt-mapper.xml(deleteNumber) */
|
||||
DELETE FROM ess
|
||||
USING ${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 esr.USER_SEQ = esu.USER_SEQ
|
||||
WHERE
|
||||
esu.USER_ID = #{adminId}
|
||||
AND ess.SNDRNO = #{regNo}
|
||||
</delete>
|
||||
|
||||
<insert id="insertNumber" parameterType="kr.co.uplus.ez.api.sendNumMgt.dto.InsertNumberReqDto">
|
||||
|
||||
Reference in New Issue
Block a user