mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 02:32:20 +09:00
로그인 및 메인 화면 수정 변경
This commit is contained in:
@@ -5,28 +5,21 @@
|
||||
*/
|
||||
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.CalcListExcelReqDto;
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcListExcelResDto;
|
||||
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;
|
||||
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;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "api/v1/bo/calculate")
|
||||
@@ -41,9 +34,8 @@ public class CalculateController {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 정산 이력 목록 조회
|
||||
* @param paramMap
|
||||
* @param calcListReqDto
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "calcList", notes = "정산 이력 목록 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@@ -60,13 +52,15 @@ public class CalculateController {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 정산 이력 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @param calcListExcelReqDto
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/calcListExcel" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage calcListExcel(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return calculateService.calcListExcel(paramMap);
|
||||
public CalcListExcelResDto calcListExcel(@RequestBody @Valid CalcListExcelReqDto calcListExcelReqDto, BindingResult bindingResult){
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new CalcListExcelResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return calculateService.calcListExcel(calcListExcelReqDto);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package kr.co.uplus.ez.api.calculate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcList;
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcListExcelReqDto;
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcListReqDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcList;
|
||||
import kr.co.uplus.ez.api.calculate.dto.CalcListReqDto;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CalculateMapper {
|
||||
@@ -14,4 +14,6 @@ public interface CalculateMapper {
|
||||
|
||||
int selectCalculateListTotalCnt(CalcListReqDto calcListReqDto);
|
||||
|
||||
List<CalcList> selectCalculateExcelList(CalcListExcelReqDto calcListExcelReqDto);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,24 +1,15 @@
|
||||
package kr.co.uplus.ez.api.calculate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import kr.co.uplus.ez.api.calculate.dto.*;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
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 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;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CalculateService {
|
||||
@@ -35,7 +26,7 @@ public class CalculateService {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 정산 이력 목록 조회
|
||||
* @param paramMap
|
||||
* @param calcListReqDto
|
||||
* @return
|
||||
*/
|
||||
public CalcListResDto calcList(CalcListReqDto calcListReqDto) {
|
||||
@@ -77,40 +68,15 @@ public class CalculateService {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 정산 이력 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @param calcListExcelReqDto
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage calcListExcel(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);
|
||||
}
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
return result;
|
||||
public CalcListExcelResDto calcListExcel(CalcListExcelReqDto calcListExcelReqDto) {
|
||||
CalculateMapper calcMapper = sqlSessionSlave.getMapper(CalculateMapper.class);
|
||||
CalcListExcelRes calcListExcelRes = new CalcListExcelRes();
|
||||
List<CalcList> calcLists = calcMapper.selectCalculateExcelList(calcListExcelReqDto);
|
||||
calcListExcelRes.setList(calcLists);
|
||||
return new CalcListExcelResDto(ApiResponseCode.SUCCESS, calcListExcelRes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package kr.co.uplus.ez.api.calculate.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class CalcListExcelReqDto implements Serializable {
|
||||
|
||||
@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,14 @@
|
||||
package kr.co.uplus.ez.api.calculate.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class CalcListExcelRes implements Serializable{
|
||||
|
||||
private List<CalcList> list;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.calculate.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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 CalcListExcelResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private CalcListExcelRes data;
|
||||
|
||||
public CalcListExcelResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public CalcListExcelResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public CalcListExcelResDto(ApiResponseCode returnStr, CalcListExcelRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,33 +5,20 @@
|
||||
*/
|
||||
package kr.co.uplus.ez.api.stats;
|
||||
|
||||
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.stats.dto.BsnmDayListReqDto;
|
||||
import kr.co.uplus.ez.api.stats.dto.BsnmDayListResDto;
|
||||
import kr.co.uplus.ez.api.stats.dto.BsnmMonthListReqDto;
|
||||
import kr.co.uplus.ez.api.stats.dto.BsnmMonthListResDto;
|
||||
import kr.co.uplus.ez.api.stats.dto.DayListReqDto;
|
||||
import kr.co.uplus.ez.api.stats.dto.DayListResDto;
|
||||
import kr.co.uplus.ez.api.stats.dto.MonthListReqDto;
|
||||
import kr.co.uplus.ez.api.stats.dto.MonthListResDto;
|
||||
import kr.co.uplus.ez.api.stats.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/stats")
|
||||
@@ -129,14 +116,18 @@ public class StatsController {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 사업자 월별 통계 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @param bsnmMonthListExcelReqDto
|
||||
* @
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiOperation(value = "bsnmMonthListExcel", notes = "사업자 월별 통계 목록 엑셀 다운로드")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "/bsnmMonthListExcel" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage bsnmMonthListExcel(@RequestBody Map<String, Object> paramMap) {
|
||||
return statsService.bsnmMonthListExcel(paramMap);
|
||||
public BsnmMonthListExcelResDto bsnmMonthListExcel(@RequestBody @Valid BsnmMonthListExcelReqDto bsnmMonthListExcelReqDto, BindingResult bindingResult) {
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new BsnmMonthListExcelResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return statsService.bsnmMonthListExcel(bsnmMonthListExcelReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,14 +152,18 @@ public class StatsController {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 사업자 일별 통계 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @param bsnmDayListExcelReqDto
|
||||
* @
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiOperation(value = "bsnmDayListExcel", notes = "사업자 일별 통계 목록 엑셀 다운로드")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "/bsnmDayListExcel" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ApiResponseMessage bsnmDayListExcel(@RequestBody Map<String, Object> paramMap) {
|
||||
return statsService.bsnmDayListExcel(paramMap);
|
||||
public BsnmDayListExcelResDto bsnmDayListExcel(@RequestBody BsnmDayListExcelReqDto bsnmDayListExcelReqDto, BindingResult bindingResult) {
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new BsnmDayListExcelResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return statsService.bsnmDayListExcel(bsnmDayListExcelReqDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,4 +19,10 @@ public interface StatsMapper {
|
||||
int selectCustMstatListTotalCnt(BsnmMonthListReqDto bsnmMonthListReqDto);
|
||||
/** 일별통계 카운트 조회 */
|
||||
int selectCustDstatListTotalCnt(BsnmDayListReqDto bsnmDayListReqDto);
|
||||
|
||||
/** 월별톨계 Excel 목록 조회 */
|
||||
List<BsnmMonthList> selectCustMstatExcelList(BsnmMonthListExcelReqDto bsnmMonthListExcelReqDto);
|
||||
/** 일별통계 Excel 목록 조회 */
|
||||
List<BsnmDayList> selectCustDstatExcelList(BsnmDayListExcelReqDto bsnmDayListExcelReqDto);
|
||||
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ public class StatsService {
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public ApiResponseMessage monthListExcel(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
@@ -104,6 +105,7 @@ public class StatsService {
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public ApiResponseMessage dayListExcel(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
@@ -181,37 +183,18 @@ public class StatsService {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 사업자 월별 통계 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @param bsnmMonthListExcelReqDto
|
||||
* @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<>();
|
||||
public BsnmMonthListExcelResDto bsnmMonthListExcel(BsnmMonthListExcelReqDto bsnmMonthListExcelReqDto) {
|
||||
StatsMapper statsMapper = sqlSessionSlave.getMapper(StatsMapper.class);
|
||||
|
||||
for(int i=1; i<=4; i++) {
|
||||
data = new HashMap<>();
|
||||
data.put("date", "2022-0"+i);
|
||||
data.put("custNm", "유플러스");
|
||||
data.put("bRegNo", "사업자번호");
|
||||
data.put("allSendCnt", "40000000");
|
||||
data.put("allSuccesCnt", "40000000(100%)");
|
||||
data.put("smsSendCnt", "10000000");
|
||||
data.put("smsSuccesCnt", "10000000(100%)");
|
||||
data.put("lmsSendCnt", "10000000");
|
||||
data.put("lmsSuccesCnt", "10000000(100%)");
|
||||
data.put("mmsSendCnt", "10000000");
|
||||
data.put("mmsSuccesCnt", "10000000(100%)");
|
||||
data.put("notiTalkSendCnt", "10000000");
|
||||
data.put("notiTalkSuccesCnt", "10000000(100%)");
|
||||
List<BsnmMonthList> bsnmMonthLists = statsMapper.selectCustMstatExcelList(bsnmMonthListExcelReqDto);
|
||||
|
||||
dataList.add(data);
|
||||
}
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
BsnmMonthListExcelRes bsnmMonthListExcelRes = new BsnmMonthListExcelRes();
|
||||
bsnmMonthListExcelRes.setList(bsnmMonthLists);
|
||||
|
||||
return result;
|
||||
return new BsnmMonthListExcelResDto(ApiResponseCode.SUCCESS, bsnmMonthListExcelRes);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -262,37 +245,20 @@ public class StatsService {
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 사업자 일별 통계 목록 엑셀 다운로드
|
||||
* @param paramMap
|
||||
* @param bsnmDayListExcelReqDto
|
||||
* @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<>();
|
||||
public BsnmDayListExcelResDto bsnmDayListExcel(BsnmDayListExcelReqDto bsnmDayListExcelReqDto) {
|
||||
|
||||
for(int i=1; i<=9; i++) {
|
||||
data = new HashMap<>();
|
||||
data.put("date", "2022-03-0"+i);
|
||||
data.put("custNm", "유플러스");
|
||||
data.put("bRegNo", "사업자번호");
|
||||
data.put("allSendCnt", "40000000");
|
||||
data.put("allSuccesCnt", "40000000(100%)");
|
||||
data.put("smsSendCnt", "10000000");
|
||||
data.put("smsSuccesCnt", "10000000(100%)");
|
||||
data.put("lmsSendCnt", "10000000");
|
||||
data.put("lmsSuccesCnt", "10000000(100%)");
|
||||
data.put("mmsSendCnt", "10000000");
|
||||
data.put("mmsSuccesCnt", "10000000(100%)");
|
||||
data.put("notiTalkSendCnt", "10000000");
|
||||
data.put("notiTalkSuccesCnt", "10000000(100%)");
|
||||
StatsMapper statsMapper = sqlSessionSlave.getMapper(StatsMapper.class);
|
||||
|
||||
dataList.add(data);
|
||||
}
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
List<BsnmDayList> bsnmDayLists = statsMapper.selectCustDstatExcelList(bsnmDayListExcelReqDto);
|
||||
|
||||
return result;
|
||||
BsnmDayListExcelRes bsnmDayListExcelRes = new BsnmDayListExcelRes();
|
||||
bsnmDayListExcelRes.setList(bsnmDayLists);
|
||||
|
||||
|
||||
return new BsnmDayListExcelResDto(ApiResponseCode.SUCCESS, bsnmDayListExcelRes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package kr.co.uplus.ez.api.stats.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class BsnmDayListExcelReqDto implements Serializable {
|
||||
|
||||
@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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package kr.co.uplus.ez.api.stats.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class BsnmDayListExcelRes implements Serializable{
|
||||
|
||||
private List<BsnmDayList> list;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.stats.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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 BsnmDayListExcelResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private BsnmDayListExcelRes data;
|
||||
|
||||
public BsnmDayListExcelResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public BsnmDayListExcelResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public BsnmDayListExcelResDto(ApiResponseCode returnStr, BsnmDayListExcelRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package kr.co.uplus.ez.api.stats.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class BsnmMonthListExcelReqDto 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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package kr.co.uplus.ez.api.stats.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class BsnmMonthListExcelRes implements Serializable{
|
||||
|
||||
private List<BsnmMonthList> list;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.stats.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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 BsnmMonthListExcelResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private BsnmMonthListExcelRes data;
|
||||
|
||||
public BsnmMonthListExcelResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public BsnmMonthListExcelResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public BsnmMonthListExcelResDto(ApiResponseCode returnStr, BsnmMonthListExcelRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -85,11 +85,11 @@ public class SysMgtService {
|
||||
SearchMadangId MadangId = new SearchMadangId();
|
||||
try {
|
||||
MadangId = sysMgtMapper.selectSearchMadangId(searchMadangIdReqDto);
|
||||
|
||||
|
||||
if(MadangId == null) {
|
||||
return new SearchMadangIdResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
return new SearchMadangIdResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
@@ -178,13 +178,13 @@ public class SysMgtService {
|
||||
* @return
|
||||
*/
|
||||
public AdminDetailResDto adminDetail(AdminDetailReqDto adminDetailReqDto) {
|
||||
|
||||
|
||||
SysMgtMapper sysMgtMapper = sqlSessionSlave.getMapper(SysMgtMapper.class);
|
||||
|
||||
AdminDetail adminDetail = new AdminDetail();
|
||||
try {
|
||||
adminDetail = sysMgtMapper.selectAdminDetail(adminDetailReqDto);
|
||||
|
||||
|
||||
if(adminDetail == null) {
|
||||
return new AdminDetailResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
@@ -205,16 +205,16 @@ public class SysMgtService {
|
||||
public AuthListResDto authList(Map<String, Object> paramMap) {
|
||||
List<AuthInfo> rsAuthInfoList = new ArrayList<AuthInfo>();
|
||||
AuthListRes result = new AuthListRes();
|
||||
|
||||
|
||||
SysMgtMapper sysMgtMapper = sqlSessionSlave.getMapper(SysMgtMapper.class);
|
||||
|
||||
|
||||
try {
|
||||
rsAuthInfoList = sysMgtMapper.selectAuthList();
|
||||
if(rsAuthInfoList.size() < 1) {
|
||||
return new AuthListResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
result.setList(rsAuthInfoList);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
return new AuthListResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
@@ -230,27 +230,27 @@ public class SysMgtService {
|
||||
* @return
|
||||
*/
|
||||
public DeleteAuthResDto deleteAuth(DeleteAuthReqDto deleteAuthReqDto) {
|
||||
|
||||
|
||||
SysMgtMapper sysMgtMapper = sqlSessionMaster.getMapper(SysMgtMapper.class);
|
||||
Map<String, Object> authParamMap = new HashMap<String, Object>();
|
||||
|
||||
|
||||
authParamMap.put("authCd", deleteAuthReqDto.getAuthCd());
|
||||
|
||||
|
||||
try {
|
||||
// 1.권한메뉴 삭제
|
||||
sysMgtMapper.deleteAuthMenu(authParamMap);
|
||||
|
||||
|
||||
// 2.권한 삭제
|
||||
int result = sysMgtMapper.deleteAuth(authParamMap);
|
||||
|
||||
|
||||
if(result < 1) {
|
||||
return new DeleteAuthResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
return new DeleteAuthResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
|
||||
DeleteAuthResDto result = new DeleteAuthResDto(ApiResponseCode.SUCCESS);
|
||||
return result;
|
||||
}
|
||||
@@ -263,33 +263,33 @@ public class SysMgtService {
|
||||
* @return
|
||||
*/
|
||||
public AuthDetailResDto authDetail(AuthDetailReqDto authDetailReqDto) {
|
||||
|
||||
|
||||
SysMgtMapper sysMgtMapper = sqlSessionSlave.getMapper(SysMgtMapper.class);
|
||||
|
||||
|
||||
AuthDetail authDetail = new AuthDetail();
|
||||
List<AuthMenu> authMenuList = new ArrayList<AuthMenu>();
|
||||
|
||||
|
||||
try {
|
||||
authDetail = sysMgtMapper.selectAuthDetail(authDetailReqDto);
|
||||
|
||||
authDetail = sysMgtMapper.selectAuthDetail(authDetailReqDto);
|
||||
|
||||
if(authDetail == null) {
|
||||
return new AuthDetailResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
authMenuList = sysMgtMapper.selectAuthMemuList(authDetailReqDto);
|
||||
|
||||
|
||||
if(authMenuList.size() < 1) {
|
||||
return new AuthDetailResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
authDetail.setList(authMenuList);
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
return new AuthDetailResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
|
||||
return new AuthDetailResDto(ApiResponseCode.SUCCESS, authDetail);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -300,23 +300,23 @@ public class SysMgtService {
|
||||
* @return
|
||||
*/
|
||||
public InsertAuthResDto insertAuth(InsertAuthReqDto insertAuthReqDto, String regId) {
|
||||
|
||||
|
||||
SysMgtMapper sysMgtMapper = sqlSessionMaster.getMapper(SysMgtMapper.class);
|
||||
|
||||
|
||||
AuthDetailReqDto authDetailReqDto = new AuthDetailReqDto();
|
||||
AuthDetail authDetail = new AuthDetail();
|
||||
Map<String, Object> authParamMap = new HashMap<String, Object>();
|
||||
Map<String, Object> authMenuParamMap = new HashMap<String, Object>();
|
||||
List<AuthMenu> reqAuthMenuList = new ArrayList<AuthMenu>();
|
||||
|
||||
|
||||
authDetailReqDto.setAuthCd(insertAuthReqDto.getAuthCd());
|
||||
|
||||
|
||||
// 권한코드 조회(권한코드 중복체크)
|
||||
authDetail = sysMgtMapper.selectAuthDetail(authDetailReqDto);
|
||||
if(authDetail != null) {
|
||||
return new InsertAuthResDto(ApiResponseCode.CE_SYSMGT_AUTHCODE_INVALID);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
// 권한 등록
|
||||
authParamMap.put("authCd", insertAuthReqDto.getAuthCd());
|
||||
@@ -325,19 +325,19 @@ public class SysMgtService {
|
||||
authParamMap.put("stat", insertAuthReqDto.getStat());
|
||||
authParamMap.put("regId", regId);
|
||||
sysMgtMapper.insertAuth(authParamMap);
|
||||
|
||||
// 권한메뉴 등록
|
||||
|
||||
// 권한메뉴 등록
|
||||
reqAuthMenuList = insertAuthReqDto.getList();
|
||||
|
||||
|
||||
for(int i =0; i<reqAuthMenuList.size(); i++) {
|
||||
authMenuParamMap = new HashMap<String, Object>();
|
||||
authMenuParamMap.put("authCd", authParamMap.get("authCd"));
|
||||
authMenuParamMap.put("regId", regId);
|
||||
authMenuParamMap.put("menuNo", reqAuthMenuList.get(i).getMenuNo());
|
||||
|
||||
sysMgtMapper.insertAuthMenu(authMenuParamMap);
|
||||
}
|
||||
|
||||
|
||||
sysMgtMapper.insertAuthMenu(authMenuParamMap);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
return new InsertAuthResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
@@ -356,7 +356,7 @@ public class SysMgtService {
|
||||
Map<String, Object> authParamMap = new HashMap<String, Object>();
|
||||
Map<String, Object> authMenuParamMap = new HashMap<String, Object>();
|
||||
List<AuthMenu> reqAuthMenuList = new ArrayList<AuthMenu>();
|
||||
|
||||
|
||||
try {
|
||||
// 권한 데이터 수정
|
||||
authParamMap.put("authCd", updateAuthReqDto.getAuthCd());
|
||||
@@ -364,29 +364,29 @@ public class SysMgtService {
|
||||
authParamMap.put("authDesc", updateAuthReqDto.getAuthDesc());
|
||||
authParamMap.put("stat", updateAuthReqDto.getStat());
|
||||
authParamMap.put("regId", regId);
|
||||
|
||||
|
||||
sysMgtMapper.updateAuth(authParamMap);
|
||||
|
||||
|
||||
// 권한메뉴 수정 (기존 권한메뉴 등록데이터 삭제 후 등록)
|
||||
// 1. 기존 권한메뉴 데이터 삭제
|
||||
sysMgtMapper.deleteAuthMenu(authParamMap);
|
||||
|
||||
|
||||
// 2. 권한메뉴 데이터 등록
|
||||
reqAuthMenuList = updateAuthReqDto.getList();
|
||||
|
||||
|
||||
for(int i =0; i<reqAuthMenuList.size(); i++) {
|
||||
authMenuParamMap = new HashMap<String, Object>();
|
||||
authMenuParamMap.put("authCd", authParamMap.get("authCd"));
|
||||
authMenuParamMap.put("regId", regId);
|
||||
authMenuParamMap.put("menuNo", reqAuthMenuList.get(i).getMenuNo());
|
||||
|
||||
sysMgtMapper.insertAuthMenu(authMenuParamMap);
|
||||
}
|
||||
|
||||
|
||||
sysMgtMapper.insertAuthMenu(authMenuParamMap);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
return new UpdateAuthResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
|
||||
return new UpdateAuthResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,103 +1,103 @@
|
||||
package kr.co.uplus.ez.common.security;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
/**
|
||||
* key가 16byte(128bit)면 AES128로 동작한다.
|
||||
* key가 32byte(256bit)면 AES256으로 동작한다.
|
||||
*/
|
||||
public class Aes256 {
|
||||
|
||||
private static final String ALGORITHM = "AES";
|
||||
private static final String TRANSFORMATION = "AES/CBC/PKCS5Padding"; // algorithm/mode/padding
|
||||
// private static final String TRANSFORMATION = "AES/ECB/PKCS5Padding"; // "AES"와 같다. ECB mode cannot use IV
|
||||
|
||||
public static byte[] encrypt(byte[] plainText, byte[] key) {
|
||||
byte[] iv = new byte[16];
|
||||
return encrypt(plainText, key, iv);
|
||||
}
|
||||
|
||||
public static byte[] encrypt(byte[] plainText, byte[] key, byte[] iv) {
|
||||
try {
|
||||
Cipher c = Cipher.getInstance(TRANSFORMATION);
|
||||
SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
|
||||
IvParameterSpec ivSpec = new IvParameterSpec(iv);
|
||||
c.init(Cipher.ENCRYPT_MODE, k, ivSpec);
|
||||
return c.doFinal(plainText);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static String encryptBase64(String plainText, byte[] key) {
|
||||
byte[] iv = new byte[16];
|
||||
return encryptBase64(plainText, key, iv);
|
||||
}
|
||||
|
||||
public static String encryptBase64(String plainText, byte[] key, byte[] iv) {
|
||||
byte[] enc = encrypt(plainText.getBytes(), key, iv);
|
||||
return new String(Base64.encodeBase64(enc));
|
||||
}
|
||||
|
||||
|
||||
public static byte[] decrypt(byte[] cipherText, byte[] key) {
|
||||
byte[] iv = new byte[16];
|
||||
return decrypt(cipherText, key, iv);
|
||||
}
|
||||
|
||||
public static byte[] decrypt(byte[] cipherText, byte[] key, byte[] iv) {
|
||||
try {
|
||||
Cipher c = Cipher.getInstance(TRANSFORMATION);
|
||||
SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
|
||||
IvParameterSpec ivSpec = new IvParameterSpec(iv);
|
||||
c.init(Cipher.DECRYPT_MODE, k, ivSpec);
|
||||
return c.doFinal(cipherText);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static String decryptBase64(String b64CipherText, byte[] key) {
|
||||
byte[] iv = new byte[16];
|
||||
return decryptBase64(b64CipherText, key, iv);
|
||||
}
|
||||
|
||||
public static String decryptBase64(String b64CipherText, byte[] key, byte[] iv) {
|
||||
byte[] enc = Base64.decodeBase64(b64CipherText.getBytes());
|
||||
return new String(decrypt(enc, key, iv));
|
||||
}
|
||||
|
||||
|
||||
public static String encryptNoIvBase64(String plainText, byte[] key) {
|
||||
try {
|
||||
Cipher c = Cipher.getInstance(ALGORITHM);
|
||||
SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
|
||||
c.init(Cipher.ENCRYPT_MODE, k); // ECB mode cannot use IV
|
||||
byte[] enc = c.doFinal(plainText.getBytes());
|
||||
return new String(Base64.encodeBase64(enc));
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static String decryptNoIvBase64(String b64CipherText, byte[] key) {
|
||||
try {
|
||||
Cipher c = Cipher.getInstance(ALGORITHM);
|
||||
SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
|
||||
c.init(Cipher.DECRYPT_MODE, k); // ECB mode cannot use IV
|
||||
byte[] enc = Base64.decodeBase64(b64CipherText.getBytes());
|
||||
return new String(c.doFinal(enc));
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//package kr.co.uplus.ez.common.security;
|
||||
//
|
||||
//import javax.crypto.Cipher;
|
||||
//import javax.crypto.spec.IvParameterSpec;
|
||||
//import javax.crypto.spec.SecretKeySpec;
|
||||
//
|
||||
//import org.apache.commons.codec.binary.Base64;
|
||||
//
|
||||
///**
|
||||
// * key가 16byte(128bit)면 AES128로 동작한다.
|
||||
// * key가 32byte(256bit)면 AES256으로 동작한다.
|
||||
// */
|
||||
//public class Aes256 {
|
||||
//
|
||||
// private static final String ALGORITHM = "AES";
|
||||
// private static final String TRANSFORMATION = "AES/CBC/PKCS5Padding"; // algorithm/mode/padding
|
||||
//// private static final String TRANSFORMATION = "AES/ECB/PKCS5Padding"; // "AES"와 같다. ECB mode cannot use IV
|
||||
//
|
||||
// public static byte[] encrypt(byte[] plainText, byte[] key) {
|
||||
// byte[] iv = new byte[16];
|
||||
// return encrypt(plainText, key, iv);
|
||||
// }
|
||||
//
|
||||
// public static byte[] encrypt(byte[] plainText, byte[] key, byte[] iv) {
|
||||
// try {
|
||||
// Cipher c = Cipher.getInstance(TRANSFORMATION);
|
||||
// SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
|
||||
// IvParameterSpec ivSpec = new IvParameterSpec(iv);
|
||||
// c.init(Cipher.ENCRYPT_MODE, k, ivSpec);
|
||||
// return c.doFinal(plainText);
|
||||
// }
|
||||
// catch (Exception e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public static String encryptBase64(String plainText, byte[] key) {
|
||||
// byte[] iv = new byte[16];
|
||||
// return encryptBase64(plainText, key, iv);
|
||||
// }
|
||||
//
|
||||
// public static String encryptBase64(String plainText, byte[] key, byte[] iv) {
|
||||
// byte[] enc = encrypt(plainText.getBytes(), key, iv);
|
||||
// return new String(Base64.encodeBase64(enc));
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public static byte[] decrypt(byte[] cipherText, byte[] key) {
|
||||
// byte[] iv = new byte[16];
|
||||
// return decrypt(cipherText, key, iv);
|
||||
// }
|
||||
//
|
||||
// public static byte[] decrypt(byte[] cipherText, byte[] key, byte[] iv) {
|
||||
// try {
|
||||
// Cipher c = Cipher.getInstance(TRANSFORMATION);
|
||||
// SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
|
||||
// IvParameterSpec ivSpec = new IvParameterSpec(iv);
|
||||
// c.init(Cipher.DECRYPT_MODE, k, ivSpec);
|
||||
// return c.doFinal(cipherText);
|
||||
// }
|
||||
// catch (Exception e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public static String decryptBase64(String b64CipherText, byte[] key) {
|
||||
// byte[] iv = new byte[16];
|
||||
// return decryptBase64(b64CipherText, key, iv);
|
||||
// }
|
||||
//
|
||||
// public static String decryptBase64(String b64CipherText, byte[] key, byte[] iv) {
|
||||
// byte[] enc = Base64.decodeBase64(b64CipherText.getBytes());
|
||||
// return new String(decrypt(enc, key, iv));
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public static String encryptNoIvBase64(String plainText, byte[] key) {
|
||||
// try {
|
||||
// Cipher c = Cipher.getInstance(ALGORITHM);
|
||||
// SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
|
||||
// c.init(Cipher.ENCRYPT_MODE, k); // ECB mode cannot use IV
|
||||
// byte[] enc = c.doFinal(plainText.getBytes());
|
||||
// return new String(Base64.encodeBase64(enc));
|
||||
// }
|
||||
// catch (Exception e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public static String decryptNoIvBase64(String b64CipherText, byte[] key) {
|
||||
// try {
|
||||
// Cipher c = Cipher.getInstance(ALGORITHM);
|
||||
// SecretKeySpec k = new SecretKeySpec(key, ALGORITHM);
|
||||
// c.init(Cipher.DECRYPT_MODE, k); // ECB mode cannot use IV
|
||||
// byte[] enc = Base64.decodeBase64(b64CipherText.getBytes());
|
||||
// return new String(c.doFinal(enc));
|
||||
// }
|
||||
// catch (Exception e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
@@ -1,24 +1,17 @@
|
||||
package kr.co.uplus.ez.common.utils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.DecoderException;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.io.File;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigInteger;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import org.apache.commons.codec.DecoderException;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class EncryptionUtil {
|
||||
@@ -221,117 +214,117 @@ public class EncryptionUtil {
|
||||
return isHashCompare;
|
||||
}
|
||||
|
||||
public byte[] aesEncryptEcb(String sKey, String sText) {
|
||||
byte[] key = null;
|
||||
byte[] text = null;
|
||||
byte[] encrypted = null;
|
||||
final int AES_KEY_SIZE_128 = 128;
|
||||
// public byte[] aesEncryptEcb(String sKey, String sText) {
|
||||
// byte[] key = null;
|
||||
// byte[] text = null;
|
||||
// byte[] encrypted = null;
|
||||
// final int AES_KEY_SIZE_128 = 128;
|
||||
//
|
||||
// try {
|
||||
// // UTF-8
|
||||
// key = sKey.getBytes("UTF-8");
|
||||
//
|
||||
// // Key size (128bit, 16byte)
|
||||
// key = Arrays.copyOf(key, AES_KEY_SIZE_128 / 8);
|
||||
//
|
||||
// // UTF-8
|
||||
// text = sText.getBytes("UTF-8");
|
||||
//
|
||||
// // AES/EBC/PKCS5Padding
|
||||
// Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||
// cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "AES"));
|
||||
// encrypted = cipher.doFinal(text);
|
||||
// } catch (Exception e) {
|
||||
// encrypted = null;
|
||||
// log.error("aesEncryptEcb exception. : {}", e.getMessage());
|
||||
// }
|
||||
|
||||
try {
|
||||
// UTF-8
|
||||
key = sKey.getBytes("UTF-8");
|
||||
|
||||
// Key size (128bit, 16byte)
|
||||
key = Arrays.copyOf(key, AES_KEY_SIZE_128 / 8);
|
||||
|
||||
// UTF-8
|
||||
text = sText.getBytes("UTF-8");
|
||||
|
||||
// AES/EBC/PKCS5Padding
|
||||
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||
cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "AES"));
|
||||
encrypted = cipher.doFinal(text);
|
||||
} catch (Exception e) {
|
||||
encrypted = null;
|
||||
log.error("aesEncryptEcb exception. : {}", e.getMessage());
|
||||
}
|
||||
|
||||
return encrypted;
|
||||
}
|
||||
// return encrypted;
|
||||
// }
|
||||
|
||||
/*
|
||||
* AES128 Decrypt
|
||||
*/
|
||||
public byte[] aesDecryptEcb(String sKey, byte[] encrypted) throws UnsupportedEncodingException {
|
||||
byte[] key = null;
|
||||
byte[] decrypted = null;
|
||||
final int AES_KEY_SIZE_128 = 128;
|
||||
|
||||
try {
|
||||
// UTF-8
|
||||
key = sKey.getBytes("UTF-8");
|
||||
|
||||
// Key size 128 (128bit, 16byte)
|
||||
key = Arrays.copyOf(key, AES_KEY_SIZE_128 / 8);
|
||||
|
||||
// AES/EBC/PKCS5Padding
|
||||
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "AES"));
|
||||
decrypted = cipher.doFinal(encrypted);
|
||||
} catch (Exception e) {
|
||||
decrypted = null;
|
||||
log.error("aesDecryptEcb exception. : {}", e.getMessage());
|
||||
}
|
||||
return decrypted;
|
||||
}
|
||||
// public byte[] aesDecryptEcb(String sKey, byte[] encrypted) throws UnsupportedEncodingException {
|
||||
// byte[] key = null;
|
||||
// byte[] decrypted = null;
|
||||
// final int AES_KEY_SIZE_128 = 128;
|
||||
//
|
||||
// try {
|
||||
// // UTF-8
|
||||
// key = sKey.getBytes("UTF-8");
|
||||
//
|
||||
// // Key size 128 (128bit, 16byte)
|
||||
// key = Arrays.copyOf(key, AES_KEY_SIZE_128 / 8);
|
||||
//
|
||||
// // AES/EBC/PKCS5Padding
|
||||
// Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||
// cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "AES"));
|
||||
// decrypted = cipher.doFinal(encrypted);
|
||||
// } catch (Exception e) {
|
||||
// decrypted = null;
|
||||
// log.error("aesDecryptEcb exception. : {}", e.getMessage());
|
||||
// }
|
||||
// return decrypted;
|
||||
// }
|
||||
|
||||
/*
|
||||
* AES256 Encrypt
|
||||
*/
|
||||
public byte[] aes256EncryptEcb(String sKey, String sText) {
|
||||
byte[] key = null;
|
||||
byte[] text = null;
|
||||
byte[] encrypted = null;
|
||||
final int AES_KEY_SIZE_256 = 256;
|
||||
|
||||
try {
|
||||
// UTF-8
|
||||
key = sKey.getBytes("UTF-8");
|
||||
|
||||
// Key size (256bit, 16byte)
|
||||
key = Arrays.copyOf(key, AES_KEY_SIZE_256 / 8);
|
||||
|
||||
// UTF-8
|
||||
text = sText.getBytes("UTF-8");
|
||||
|
||||
// AES/EBC/PKCS5Padding
|
||||
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||
cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "AES"));
|
||||
encrypted = cipher.doFinal(text);
|
||||
} catch (Exception e) {
|
||||
encrypted = null;
|
||||
log.error("aes256EncryptEcb exception. : {}", e.getMessage());
|
||||
}
|
||||
|
||||
return encrypted;
|
||||
}
|
||||
// public byte[] aes256EncryptEcb(String sKey, String sText) {
|
||||
// byte[] key = null;
|
||||
// byte[] text = null;
|
||||
// byte[] encrypted = null;
|
||||
// final int AES_KEY_SIZE_256 = 256;
|
||||
//
|
||||
// try {
|
||||
// // UTF-8
|
||||
// key = sKey.getBytes("UTF-8");
|
||||
//
|
||||
// // Key size (256bit, 16byte)
|
||||
// key = Arrays.copyOf(key, AES_KEY_SIZE_256 / 8);
|
||||
//
|
||||
// // UTF-8
|
||||
// text = sText.getBytes("UTF-8");
|
||||
//
|
||||
// // AES/EBC/PKCS5Padding
|
||||
// Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||
// cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, "AES"));
|
||||
// encrypted = cipher.doFinal(text);
|
||||
// } catch (Exception e) {
|
||||
// encrypted = null;
|
||||
// log.error("aes256EncryptEcb exception. : {}", e.getMessage());
|
||||
// }
|
||||
//
|
||||
// return encrypted;
|
||||
// }
|
||||
|
||||
/*
|
||||
* AES256 Decrypt
|
||||
*/
|
||||
public byte[] aes256DecryptEcb(String sKey, byte[] encrypted) throws UnsupportedEncodingException {
|
||||
byte[] key = null;
|
||||
byte[] decrypted = null;
|
||||
final int AES_KEY_SIZE_256 = 256;
|
||||
|
||||
try {
|
||||
// UTF-8
|
||||
key = sKey.getBytes("UTF-8");
|
||||
|
||||
// Key size (256bit, 16byte)
|
||||
key = Arrays.copyOf(key, AES_KEY_SIZE_256 / 8);
|
||||
|
||||
// AES/EBC/PKCS5Padding
|
||||
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "AES"));
|
||||
decrypted = cipher.doFinal(encrypted);
|
||||
} catch (Exception e) {
|
||||
decrypted = null;
|
||||
log.error("aes256DecryptEcb exception. : {}", e.getMessage());
|
||||
}
|
||||
|
||||
return decrypted;
|
||||
}
|
||||
// public byte[] aes256DecryptEcb(String sKey, byte[] encrypted) throws UnsupportedEncodingException {
|
||||
// byte[] key = null;
|
||||
// byte[] decrypted = null;
|
||||
// final int AES_KEY_SIZE_256 = 256;
|
||||
//
|
||||
// try {
|
||||
// // UTF-8
|
||||
// key = sKey.getBytes("UTF-8");
|
||||
//
|
||||
// // Key size (256bit, 16byte)
|
||||
// key = Arrays.copyOf(key, AES_KEY_SIZE_256 / 8);
|
||||
//
|
||||
// // AES/EBC/PKCS5Padding
|
||||
// Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||
// cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "AES"));
|
||||
// decrypted = cipher.doFinal(encrypted);
|
||||
// } catch (Exception e) {
|
||||
// decrypted = null;
|
||||
// log.error("aes256DecryptEcb exception. : {}", e.getMessage());
|
||||
// }
|
||||
//
|
||||
// return decrypted;
|
||||
// }
|
||||
|
||||
public String toHexString(byte[] b) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
|
||||
@@ -1,29 +1,17 @@
|
||||
package kr.co.uplus.ez.common.utils;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class FileIoUtils {
|
||||
/**
|
||||
* @return d:/Downloads/aaa.txt --> aaa.txt
|
||||
@@ -205,7 +193,7 @@ public class FileIoUtils {
|
||||
|
||||
|
||||
/**
|
||||
* @param ext "."를 포함해야 정확한 결과를 얻는다.
|
||||
* @param crext "."를 포함해야 정확한 결과를 얻는다.
|
||||
*/
|
||||
public static boolean isExtension(String fname, String... exts) {
|
||||
if (fname == null) return false;
|
||||
@@ -237,43 +225,43 @@ public class FileIoUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static List<File> unzip(File zip, String saveDir) throws Exception {
|
||||
int bufSize = 1024 * 64;
|
||||
List<File> files = new ArrayList<File>();
|
||||
|
||||
ZipInputStream in = new ZipInputStream(new BufferedInputStream(new FileInputStream(zip), bufSize));
|
||||
ZipEntry entry = null;
|
||||
// public static List<File> unzip(File zip, String saveDir) throws Exception {
|
||||
// int bufSize = 1024 * 64;
|
||||
// List<File> files = new ArrayList<File>();
|
||||
//
|
||||
// ZipInputStream in = new ZipInputStream(new BufferedInputStream(new FileInputStream(zip), bufSize));
|
||||
// ZipEntry entry = null;
|
||||
//
|
||||
// while ((entry = in.getNextEntry()) != null) {
|
||||
// byte[] buffer = new byte[bufSize];
|
||||
//
|
||||
// File outfile = new File(saveDir, entry.getName());
|
||||
// OutputStream out = new BufferedOutputStream(new FileOutputStream(outfile), bufSize);
|
||||
//
|
||||
// int size = 0;
|
||||
// while ((size = in.read(buffer, 0, bufSize)) != -1) {
|
||||
// out.write(buffer, 0, size);
|
||||
// }
|
||||
// out.flush();
|
||||
// IOUtils.closeQuietly(out);
|
||||
// files.add(outfile);
|
||||
// }
|
||||
//
|
||||
// IOUtils.closeQuietly(in);
|
||||
// return files;
|
||||
// }
|
||||
|
||||
while ((entry = in.getNextEntry()) != null) {
|
||||
byte[] buffer = new byte[bufSize];
|
||||
|
||||
File outfile = new File(saveDir, entry.getName());
|
||||
OutputStream out = new BufferedOutputStream(new FileOutputStream(outfile), bufSize);
|
||||
|
||||
int size = 0;
|
||||
while ((size = in.read(buffer, 0, bufSize)) != -1) {
|
||||
out.write(buffer, 0, size);
|
||||
}
|
||||
out.flush();
|
||||
IOUtils.closeQuietly(out);
|
||||
files.add(outfile);
|
||||
}
|
||||
|
||||
IOUtils.closeQuietly(in);
|
||||
return files;
|
||||
}
|
||||
|
||||
public static File ungzip(File gzip, String saveDir) throws Exception {
|
||||
String outName = getBaseName(gzip.getName());
|
||||
File outfile = new File(saveDir, outName);
|
||||
|
||||
InputStream in = new GZIPInputStream(new FileInputStream(gzip));
|
||||
OutputStream out = new FileOutputStream(outfile);
|
||||
IOUtils.copy(in, out);
|
||||
|
||||
IOUtils.closeQuietly(in);
|
||||
IOUtils.closeQuietly(out);
|
||||
return outfile;
|
||||
}
|
||||
// public static File ungzip(File gzip, String saveDir) throws Exception {
|
||||
// String outName = getBaseName(gzip.getName());
|
||||
// File outfile = new File(saveDir, outName);
|
||||
//
|
||||
// InputStream in = new GZIPInputStream(new FileInputStream(gzip));
|
||||
// OutputStream out = new FileOutputStream(outfile);
|
||||
// IOUtils.copy(in, out);
|
||||
//
|
||||
// IOUtils.closeQuietly(in);
|
||||
// IOUtils.closeQuietly(out);
|
||||
// return outfile;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -106,4 +106,75 @@
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCalculateExcelList" 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
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -109,8 +109,7 @@
|
||||
WHERE 1 = 1
|
||||
<include refid="subsListCondition"></include>
|
||||
ORDER BY
|
||||
esi.OPN_DT DESC
|
||||
LIMIT 100) A,
|
||||
esi.OPN_DT DESC) A,
|
||||
( SELECT @ROWNUM := 0 ) AS R
|
||||
</select>
|
||||
<sql id="subsListCondition">
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
<sql id="sndnoBlckCondition">
|
||||
<if test="regId != null and regId != ''">
|
||||
AND esb.BLCK_SNDRNO LIKE UPPER(CONCAT('%', #{regId}, '%'))
|
||||
AND esb.REG_ID LIKE UPPER(CONCAT('%', #{regId}, '%'))
|
||||
</if>
|
||||
<if test="sndblckTpCd != null and sndblckTpCd != ''">
|
||||
AND esb.SNDBLCK_TP_CD = #{sndblckTpCd}
|
||||
@@ -126,7 +126,7 @@
|
||||
</if>
|
||||
WHERE BLCK_SNDRNO = #{blckSndrno}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteSndrnoBlck" parameterType="kr.co.uplus.ez.api.riskMgt.dto.SendNumDeleteIntrcpReqDto">
|
||||
/* riskMgt-mapper.xml(deleteSndrnoBlck) */
|
||||
DELETE
|
||||
@@ -142,6 +142,10 @@
|
||||
SELECT
|
||||
COUNT(*) AS TOTAL_CNT
|
||||
FROM
|
||||
(SELECT
|
||||
esu.CUST_SEQ
|
||||
,er.RCVBLCKNO
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_RCVBLCK_080 er
|
||||
INNER JOIN ${HUBEZ_COMMON}.EZ_SVC_USER esu
|
||||
ON
|
||||
@@ -152,6 +156,7 @@
|
||||
WHERE
|
||||
1 = 1
|
||||
<include refid="selectRcvblck080Condition"/>
|
||||
GROUP BY esu.CUST_SEQ, er.RCVBLCKNO) A
|
||||
</select>
|
||||
|
||||
<select id="selectRcvblck080List" parameterType="kr.co.uplus.ez.api.riskMgt.dto.ZezNumIntrcpListReqDto" resultType="kr.co.uplus.ez.api.riskMgt.dto.ZezNumIntrcpList">
|
||||
@@ -184,6 +189,7 @@
|
||||
ON esu.CUST_SEQ = eci.CUST_SEQ
|
||||
WHERE 1 = 1
|
||||
<include refid="selectRcvblck080Condition"/>
|
||||
GROUP BY esu.CUST_SEQ, er.RCVBLCKNO
|
||||
ORDER BY er.REG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
) A, ( SELECT @ROWNUM := #{page} ) AS R
|
||||
@@ -256,7 +262,7 @@
|
||||
AND UPPER(ebd.WORD) LIKE UPPER(CONCAT('%', #{word}, '%'))
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
<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
|
||||
@@ -269,7 +275,7 @@
|
||||
${HUBEZ_COMMON}.EZ_MSG_BLCKWORD emb
|
||||
WHERE emb.SEQ_NO = #{seqNo}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectBlckwordDtlList" parameterType="kr.co.uplus.ez.api.riskMgt.dto.MsgIntrcpDetailReqDto" resultType="kr.co.uplus.ez.api.riskMgt.dto.MsgBlckwordList">
|
||||
/* riskMgt-mapper.xml(selectBlckwordDtlList) */
|
||||
SELECT
|
||||
@@ -307,7 +313,7 @@
|
||||
, #{regId}
|
||||
, NOW()
|
||||
, #{regId}
|
||||
, NOW())
|
||||
, NOW())
|
||||
</insert>
|
||||
|
||||
<insert id="insertBlckwordDtl" parameterType="java.util.List">
|
||||
@@ -319,9 +325,9 @@
|
||||
, REG_ID
|
||||
, REG_DT
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" index="i"
|
||||
<foreach collection="list" item="item" index="i"
|
||||
separator=",">
|
||||
(#{item.seqNo}, #{item.word}, #{item.regId}, NOW() )
|
||||
(#{item.seqNo}, #{item.word}, #{item.regId}, NOW() )
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
ON
|
||||
eci.CUST_SEQ = ess.CUST_SEQ
|
||||
WHERE 1=1
|
||||
AND esu.USER_SEQ = esu.PRNTS_USER_SEQ
|
||||
<include refid="numberListCondition"></include>
|
||||
</select>
|
||||
|
||||
@@ -161,6 +162,7 @@
|
||||
ON
|
||||
eci.CUST_SEQ = ess.CUST_SEQ
|
||||
WHERE 1=1
|
||||
AND esu.USER_SEQ = esu.PRNTS_USER_SEQ
|
||||
<include refid="numberListCondition"></include>
|
||||
ORDER BY ess.REG_DT DESC
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
|
||||
@@ -501,6 +501,172 @@
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
</select>
|
||||
|
||||
<select id="selectCustMstatExcelList" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmMonthListExcelReqDto" resultType="kr.co.uplus.ez.api.stats.dto.BsnmMonthList">
|
||||
SELECT
|
||||
DATE_FORMAT(ecm.SUM_YM, '%Y-%m') AS sumYm
|
||||
,ecm.CUST_NM AS custNm
|
||||
,ecm.BIZRNO AS bizrno
|
||||
, ecm.SND_CNT AS sndCnt
|
||||
, ecm.SUCC_CNT AS succCnt
|
||||
, ecm.SUCC_RT AS succRt
|
||||
, S.SND_CNT AS sndCntS
|
||||
, S.SUCC_CNT AS succCntS
|
||||
, S.SUCC_RT AS succRtS
|
||||
, L.SND_CNT AS sndCntL
|
||||
, L.SUCC_CNT AS succCntL
|
||||
, L.SUCC_RT AS succRtL
|
||||
, M.SND_CNT AS sndCntM
|
||||
, M.SUCC_CNT AS succCntM
|
||||
, M.SUCC_RT AS succRtM
|
||||
, A.SND_CNT AS sndCntR
|
||||
, A.SUCC_CNT AS succCntR
|
||||
, A.SUCC_RT AS succRtR
|
||||
FROM
|
||||
(SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,CUST_NM
|
||||
,BIZRNO
|
||||
,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
|
||||
,ROUND((SUM(IFNULL(SUCC_CNT,0) + IFNULL(FBACK_SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0) + IFNULL(FBACK_CNT,0)) * 100), 2) AS SUCC_RT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
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
|
||||
,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
|
||||
,ROUND((SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) / SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) * 100), 2) AS SUCC_RT
|
||||
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 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
|
||||
(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 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
|
||||
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
|
||||
,ROUND((SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) / SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) * 100), 2) AS SUCC_RT
|
||||
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 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
|
||||
(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 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
|
||||
ON S1.SUM_YM = S2.SUM_YM
|
||||
AND S1.USER_SEQ = S2.USER_SEQ
|
||||
GROUP BY S1.SUM_YM, S1.USER_SEQ ) 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
|
||||
,ROUND((SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) / SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) * 100), 2) AS SUCC_RT
|
||||
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 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
|
||||
(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 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
|
||||
ON S1.SUM_YM = S2.SUM_YM
|
||||
AND S1.USER_SEQ = S2.USER_SEQ
|
||||
GROUP BY S1.SUM_YM, S1.USER_SEQ ) M,
|
||||
( SELECT
|
||||
SUM_YM
|
||||
,USER_SEQ
|
||||
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
|
||||
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
|
||||
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100),2) AS SUCC_RT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_MSTAT
|
||||
WHERE 1=1
|
||||
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
|
||||
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
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND ecm.CUST_NM LIKE CONCAT('%',#{custNm},'%')
|
||||
</if>
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND ecm.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
|
||||
</if>
|
||||
ORDER BY ecm.SUM_YM DESC, ecm.USER_SEQ DESC
|
||||
</select>
|
||||
|
||||
<select id="selectCustDstatListTotalCnt" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmDayListReqDto" resultType="int">
|
||||
SELECT
|
||||
COUNT(*) AS TOTALCNT
|
||||
@@ -692,4 +858,170 @@
|
||||
ORDER BY ecd.SUM_YMD DESC, ecd.USER_SEQ DESC
|
||||
LIMIT #{page}, #{pagePerRows}
|
||||
</select>
|
||||
|
||||
<select id="selectCustDstatExcelList" parameterType="kr.co.uplus.ez.api.stats.dto.BsnmDayListExcelReqDto" resultType="kr.co.uplus.ez.api.stats.dto.BsnmDayList">
|
||||
SELECT
|
||||
DATE_FORMAT(ecd.SUM_YMD, '%Y-%m-%d') AS SUM_YMD
|
||||
,ecd.CUST_NM
|
||||
,ecd.BIZRNO
|
||||
, ecd.SND_CNT
|
||||
, ecd.SUCC_CNT
|
||||
, ecd.SUCC_RT
|
||||
, S.SND_CNT AS SND_CNT_S
|
||||
, S.SUCC_CNT AS SUCC_CNT_S
|
||||
, S.SUCC_RT AS SUCC_RT_S
|
||||
, L.SND_CNT AS SND_CNT_L
|
||||
, L.SUCC_CNT AS SUCC_CNT_L
|
||||
, L.SUCC_RT AS SUCC_RT_L
|
||||
, M.SND_CNT AS SND_CNT_M
|
||||
, M.SUCC_CNT AS SUCC_CNT_M
|
||||
, M.SUCC_RT AS SUCC_RT_M
|
||||
, A.SND_CNT AS SND_CNT_R
|
||||
, A.SUCC_CNT AS SUCC_CNT_R
|
||||
, A.SUCC_RT AS SUCC_RT_R
|
||||
FROM
|
||||
(SELECT
|
||||
SUM_YMD
|
||||
,USER_SEQ
|
||||
,CUST_NM
|
||||
,BIZRNO
|
||||
,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
|
||||
,ROUND((SUM(IFNULL(SUCC_CNT,0) + IFNULL(FBACK_SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0) + IFNULL(FBACK_CNT,0)) * 100), 2) AS SUCC_RT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_DSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
GROUP BY SUM_YMD, USER_SEQ) ecd,
|
||||
(SELECT
|
||||
S1.SUM_YMD
|
||||
,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
|
||||
,ROUND((SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) / SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) * 100), 2) AS SUCC_RT
|
||||
FROM
|
||||
(SELECT
|
||||
SUM_YMD
|
||||
,USER_SEQ
|
||||
,SUM(SND_CNT) AS SND_CNT
|
||||
,SUM(SUCC_CNT) AS SUCC_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_DSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'SMS'
|
||||
GROUP BY SUM_YMD, USER_SEQ) S1
|
||||
LEFT OUTER JOIN
|
||||
(SELECT
|
||||
SUM_YMD
|
||||
,USER_SEQ
|
||||
,SUM(FBACK_CNT) AS FBACK_CNT
|
||||
,SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_DSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND RPLCSND_CH_CD = 'SMS'
|
||||
GROUP BY SUM_YMD, USER_SEQ) S2
|
||||
ON S1.SUM_YMD = S2.SUM_YMD
|
||||
AND S1.USER_SEQ = S2.USER_SEQ
|
||||
GROUP BY S1.SUM_YMD, S1.USER_SEQ ) S,
|
||||
(SELECT
|
||||
S1.SUM_YMD
|
||||
,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
|
||||
,ROUND((SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) / SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) * 100), 2) AS SUCC_RT
|
||||
FROM
|
||||
(SELECT
|
||||
SUM_YMD
|
||||
,USER_SEQ
|
||||
,SUM(SND_CNT) AS SND_CNT
|
||||
,SUM(SUCC_CNT) AS SUCC_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_DSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'LMS'
|
||||
GROUP BY SUM_YMD, USER_SEQ) S1
|
||||
LEFT OUTER JOIN
|
||||
(SELECT
|
||||
SUM_YMD
|
||||
,USER_SEQ
|
||||
,SUM(FBACK_CNT) AS FBACK_CNT
|
||||
,SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_DSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND RPLCSND_CH_CD = 'LMS'
|
||||
GROUP BY SUM_YMD, USER_SEQ) S2
|
||||
ON S1.SUM_YMD = S2.SUM_YMD
|
||||
AND S1.USER_SEQ = S2.USER_SEQ
|
||||
GROUP BY S1.SUM_YMD, S1.USER_SEQ ) L,
|
||||
( SELECT
|
||||
S1.SUM_YMD
|
||||
,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
|
||||
,ROUND((SUM(IFNULL(S1.SUCC_CNT,0) + IFNULL(S2.FBACK_SUCC_CNT,0)) / SUM(IFNULL(S1.SND_CNT,0) + IFNULL(S2.FBACK_CNT,0)) * 100), 2) AS SUCC_RT
|
||||
FROM
|
||||
(SELECT
|
||||
SUM_YMD
|
||||
,USER_SEQ
|
||||
,SUM(SND_CNT) AS SND_CNT
|
||||
,SUM(SUCC_CNT) AS SUCC_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_DSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'MMS'
|
||||
GROUP BY SUM_YMD, USER_SEQ) S1
|
||||
LEFT OUTER JOIN
|
||||
(SELECT
|
||||
SUM_YMD
|
||||
,USER_SEQ
|
||||
,SUM(FBACK_CNT) AS FBACK_CNT
|
||||
,SUM(FBACK_SUCC_CNT) AS FBACK_SUCC_CNT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_DSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
AND RPLCSND_CH_CD = 'MMS'
|
||||
GROUP BY SUM_YMD, USER_SEQ) S2
|
||||
ON S1.SUM_YMD = S2.SUM_YMD
|
||||
AND S1.USER_SEQ = S2.USER_SEQ
|
||||
GROUP BY S1.SUM_YMD, S1.USER_SEQ ) M,
|
||||
( SELECT
|
||||
SUM_YMD
|
||||
,USER_SEQ
|
||||
,SUM(IFNULL(SND_CNT,0)) AS SND_CNT
|
||||
,SUM(IFNULL(SUCC_CNT,0)) AS SUCC_CNT
|
||||
,ROUND((SUM(IFNULL(SUCC_CNT,0)) / SUM(IFNULL(SND_CNT,0)) * 100),2) AS SUCC_RT
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_CUST_DSTAT
|
||||
WHERE 1=1
|
||||
AND SUM_YMD BETWEEN DATE_FORMAT(#{startDay},'%Y%m%d') AND DATE_FORMAT(#{endDay},'%Y%m%d')
|
||||
AND SND_CH_CD = 'ALIMTALK'
|
||||
GROUP BY SUM_YMD, USER_SEQ ) A
|
||||
WHERE 1=1
|
||||
AND ecd.SUM_YMD = S.SUM_YMD
|
||||
AND ecd.SUM_YMD = L.SUM_YMD
|
||||
AND ecd.SUM_YMD = M.SUM_YMD
|
||||
AND ecd.SUM_YMD = A.SUM_YMD
|
||||
AND ecd.USER_SEQ = S.USER_SEQ
|
||||
AND ecd.USER_SEQ = L.USER_SEQ
|
||||
AND ecd.USER_SEQ = M.USER_SEQ
|
||||
AND ecd.USER_SEQ = A.USER_SEQ
|
||||
<if test="custNm != null and custNm != ''">
|
||||
AND ecd.CUST_NM LIKE CONCAT('%',#{custNm},'%')
|
||||
</if>
|
||||
<if test="bizrno != null and bizrno != ''">
|
||||
AND ecd.BIZRNO LIKE CONCAT('%',#{bizrno},'%')
|
||||
</if>
|
||||
ORDER BY ecd.SUM_YMD DESC, ecd.USER_SEQ DESC
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user