mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 18:42:43 +09:00
고객관리 > 청약고갹관리/회원관리 기능 추가
This commit is contained in:
@@ -1,38 +1,80 @@
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 채널관리
|
||||
* desc : 채널관리
|
||||
*/
|
||||
package kr.co.uplus.ez.api.channelMgt;
|
||||
|
||||
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 kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListExcelReqDto;
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListExcelResDto;
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto;
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListResDto;
|
||||
import kr.co.uplus.ez.common.components.ValidComponents;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "api/v1/bo/channelMgt")
|
||||
public class ChannelMgtController {
|
||||
|
||||
@Autowired
|
||||
ChannelMgtService channelService;
|
||||
|
||||
|
||||
@Autowired
|
||||
ValidComponents validComponents;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 알림톡 템플릿 목록 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/tmpltList" , method = {RequestMethod.POST})
|
||||
@ApiOperation(value = "tmpltList", notes = "알림톡 템플릿 목록 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "tmpltList", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public ApiResponseMessage tmpltList(@RequestBody Map<String, Object> paramMap) throws Exception{
|
||||
return channelService.tmpltList(paramMap);
|
||||
public TmpltListResDto tmpltList(@RequestBody @Valid TmpltListReqDto tmpltListReqDto, BindingResult bindingResult) throws Exception{
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new TmpltListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return channelService.tmpltList(tmpltListReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 알림톡 템플릿 엑셀 다운로드 목록 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation(value = "tmpltListExcel", notes = "알림톡 템플릿 엑셀 다운로드 목록 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "tmpltListExcel", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public TmpltListExcelResDto tmpltListExcel(@RequestBody @Valid TmpltListExcelReqDto tmpltListExcelReqDto, BindingResult bindingResult) throws Exception{
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new TmpltListExcelResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return channelService.tmpltListExcel(tmpltListExcelReqDto);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
package kr.co.uplus.ez.api.channelMgt;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListExcelReqDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public class ChannelMgtMapper {
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo;
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto;
|
||||
|
||||
@Mapper
|
||||
public interface ChannelMgtMapper {
|
||||
|
||||
int selectTmpltTotalCnt(TmpltListReqDto tmpltListReqDto);
|
||||
|
||||
List<TmpltInfo> selectTmpltList(TmpltListReqDto tmpltListReqDto);
|
||||
|
||||
List<TmpltInfo> selectTmpltListExcel(TmpltListExcelReqDto tmpltListExcelReqDto);
|
||||
}
|
||||
|
||||
@@ -5,47 +5,104 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import kr.co.uplus.ez.api.channelMgt.dto.*;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
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;
|
||||
|
||||
@Service
|
||||
public class ChannelMgtService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ChannelMgtService.class);
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb1")
|
||||
private SqlSessionTemplate sqlSessionMaster;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb2")
|
||||
private SqlSessionTemplate sqlSessionSlave;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 알림톡 템플릿 목록 조회
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @return
|
||||
*/
|
||||
public ApiResponseMessage tmpltList(Map<String, Object> paramMap) {
|
||||
ApiResponseMessage result = new ApiResponseMessage(ApiResponseCode.SUCCESS);
|
||||
Map<String, Object> dataObj = new HashMap<>();
|
||||
List<Map<String,Object>> dataList = new ArrayList<>();
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("totalCnt","999");
|
||||
data.put("currentPage","1");
|
||||
dataObj.put("paging", data);
|
||||
|
||||
for(int i=0; i<10; i++) {
|
||||
data = new HashMap<>();
|
||||
data.put("no", ""+(i+1));
|
||||
data.put("custNm", "유플러스");
|
||||
data.put("bRegNo", "229-81-39938");
|
||||
data.put("tmpltCd", "Abc");
|
||||
data.put("tmpltNm", "부가정보형");
|
||||
data.put("stat", "승인");
|
||||
data.put("returnReason", "");
|
||||
data.put("sendProfile", "@유플러스");
|
||||
data.put("lastChgDt", "2022-03-10");
|
||||
|
||||
dataList.add(data);
|
||||
public TmpltListResDto tmpltList(TmpltListReqDto tmpltListReqDto) {
|
||||
ChannelMgtMapper channelMgtMapper = sqlSessionSlave.getMapper(ChannelMgtMapper.class);
|
||||
String nowPage = String.valueOf(tmpltListReqDto.getPage());
|
||||
int totalCnt = channelMgtMapper.selectTmpltTotalCnt(tmpltListReqDto);
|
||||
|
||||
|
||||
if(totalCnt == 0) {
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
TmpltListRes tmpltListRes = new TmpltListRes();
|
||||
tmpltListRes.setList(new ArrayList<>());
|
||||
tmpltListRes.setPaging(paging);
|
||||
return new TmpltListResDto(ApiResponseCode.CM_NOT_FOUND, tmpltListRes);
|
||||
}
|
||||
dataObj.put("list", dataList);
|
||||
result.setData(dataObj);
|
||||
return result;
|
||||
logger.info("perPage : "+tmpltListReqDto.getPagePerRows());
|
||||
int page = tmpltListReqDto.getPage();
|
||||
int pagePerRows = tmpltListReqDto.getPagePerRows();
|
||||
page = (page -1) * pagePerRows;
|
||||
tmpltListReqDto.setPage(page);
|
||||
|
||||
List<TmpltInfo> tmpltInfos = channelMgtMapper.selectTmpltList(tmpltListReqDto);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
|
||||
TmpltListRes tmpltListRes = new TmpltListRes();
|
||||
tmpltListRes.setList(tmpltInfos);
|
||||
tmpltListRes.setPaging(paging);
|
||||
|
||||
return new TmpltListResDto(ApiResponseCode.SUCCESS, tmpltListRes);
|
||||
}
|
||||
|
||||
//
|
||||
public TmpltListExcelResDto tmpltListExcel(TmpltListExcelReqDto tmpltListExcelReqDto) {
|
||||
ChannelMgtMapper channelMgtMapper = sqlSessionSlave.getMapper(ChannelMgtMapper.class);
|
||||
//String nowPage = String.valueOf(tmpltListReqDto.getPage());
|
||||
// int totalCnt = channelMgtMapper.selectTmpltTotalCnt(tmpltListReqDto);
|
||||
//
|
||||
//
|
||||
// if(totalCnt == 0) {
|
||||
// Paging paging = new Paging();
|
||||
// paging.setPage(nowPage);
|
||||
// paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
// TmpltListRes tmpltListRes = new TmpltListRes();
|
||||
// tmpltListRes.setList(new ArrayList<>());
|
||||
// tmpltListRes.setPaging(paging);
|
||||
// return new TmpltListResDto(ApiResponseCode.CM_NOT_FOUND, tmpltListRes);
|
||||
// }
|
||||
// logger.info("perPage : "+tmpltListReqDto.getPagePerRows());
|
||||
// int page = tmpltListReqDto.getPage();
|
||||
// int pagePerRows = tmpltListReqDto.getPagePerRows();
|
||||
// page = (page -1) * pagePerRows;
|
||||
// tmpltListReqDto.setPage(page);
|
||||
|
||||
List<TmpltInfo> tmpltInfos = channelMgtMapper.selectTmpltListExcel(tmpltListExcelReqDto);
|
||||
|
||||
// Paging paging = new Paging();
|
||||
// paging.setPage(nowPage);
|
||||
// paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
//
|
||||
TmpltListRes tmpltListRes = new TmpltListRes();
|
||||
tmpltListRes.setList(tmpltInfos);
|
||||
// tmpltListRes.setPaging(paging);
|
||||
|
||||
return new TmpltListExcelResDto(ApiResponseCode.SUCCESS, tmpltListRes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.channelMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.api.servMgt.dto.RejectRecvInfo;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class TmpltInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "String")
|
||||
private String no;
|
||||
@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;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package kr.co.uplus.ez.api.channelMgt.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class TmpltListExcelReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
|
||||
private String searchType2;
|
||||
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String")
|
||||
private String searchText1;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.channelMgt.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 TmpltListExcelResDto extends ResponseMessage implements Serializable {
|
||||
|
||||
// 데이터.
|
||||
private TmpltListRes data;
|
||||
|
||||
public TmpltListExcelResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public TmpltListExcelResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public TmpltListExcelResDto(ApiResponseCode returnStr, TmpltListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package kr.co.uplus.ez.api.channelMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class TmpltListReqDto 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;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수",notes = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "int")
|
||||
private int pagePerRows;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
|
||||
private int page;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.channelMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import kr.co.uplus.ez.common.data.Paging;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class TmpltListRes implements Serializable {
|
||||
|
||||
private Paging paging;
|
||||
private List<TmpltInfo> list;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.channelMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kr.co.uplus.ez.api.servMgt.dto.RejectRecvInfo;
|
||||
import kr.co.uplus.ez.api.servMgt.dto.RejectRecvListRes;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class TmpltListResDto extends ResponseMessage implements Serializable {
|
||||
|
||||
// 데이터.
|
||||
private TmpltListRes data;
|
||||
|
||||
public TmpltListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public TmpltListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public TmpltListResDto(ApiResponseCode returnStr, TmpltListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,8 @@ import kr.co.uplus.ez.api.custMgt.dto.SubsListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserResDto;
|
||||
import kr.co.uplus.ez.common.components.ValidComponents;
|
||||
@@ -251,6 +253,7 @@ public class CustMgtController {
|
||||
|
||||
|
||||
/**
|
||||
* 관리자 회원 상세 보기.
|
||||
* @param memberDetailListReqDto
|
||||
* @param bindingResult
|
||||
* @return MemberDetailListResDto
|
||||
@@ -428,5 +431,26 @@ public class CustMgtController {
|
||||
public ApiResponseMessage updateMember(@RequestBody Map<String, Object> paramMap) {
|
||||
return custService.updateMember(paramMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자 정보(종합) 수정
|
||||
* @param UpdateAdminInfoTotalReqDto
|
||||
* @return UpdateAdminInfoTotalResDto
|
||||
* @
|
||||
*/
|
||||
@ApiOperation(value = "updateAdminInfoTotal", notes = "관리자 정보(종합) 수정")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value = "/updateAdminInfoTotal" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public UpdateAdminInfoTotalResDto updateAdminInfoTotal(@RequestBody @Valid UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto, BindingResult bindingResult) {
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new UpdateAdminInfoTotalResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.updateAdminInfoTotal(updateAdminInfoTotalReqDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import kr.co.uplus.ez.api.custMgt.dto.SubsList;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListExcelReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SubsListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SvcUserInfo;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserReqDto;
|
||||
import kr.co.uplus.ez.common.data.ImUser;
|
||||
|
||||
@@ -90,5 +91,15 @@ public interface CustMgtMapper {
|
||||
/** 사용자 정보 삭제*/
|
||||
int deleteUserList(DeleteUserReqDto deleteUserReqDto);
|
||||
/** 관리자아이디 조회*/
|
||||
int selectAdminId(String adminId);
|
||||
String selectAdminId(String adminId);
|
||||
|
||||
int updateAdminInfoTotal(UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto);
|
||||
|
||||
int insertMemo(UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto);
|
||||
|
||||
int updateAdminSendingLimit(Map<String, Object> paramMap);
|
||||
|
||||
Map<String, Object> selectAdminSendingLimt(Map<String, Object> paramMap);
|
||||
|
||||
SvcUserInfo selectSvcUserInfo(String userId);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package kr.co.uplus.ez.api.custMgt;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.slf4j.Logger;
|
||||
@@ -30,7 +33,9 @@ import kr.co.uplus.ez.api.custMgt.dto.DeleteMemoReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteMemoResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteUserReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteUserResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUser;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUserReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUserRes;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUserResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertTestIdReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertTestIdResDto;
|
||||
@@ -60,6 +65,8 @@ import kr.co.uplus.ez.api.custMgt.dto.SubsListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.SvcUserInfo;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserResDto;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
@@ -74,7 +81,6 @@ public class CustMgtService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(CustMgtService.class);
|
||||
|
||||
|
||||
@Autowired
|
||||
@Qualifier("sqlSessionTemplateDb1")
|
||||
private SqlSessionTemplate sqlSessionMaster;
|
||||
@@ -115,9 +121,8 @@ public class CustMgtService {
|
||||
private String custTyCd;
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 청약 고객 정보 목록 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 청약 고객 정보 목록 조회
|
||||
*
|
||||
* @param subsListReqDto
|
||||
* @return subsListResDto
|
||||
*/
|
||||
@@ -128,8 +133,7 @@ public class CustMgtService {
|
||||
String nowPage = String.valueOf(subsListReqDto.getPage());
|
||||
int totalCnt = custMgtMapper.selectSubsListTotalCnt(subsListReqDto);
|
||||
|
||||
|
||||
if(totalCnt == 0) {
|
||||
if (totalCnt == 0) {
|
||||
|
||||
SubsListRes subsListRes = new SubsListRes();
|
||||
subsListRes.setList(new ArrayList<>());
|
||||
@@ -142,14 +146,12 @@ public class CustMgtService {
|
||||
return new SubsListResDto(ApiResponseCode.CM_NOT_FOUND, subsListRes);
|
||||
}
|
||||
|
||||
|
||||
int page = subsListReqDto.getPage();
|
||||
int pagePerRows = subsListReqDto.getPagePerRows();
|
||||
page = (page -1) * pagePerRows;
|
||||
page = (page - 1) * pagePerRows;
|
||||
subsListReqDto.setPage(page);
|
||||
|
||||
List<SubsList> subsLists = custMgtMapper.selectSubsLists(subsListReqDto);
|
||||
|
||||
List<SubsList> subsLists = custMgtMapper.selectSubsLists(subsListReqDto);
|
||||
|
||||
SubsListRes subsListRes = new SubsListRes();
|
||||
subsListRes.setList(subsLists);
|
||||
@@ -163,9 +165,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 청약 고객 정보 목록 엑셀 다운로드
|
||||
* date : 2022. 4. 25. auth : ckr desc : 청약 고객 정보 목록 엑셀 다운로드
|
||||
*
|
||||
* @param subsListExcelReqDto
|
||||
* @return subsListExcelResDto
|
||||
*/
|
||||
@@ -188,9 +189,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 청약 정보 상세 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 청약 정보 상세 조회
|
||||
*
|
||||
* @param subsDetailReqDto
|
||||
* @return subsDetailResDto
|
||||
*/
|
||||
@@ -202,7 +202,7 @@ public class CustMgtService {
|
||||
SubsDetail subsDetail = custMgtMapper.selectSubsDetailInfo(subsDetailReqDto);
|
||||
|
||||
// 조회 결과 없음.
|
||||
if(subsDetail == null) {
|
||||
if (subsDetail == null) {
|
||||
return new SubsDetailResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -211,9 +211,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자명 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 관리자명 조회
|
||||
*
|
||||
* @param adminInfoReqDto
|
||||
* @return adminInfoResDto
|
||||
*/
|
||||
@@ -227,7 +226,7 @@ public class CustMgtService {
|
||||
ImUser imUser = custMgtMapper.selectImUser(param);
|
||||
|
||||
// 조회 결과 없음.
|
||||
if(imUser == null) {
|
||||
if (imUser == null) {
|
||||
return new AdminInfoResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -243,9 +242,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자ID,관리자명 수정
|
||||
* date : 2022. 4. 25. auth : ckr desc : 관리자ID,관리자명 수정
|
||||
*
|
||||
* @param updateAdminInfoReqDto
|
||||
* @return updateAdminInfoResDto
|
||||
*/
|
||||
@@ -270,9 +268,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 이월금액 목록 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 이월금액 목록 조회
|
||||
*
|
||||
* @param carryOverListReqDto
|
||||
* @return carryOverListResDto
|
||||
*/
|
||||
@@ -284,18 +281,18 @@ public class CustMgtService {
|
||||
List<CarryOver> carryOvers = custMgtMapper.selectCarryOverList(carryOverListReqDto);
|
||||
|
||||
// 조회 결과 없음.
|
||||
if(carryOvers == null) {
|
||||
if (carryOvers == null) {
|
||||
return new CarryOverListResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
// 성공 응답.
|
||||
return new CarryOverListResDto(ApiResponseCode.SUCCESS, new CarryOverListRes(carryOvers, String.valueOf(carryOvers.size())));
|
||||
return new CarryOverListResDto(ApiResponseCode.SUCCESS,
|
||||
new CarryOverListRes(carryOvers, String.valueOf(carryOvers.size())));
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 회원목록조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 회원목록조회
|
||||
*
|
||||
* @param memberListReqDto
|
||||
* @return memberListResDto
|
||||
*/
|
||||
@@ -306,8 +303,7 @@ public class CustMgtService {
|
||||
String nowPage = String.valueOf(memberListReqDto.getPage());
|
||||
int totalCnt = custMgtMapper.selectSvcUserListTotalCnt(memberListReqDto);
|
||||
|
||||
|
||||
if(totalCnt == 0) {
|
||||
if (totalCnt == 0) {
|
||||
|
||||
MemberListRes memberListRes = new MemberListRes();
|
||||
memberListRes.setList(new ArrayList<>());
|
||||
@@ -320,13 +316,12 @@ public class CustMgtService {
|
||||
return new MemberListResDto(ApiResponseCode.CM_NOT_FOUND, memberListRes);
|
||||
}
|
||||
|
||||
|
||||
int page = memberListReqDto.getPage();
|
||||
int pagePerRows = memberListReqDto.getPagePerRows();
|
||||
page = (page -1) * pagePerRows;
|
||||
page = (page - 1) * pagePerRows;
|
||||
memberListReqDto.setPage(page);
|
||||
|
||||
List<MemberList> members = custMgtMapper.selectSvcUserList(memberListReqDto);
|
||||
List<MemberList> members = custMgtMapper.selectSvcUserList(memberListReqDto);
|
||||
|
||||
MemberListRes memberListRes = new MemberListRes();
|
||||
memberListRes.setList(members);
|
||||
@@ -340,9 +335,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 회원 정보 상세 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 회원 정보 상세 조회
|
||||
*
|
||||
* @param memberDetailReqDto
|
||||
* @return MemberDetailResDto
|
||||
*/
|
||||
@@ -353,7 +347,7 @@ public class CustMgtService {
|
||||
MemberDetailRes memberDetailRes = custMgtMapper.selectMemberDetail(memberDetailReqDto);
|
||||
|
||||
// 조회 결과 없음.
|
||||
if(memberDetailRes == null) {
|
||||
if (memberDetailRes == null) {
|
||||
return new MemberDetailResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -373,7 +367,7 @@ public class CustMgtService {
|
||||
MemberAdminDetailRes memberAdminDetailRes = custMgtMapper.selectMemberAdminDetail(memberAdminDetailReqDto);
|
||||
|
||||
// 조회 결과 없음.
|
||||
if(memberAdminDetailRes == null) {
|
||||
if (memberAdminDetailRes == null) {
|
||||
return new MemberAdminDetailResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -381,7 +375,7 @@ public class CustMgtService {
|
||||
|
||||
int totalCnt = custMgtMapper.selectMemberDetailListTotalCnt(memberAdminDetailReqDto);
|
||||
|
||||
if(totalCnt == 0) {
|
||||
if (totalCnt == 0) {
|
||||
memberAdminDetailRes.setList(new ArrayList<>());
|
||||
|
||||
Paging paging = new Paging();
|
||||
@@ -389,10 +383,10 @@ public class CustMgtService {
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
memberAdminDetailRes.setPaging(paging);
|
||||
|
||||
}else {
|
||||
} else {
|
||||
int page = memberAdminDetailReqDto.getPage();
|
||||
int pagePerRows = memberAdminDetailReqDto.getPagePerRows();
|
||||
page = (page -1) * pagePerRows;
|
||||
page = (page - 1) * pagePerRows;
|
||||
memberAdminDetailReqDto.setPage(page);
|
||||
|
||||
Paging paging = new Paging();
|
||||
@@ -408,9 +402,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 테스트ID 등록
|
||||
* date : 2022. 4. 25. auth : ckr desc : 테스트ID 등록
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@@ -421,7 +414,7 @@ public class CustMgtService {
|
||||
int getUserIdCount = custMgtMapper.getUserIdCount(insertTestIdReqDto.getUserId());
|
||||
|
||||
// 이미 존재하는 아이디.
|
||||
if(getUserIdCount > 0) {
|
||||
if (getUserIdCount > 0) {
|
||||
return new InsertTestIdResDto(ApiResponseCode.CE_DUPLICATE_ID);
|
||||
}
|
||||
|
||||
@@ -429,7 +422,7 @@ public class CustMgtService {
|
||||
int checkCustInfo = custMgtMapper.selectCustInfoCount(brno);
|
||||
String custSeq = custMgtMapper.getCustSeq(brno);
|
||||
|
||||
if(checkCustInfo < 1) {
|
||||
if (checkCustInfo < 1) {
|
||||
// 1-2. 사업자 번호로 미존재시 : 고객정보 등록.
|
||||
CustInfo custInfo = new CustInfo();
|
||||
custInfo.setCustSeq(custSeq);
|
||||
@@ -457,7 +450,8 @@ public class CustMgtService {
|
||||
svcUserInfo.setUserSttusCd(Const.USER_STTUS_CD_NOMAL);
|
||||
svcUserInfo.setCustSeq(custSeq);
|
||||
svcUserInfo.setUserTpCd(Const.USER_TP_CD_TEST);
|
||||
svcUserInfo.setPwd(EncryptionUtil.getCustomSHA512(insertTestIdReqDto.getUserId(), insertTestIdReqDto.getUserPw()));
|
||||
svcUserInfo
|
||||
.setPwd(EncryptionUtil.getCustomSHA512(insertTestIdReqDto.getUserId(), insertTestIdReqDto.getUserPw()));
|
||||
svcUserInfo.setBizrAuthYn(Const.COMM_NO);
|
||||
svcUserInfo.setLineTpCd(Const.LINE_TP_CD_NORMAL);
|
||||
svcUserInfo.setHpNo(insertTestIdReqDto.getMdn());
|
||||
@@ -491,9 +485,8 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 전체 메모 목록 조회
|
||||
* date : 2022. 4. 25. auth : ckr desc : 전체 메모 목록 조회
|
||||
*
|
||||
* @param allMemoListReqDto
|
||||
* @return AllMemoListResDto
|
||||
*/
|
||||
@@ -504,7 +497,7 @@ public class CustMgtService {
|
||||
List<AllMemoList> allMemoLists = custMgtMapper.selectMemoList(allMemoListReqDto);
|
||||
|
||||
// 조회 결과 없음.
|
||||
if(allMemoLists == null) {
|
||||
if (allMemoLists == null) {
|
||||
return new AllMemoListResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -512,27 +505,26 @@ public class CustMgtService {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 메모 삭제
|
||||
* date : 2022. 4. 25. auth : ckr desc : 메모 삭제
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
// 1. 회원정보 조회.
|
||||
|
||||
//user_seq 이용자일련번호
|
||||
int checkUserSeq = custMgtMapper.selectUserSeq(deleteMemoReqDto.getRegister());
|
||||
// user_seq 이용자일련번호
|
||||
int checkUserSeq = custMgtMapper.selectUserSeq(deleteMemoReqDto.getUserId());
|
||||
|
||||
if(checkUserSeq < 1) {
|
||||
if (checkUserSeq < 1) {
|
||||
return new DeleteMemoResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
// 2. 메모 삭제.
|
||||
//seqNo, userSeq를 담음.
|
||||
// seqNo, userSeq를 담음.
|
||||
Map<String, Object> MemoParamMap = new HashMap<String, Object>();
|
||||
MemoParamMap.put("seqNo", deleteMemoReqDto.getSeqNo());
|
||||
MemoParamMap.put("userSeq", checkUserSeq);
|
||||
@@ -541,7 +533,7 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
// 삭제한 건수가 나옴.
|
||||
int result = custMgtMapper.deleteMemo(MemoParamMap);
|
||||
// 한건이 나오지 않을경우
|
||||
if(result < 1) {
|
||||
if (result < 1) {
|
||||
return new DeleteMemoResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -552,9 +544,8 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 사용자 정보 등록
|
||||
* date : 2022. 4. 25. auth : ckr desc : 사용자 정보 등록
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@@ -566,8 +557,14 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
|
||||
String userId = insertUserReqDto.getUserId();
|
||||
String encPwd = "";
|
||||
int userCnt = 0;
|
||||
|
||||
try {
|
||||
userCnt = custMgtMapper.getUserIdCount(userId);
|
||||
if(userCnt > 0) {
|
||||
return new InsertUserResDto(ApiResponseCode.CE_DUPLICATE_ID);
|
||||
}
|
||||
|
||||
// 패스워드 암호화
|
||||
encPwd = EncryptionUtil.getCustomSHA512(userId, imsiPw);
|
||||
insertUserReqDto.setUserPw(encPwd);
|
||||
@@ -578,7 +575,6 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
// 임시패스워드(평문) 이메일 발송처리
|
||||
// TODO: 임시패스워드(평문) 이메일 발송처리
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
return new InsertUserResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
@@ -587,9 +583,8 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 사용자 정보 수정
|
||||
* date : 2022. 4. 25. auth : ckr desc : 사용자 정보 수정
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@@ -611,72 +606,134 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
// 임시패스워드(평문) 이메일 발송처리
|
||||
// TODO: 임시패스워드(평문) 이메일 발송처리
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
return new UpdateUserResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
|
||||
return new UpdateUserResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 사용자ID 대량등록
|
||||
* date : 2022. 4. 25. auth : ckr desc : 사용자ID 대량등록
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public InsertMassUserResDto insertMassUser(InsertMassUserReqDto insertMassUserReqDto) {
|
||||
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
// 1. 관리자 ID 존재 여부 체크.
|
||||
SvcUserInfo svcUserInfo = custMgtMapper.selectSvcUserInfo(insertMassUserReqDto.getAdminId());
|
||||
|
||||
if (svcUserInfo == null) {
|
||||
return new InsertMassUserResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
// 1. ID 중복 체크.
|
||||
|
||||
|
||||
List<InsertMassUser> orgInsertMassUsers = insertMassUserReqDto.getList();
|
||||
List<InsertMassUser> errInsertMassUsers = new ArrayList<InsertMassUser>();
|
||||
List<InsertMassUser> insertMassUsers = new ArrayList<InsertMassUser>();
|
||||
|
||||
for (int i = 0; i < orgInsertMassUsers.size(); i++) {
|
||||
|
||||
InsertMassUserResDto result = new InsertMassUserResDto(ApiResponseCode.SUCCESS);
|
||||
InsertMassUser insertMassUser = orgInsertMassUsers.get(i);
|
||||
|
||||
InsertUserReqDto insertUserReqDto = new InsertUserReqDto();
|
||||
insertUserReqDto.setUserId(insertMassUser.getUserId());
|
||||
int flag = custMgtMapper.selectUserInfoCnt(insertUserReqDto);
|
||||
|
||||
if (flag == 0) {
|
||||
insertMassUsers.add(insertMassUser);
|
||||
} else {
|
||||
errInsertMassUsers.add(insertMassUser);
|
||||
}
|
||||
}
|
||||
|
||||
InsertMassUserRes insertMassUserRes = new InsertMassUserRes();
|
||||
int successCnt = 0;
|
||||
for (int j = 0; j < insertMassUsers.size(); j++) {
|
||||
try {
|
||||
// DB 처리.
|
||||
String userId = insertMassUsers.get(j).getUserId();
|
||||
String imsiPw = RandomStringUtils.randomAlphanumeric(10);
|
||||
// String encPwd = EncryptionUtil.getCustomSHA512(userId, imsiPw);
|
||||
|
||||
SvcUserInfo svcUserInfo2 = new SvcUserInfo();
|
||||
String userSeq = custMgtMapper.getUserSeq();
|
||||
|
||||
svcUserInfo2.setUserSeq(userSeq);
|
||||
svcUserInfo2.setUserId(userId);
|
||||
svcUserInfo2.setUserNm(insertMassUsers.get(j).getUserNm());
|
||||
svcUserInfo2.setPwd(imsiPw);
|
||||
svcUserInfo2.setPwdInit(Const.COMM_YES);
|
||||
svcUserInfo2.setHpNo(insertMassUsers.get(j).getMdn());
|
||||
svcUserInfo2.setEmail(insertMassUsers.get(j).getEmail());
|
||||
svcUserInfo2.setUserSttusCd(insertMassUsers.get(j).getStat() == "사용" ? Const.USER_STTUS_CD_NOMAL
|
||||
: Const.USER_STTUS_CD_STOP);
|
||||
svcUserInfo2.setCustSeq(svcUserInfo.getCustSeq());
|
||||
svcUserInfo2.setPrntsUserSeq(svcUserInfo.getUserSeq());
|
||||
svcUserInfo2.setUserTpCd(Const.USER_TP_CD_USR);
|
||||
svcUserInfo2.setLineTpCd(Const.LINE_TP_CD_NORMAL);
|
||||
svcUserInfo2.setRegId(userId);
|
||||
svcUserInfo2.setChgId(userId);
|
||||
|
||||
custMgtMapper.insertSvcUserInfo(svcUserInfo2);
|
||||
|
||||
successCnt++;
|
||||
} catch (Exception e) {
|
||||
errInsertMassUsers.add(insertMassUsers.get(j));
|
||||
}
|
||||
}
|
||||
|
||||
// 요청건수.
|
||||
insertMassUserRes.setTotalCnt(String.valueOf(insertMassUsers.size()));
|
||||
// 성공건수.
|
||||
insertMassUserRes.setSuccessCnt(String.valueOf(successCnt));
|
||||
// 실패건수.
|
||||
insertMassUserRes.setFailCnt(String.valueOf(errInsertMassUsers.size()));
|
||||
|
||||
InsertMassUserResDto result = new InsertMassUserResDto(ApiResponseCode.SUCCESS, insertMassUserRes);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 사용자 정보 삭제
|
||||
* date : 2022. 4. 25. auth : ckr desc : 사용자 정보 삭제
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public DeleteUserResDto deleteUser(DeleteUserReqDto deleteUserReqDto) {
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
//1.관리자 정보 조회
|
||||
int checkAdminId = custMgtMapper.selectAdminId(deleteUserReqDto.getAdminId());
|
||||
// 1.관리자 정보 조회
|
||||
// String checkAdminId = custMgtMapper.selectAdminId(deleteUserReqDto.getAdminId());
|
||||
//
|
||||
// //2. 관리자 정보 조회결과 응답 없음
|
||||
// if(checkAdminId == null) {
|
||||
// return new DeleteUserResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
// }
|
||||
|
||||
//2. 관리자 정보 조회결과 응답 없음
|
||||
if(checkAdminId < 1) {
|
||||
try {
|
||||
// 3. 사용자정보 삭제
|
||||
int result = custMgtMapper.deleteUserList(deleteUserReqDto);
|
||||
|
||||
// 4. 삭제대상이 없음.
|
||||
if (result < 1) {
|
||||
return new DeleteUserResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
try {
|
||||
//3. 사용자정보 삭제
|
||||
int result = custMgtMapper.deleteUserList(deleteUserReqDto);
|
||||
|
||||
//4. 삭제대상이 없음.
|
||||
if(result < 1) {
|
||||
return new DeleteUserResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
//5. 그 이외의 결과가 나왔을때 데이터
|
||||
return new DeleteUserResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
//6. 성공 응답.
|
||||
return new DeleteUserResDto(ApiResponseCode.SUCCESS);
|
||||
} catch (Exception e) {
|
||||
// 5. 그 이외의 결과가 나왔을때 데이터
|
||||
return new DeleteUserResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
// 6. 성공 응답.
|
||||
return new DeleteUserResDto(ApiResponseCode.SUCCESS);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자 정보 수정
|
||||
* date : 2022. 4. 25. auth : ckr desc : 관리자 정보 수정
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@@ -685,4 +742,59 @@ public DeleteMemoResDto deleteMemo(DeleteMemoReqDto deleteMemoReqDto) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 관리자 정보(종합) 수정
|
||||
* @param UpdateAdminInfoTotalReqDto
|
||||
* @return UpdateAdminInfoTotalResDto
|
||||
* @
|
||||
*/
|
||||
public UpdateAdminInfoTotalResDto updateAdminInfoTotal(UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto) {
|
||||
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
Map<String, Object> paramMap = new HashMap<String, Object>();
|
||||
Map<String, Object> rstAmtMap = new HashMap<String, Object>();
|
||||
try {
|
||||
// 1. 사용자 정보 update
|
||||
custMgtMapper.updateAdminInfoTotal(updateAdminInfoTotalReqDto);
|
||||
|
||||
// 2. 메모정보 insert
|
||||
custMgtMapper.insertMemo(updateAdminInfoTotalReqDto);
|
||||
|
||||
// 3. 발송 한도 update
|
||||
if(updateAdminInfoTotalReqDto.getSendingLimit() != null) {
|
||||
BigDecimal sendingLimitAmt = new BigDecimal(updateAdminInfoTotalReqDto.getSendingLimit());
|
||||
|
||||
paramMap.put("userId", updateAdminInfoTotalReqDto.getUserId());
|
||||
// 3-1. 기존 정액한도금액 조회
|
||||
rstAmtMap = custMgtMapper.selectAdminSendingLimt(paramMap);
|
||||
if(rstAmtMap.get("fxLmtAmt") != null) {
|
||||
String stFxLmtAmt = rstAmtMap.get("fxLmtAmt").toString();
|
||||
BigDecimal fxLmtAmt = new BigDecimal(stFxLmtAmt);
|
||||
|
||||
BigDecimal targetMrtLmtAmt = new BigDecimal(0);
|
||||
|
||||
// 변동요청발송한도금액이 기존정액한도금액보다 작으면 한도금액 변경 불가 실패처리
|
||||
if(sendingLimitAmt.compareTo(fxLmtAmt) < 0) {
|
||||
return new UpdateAdminInfoTotalResDto(ApiResponseCode.CE_SENDINGLIMT_ERROR);
|
||||
}
|
||||
|
||||
// 3-2. 발송한도금액 수정(종량 한도금액 UPDATE)
|
||||
// 변동요청발송한도금액 - 기존정액한도금액 = 변경할 종량한도금액
|
||||
targetMrtLmtAmt = sendingLimitAmt.subtract(fxLmtAmt);
|
||||
paramMap.put("sendingLimit", targetMrtLmtAmt);
|
||||
|
||||
custMgtMapper.updateAdminSendingLimit(paramMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
return new UpdateAdminInfoTotalResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
return new UpdateAdminInfoTotalResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ public class AllMemoList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "내용", name = "내용", dataType = "String")
|
||||
private String memo;
|
||||
@ApiModelProperty(example = "내용일련번호", name = "내용일련번호", dataType = "String")
|
||||
private String seqNo;
|
||||
@ApiModelProperty(example = "작성자", name = "작성자", dataType = "String")
|
||||
private String register;
|
||||
@ApiModelProperty(example = "작성일", name = "작성일", dataType = "String")
|
||||
|
||||
@@ -12,7 +12,7 @@ import lombok.Data;
|
||||
public class DeleteMemoReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "작성자 계정 ID", name = "작성자 계정 ID", dataType = "String")
|
||||
private String register;
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "메모 일련 번호", name = "메모 일련 번호", dataType = "String")
|
||||
private String seqNo;
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ public class InsertMassUser implements Serializable{
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "사용자 이름", name = "사용자 이름", dataType = "String")
|
||||
private String userNm;
|
||||
@ApiModelProperty(example = "ID잠금 상태(사용/미사용)", name = "ID잠금 상태(사용/미사용)", dataType = "String")
|
||||
private String stat;
|
||||
@ApiModelProperty(example = "휴대폰번호", name = "휴대폰번호", dataType = "String")
|
||||
private String mdn;
|
||||
@ApiModelProperty(example = "이메일", name = "이메일", dataType = "String")
|
||||
private String email;
|
||||
@ApiModelProperty(example = "ID잠금 상태(사용/미사용)", name = "ID잠금 상태(사용/미사용)", dataType = "String")
|
||||
private String stat;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class InsertMassUserRes implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "요청건수", name = "요청건수", dataType = "String")
|
||||
private String totalCnt;
|
||||
@ApiModelProperty(example = "성공건수", name = "성공건수", dataType = "String")
|
||||
private String successCnt;
|
||||
@ApiModelProperty(example = "실패건수", name = "실패건수", dataType = "String")
|
||||
private String failCnt;
|
||||
|
||||
}
|
||||
@@ -10,19 +10,19 @@ import lombok.Data;
|
||||
@Data
|
||||
public class InsertMassUserResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private Object data;
|
||||
|
||||
private InsertMassUserRes data;
|
||||
|
||||
public InsertMassUserResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
|
||||
public InsertMassUserResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public InsertMassUserResDto(ApiResponseCode returnStr, Object data) {
|
||||
public InsertMassUserResDto(ApiResponseCode returnStr, InsertMassUserRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UpdateAdminInfoTotalReqDto implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "사용자ID", name = "사용자ID", dataType = "String")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(example = "사용자 상태", name = "사용자 상태", dataType = "String")
|
||||
private String userStat;
|
||||
|
||||
@ApiModelProperty(example = "라인타입", name = "라인타입", dataType = "String")
|
||||
private String lineType;
|
||||
|
||||
@ApiModelProperty(example = "발송한도", name = "발송한도", dataType = "String")
|
||||
private String sendingLimit;
|
||||
|
||||
@ApiModelProperty(example = "메모", name = "메모", dataType = "String")
|
||||
private String memo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UpdateAdminInfoTotalResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
// 데이터.
|
||||
private Object data;
|
||||
|
||||
public UpdateAdminInfoTotalResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public UpdateAdminInfoTotalResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public UpdateAdminInfoTotalResDto(ApiResponseCode returnStr, Object data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -55,6 +55,8 @@ public enum ApiResponseCode {
|
||||
,CE_SYSMGT_AUTHCODE_INVALID("4017", "권한코드가 유효하지않습니다.")
|
||||
/** 이미 사용중인 아이디 입니다. */
|
||||
,CE_DUPLICATE_ID("4018", "이미 사용중인 아이디 입니다.")
|
||||
/** 발송한도금액이 정액한도금액보다 작습니다. */
|
||||
,CE_SENDINGLIMT_ERROR("4019", "발송한도금액이 정액한도금액보다 작습니다.")
|
||||
|
||||
// 시스템
|
||||
/** 알 수 없는 에러. */
|
||||
|
||||
@@ -3,5 +3,103 @@
|
||||
|
||||
<mapper namespace="kr.co.uplus.ez.api.channelMgt.ChannelMgtMapper">
|
||||
|
||||
<select id="selectTmpltTotalCnt" parameterType="kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto" resultType="int">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
from ${HUBEZ_COMMON}.EZ_ATLK_TMPLT eat
|
||||
inner join ${HUBEZ_COMMON}.EZ_SUBS_INFO esi
|
||||
on esi.USER_SEQ = eat.USER_SEQ
|
||||
and esi.SUBS_STTUS_CD in ('02','03','04','99')
|
||||
inner join ${HUBEZ_COMMON}.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esi.CUST_SEQ
|
||||
|
||||
|
||||
<include refid="tmpltListCondition"></include>
|
||||
</select>
|
||||
<select id="selectTmpltList" parameterType="kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto" resultType="kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo">
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
(eci.CUST_NM)AS custNm,
|
||||
(eci.BIZRNO)AS bRegNo,
|
||||
eat.TMPLT_CD AS tmpltCd,
|
||||
eat.TMPLT_NM AS tmpltNm,
|
||||
(eat.TMPLT_TP_CD) AS tmpltType,
|
||||
eat.TMPLT_STTUS_CD AS stat,
|
||||
eat.REJCT_RSN AS returnReason,
|
||||
eat.SNDRPROF_KEY AS sendProfile,
|
||||
<!-- (select CHNL_ID from ${HUBEZ_COMMON}.EZ_KKO_CHNL ekc WHERE eat.SNDRPROF_KEY = ekc.SNDRPROF_KEY) AS sendProfile, -->
|
||||
DATE_FORMAT(eat.CHG_DT, '%Y-%m-%d') As lastChgDt
|
||||
from ${HUBEZ_COMMON}.EZ_ATLK_TMPLT eat
|
||||
inner join ${HUBEZ_COMMON}.EZ_SUBS_INFO esi
|
||||
on esi.USER_SEQ = eat.USER_SEQ
|
||||
and esi.SUBS_STTUS_CD in ('02','03','04','99')
|
||||
inner join ${HUBEZ_COMMON}.EZ_CUST_INFO eci
|
||||
on eci.CUST_SEQ = esi.CUST_SEQ
|
||||
<include refid="tmpltListCondition"></include>
|
||||
LIMIT #{page}, #{pagePerRows}) A,
|
||||
( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<sql id="tmpltListCondition">
|
||||
<if test='searchType1 != null and searchType1 != ""'>
|
||||
<choose>
|
||||
<when test='searchType1 == "N"'> <!-- 상태 - 중지 -->
|
||||
AND esi.SUBS_STTUS_CD = '99'
|
||||
</when>
|
||||
<otherwise><!-- 상태 - 사용 -->
|
||||
AND esi.SUBS_STTUS_CD != '99'
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test='searchText1 != null and searchText1 != ""'>
|
||||
<if test='searchType2 != null and searchType2 != ""'>
|
||||
<choose>
|
||||
<when test='searchType2 == "custNm"'><!-- 검색조건 - 고객사명 -->
|
||||
and UPPER(eci.CUST_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%')
|
||||
</when>
|
||||
<when test='searchType2 == "bizNo"'><!-- 검색조건 - 사업자번호 -->
|
||||
and eci.BIZRNO = #{searchText1}
|
||||
</when>
|
||||
<when test='searchType2 == "tmpltNm"'><!-- 검색조건 - 인증코드 -->
|
||||
and UPPER(eat.TMPLT_NM) LIKE CONCAT('%' , UPPER(#{searchText1}) , '%')
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</if>
|
||||
</sql>
|
||||
<select id="selectTmpltListExcel" parameterType="kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto" resultType="kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo">
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
A.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
(eci.CUST_NM)AS custNm,
|
||||
(eci.BIZRNO)AS bRegNo,
|
||||
eat.TMPLT_CD AS tmpltCd,
|
||||
eat.TMPLT_NM AS tmpltNm,
|
||||
(eat.TMPLT_TP_CD) AS tmpltType,
|
||||
eat.TMPLT_STTUS_CD AS stat,
|
||||
eat.REJCT_RSN AS returnReason,
|
||||
eat.SNDRPROF_KEY AS sendProfile,
|
||||
DATE_FORMAT(eat.CHG_DT, '%Y-%m-%d') As lastChgDt
|
||||
from
|
||||
${HUBEZ_COMMON}.EZ_ATLK_TMPLT eat
|
||||
inner join ${HUBEZ_COMMON}.EZ_SUBS_INFO esi
|
||||
on
|
||||
esi.USER_SEQ = eat.USER_SEQ
|
||||
and esi.SUBS_STTUS_CD in ('02', '03', '04', '99')
|
||||
inner join ${HUBEZ_COMMON}.EZ_CUST_INFO eci
|
||||
on
|
||||
eci.CUST_SEQ = esi.CUST_SEQ
|
||||
<include refid="tmpltListCondition"></include>
|
||||
) A,
|
||||
(
|
||||
SELECT
|
||||
@ROWNUM := 0 ) AS R
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
<insert id="insertUserInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.InsertUserReqDto">
|
||||
/* custMgt-mapper.xml(insertUserInfo) */
|
||||
INTO
|
||||
INSERT INTO
|
||||
${HUBEZ_COMMON}.EZ_SVC_USER(
|
||||
USER_SEQ,
|
||||
USER_ID,
|
||||
@@ -229,13 +229,13 @@
|
||||
WHERE esu.USER_ID = #{adminId}
|
||||
</insert>
|
||||
|
||||
<select id="selectUserInfoCnt" parameterType="kr.co.uplus.ez.api.custMgt.dto.InsertUserReqDto">
|
||||
<select id="selectUserInfoCnt" parameterType="kr.co.uplus.ez.api.custMgt.dto.InsertUserReqDto" resultType="int">
|
||||
/* custMgt-mapper.xml(selectUserInfoCnt) */
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
AND USER_ID = #{userId}
|
||||
WHERE USER_ID = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectSubsDetailInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsDetailReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.SubsDetail">
|
||||
@@ -460,7 +460,8 @@
|
||||
,(SELECT DTL_CD_NM FROM ${HUBEZ_COMMON}.EZ_CD_DTL WHERE GRP_CD = 'SVCUSER_TP_CD' AND DTL_CD = esu.USER_TP_CD) AS USER_TYPE
|
||||
,USER_ID
|
||||
,(SELECT USER_ID FROM ${HUBEZ_COMMON}.EZ_SVC_USER where USER_SEQ = esu.PRNTS_USER_SEQ) AS ADMIN_ID
|
||||
,(SELECT DTL_CD_NM FROM ${HUBEZ_COMMON}.EZ_CD_DTL WHERE GRP_CD = 'SVCUSER_STTUS_CD' AND DTL_CD = esu.USER_STTUS_CD) AS USER_STTUS
|
||||
<!-- ,(SELECT DTL_CD_NM FROM ${HUBEZ_COMMON}.EZ_CD_DTL WHERE GRP_CD = 'SVCUSER_STTUS_CD' AND DTL_CD = esu.USER_STTUS_CD) AS USER_STAT -->
|
||||
,esu.USER_STTUS_CD AS USER_STAT
|
||||
,DATE_FORMAT(esu.LAST_LOGIN_DT, '%Y-%m-%d %H:%i:%s') AS LAST_LOGIN_DT
|
||||
,esu.HP_NO AS MDN
|
||||
,esu.EMAIL
|
||||
@@ -477,11 +478,12 @@
|
||||
,USER_ID
|
||||
,(SELECT USER_ID FROM ${HUBEZ_COMMON}.EZ_SVC_USER where USER_SEQ = esu.PRNTS_USER_SEQ) AS ADMIN_ID
|
||||
,(SELECT USER_NM FROM ${HUBEZ_COMMON}.EZ_SVC_USER where USER_SEQ = esu.PRNTS_USER_SEQ) AS ADMIN_NM
|
||||
,(SELECT PROD_AMT * 2 FROM ${HUBEZ_COMMON}.EZ_PROD_INFO WHERE PROD_CD = esi.PROD_CD) AS SENDING_LIMIT
|
||||
,(SELECT FX_LMT_AMT + MRT_LMT_AMT FROM ${HUBEZ_ADMIN}.EZ_USER_LMT WHERE USER_SEQ = esu.PRNTS_USER_SEQ) AS SENDING_LIMIT
|
||||
,(SELECT DTL_CD_NM FROM ${HUBEZ_COMMON}.EZ_CD_DTL WHERE GRP_CD = 'LINE_TP_CD' AND DTL_CD = esu.LINE_TP_CD) AS LINE_TYPE
|
||||
,(SELECT DTL_CD_NM FROM ${HUBEZ_COMMON}.EZ_CD_DTL WHERE GRP_CD = 'SVCUSER_STTUS_CD' AND DTL_CD = esu.USER_STTUS_CD) AS USER_STTUS
|
||||
<!-- ,(SELECT DTL_CD_NM FROM ${HUBEZ_COMMON}.EZ_CD_DTL WHERE GRP_CD = 'SVCUSER_STTUS_CD' AND DTL_CD = esu.USER_STTUS_CD) AS USER_STTUS -->
|
||||
,esu.USER_STTUS_CD AS USER_STAT
|
||||
,DATE_FORMAT(esu.LAST_LOGIN_DT, '%Y-%m-%d %H:%i:%s') AS LAST_LOGIN_DT
|
||||
,(SELECT MEMO FROM ${HUBEZ_COMMON}.EZ_USER_MEMO EUM ORDER BY REG_DT LIMIT 1) AS MEMO
|
||||
,(SELECT MEMO FROM ${HUBEZ_COMMON}.EZ_USER_MEMO EUM WHERE USER_SEQ = esu.USER_SEQ ORDER BY REG_DT DESC LIMIT 1) AS MEMO
|
||||
,esu.HP_NO AS MDN
|
||||
,esu.EMAIL
|
||||
FROM ${HUBEZ_COMMON}.EZ_SUBS_INFO esi
|
||||
@@ -536,10 +538,10 @@
|
||||
<select id="selectMemoList" parameterType="kr.co.uplus.ez.api.custMgt.dto.AllMemoListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.AllMemoList">
|
||||
/* custMgt-mapper.xml(selectMemoList) */
|
||||
SELECT
|
||||
MEMO,
|
||||
EUM.SEQ_NO,
|
||||
EUM.MKER_NM,
|
||||
DATE_FORMAT(EUM.REG_DT, '%Y-%m-%d') AS REG_DT
|
||||
MEMO AS memo,
|
||||
EUM.SEQ_NO AS seqNo,
|
||||
EUM.MKER_NM AS register,
|
||||
DATE_FORMAT(EUM.REG_DT, '%Y-%m-%d') AS regDt
|
||||
FROM
|
||||
${HUBEZ_COMMON}.EZ_USER_MEMO EUM
|
||||
WHERE
|
||||
@@ -649,7 +651,7 @@
|
||||
, #{userId}
|
||||
, #{userNm}
|
||||
, #{userSttusCd}
|
||||
, #{userSeq}
|
||||
, #{prntsUserSeq}
|
||||
, #{custSeq}
|
||||
, #{userTpCd}
|
||||
, sha2(concat(#{userId}, #{pwd}), 512)
|
||||
@@ -702,7 +704,7 @@
|
||||
/* custMgt-mapper.xml(selectUserSeq) */
|
||||
SELECT USER_SEQ
|
||||
FROM ${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
WHERE USER_ID = #{register}
|
||||
WHERE USER_ID = #{userId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteMemo" parameterType="Map">
|
||||
@@ -712,24 +714,106 @@
|
||||
AND USER_SEQ = #{userSeq}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserList" parameterType="kr.co.uplus.ez.api.custMgt.dto.DeleteUserReqDto">
|
||||
<delete id="deleteUserList" parameterType="kr.co.uplus.ez.api.custMgt.dto.DeleteUserReqDto" >
|
||||
/* custMgt-mapper.xml(deleteUserList) */
|
||||
DELETE from hubez_common.EZ_SVC_USER
|
||||
DELETE FROM ${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
WHERE PRNTS_USER_SEQ = (SELECT USER_SEQ FROM ${HUBEZ_COMMON}.EZ_SVC_USER WHERE USER_ID = #{adminId} )
|
||||
<where>
|
||||
USER_ID IN
|
||||
<foreach collection ="list" item="item" index="i" open="("
|
||||
separator="," close=")">
|
||||
#{item.userId}
|
||||
</foreach>
|
||||
</where>
|
||||
and USER_TP_CD = '02'
|
||||
AND USER_ID IN
|
||||
<foreach collection ="list" item="item" index="i" open="("
|
||||
separator="," close=")">
|
||||
#{item.userId}
|
||||
</foreach>
|
||||
|
||||
AND USER_TP_CD = '02'
|
||||
</delete>
|
||||
|
||||
<select id="selectAdminId" parameterType="String">
|
||||
<select id="selectAdminId" parameterType="String" resultType="String">
|
||||
/* custMgt-mapper.xml(selectAdminId) */
|
||||
SELECT USER_ID from ${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
WHERE USER_ID = #{adminId}
|
||||
</select>
|
||||
|
||||
<update id="updateAdminInfoTotal" parameterType="kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto">
|
||||
UPDATE ${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
SET
|
||||
CHG_ID = #{userId}
|
||||
,CHG_DT = NOW()
|
||||
<if test="userStat != null and userStat != ''">
|
||||
,USER_STTUS_CD = #{userStat}
|
||||
</if>
|
||||
<if test="lineType != null and lineType != ''">
|
||||
,LINE_TYPE_CD = #{lineType}
|
||||
</if>
|
||||
WHERE USER_ID = #{userId}
|
||||
</update>
|
||||
|
||||
<insert id="insertMemo" parameterType="kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto">
|
||||
/* custMgt-mapper.xml(insertMemo) */
|
||||
INSERT INTO ${HUBEZ_COMMON}.EZ_USER_MEMO(
|
||||
SEQ_NO
|
||||
,USER_SEQ
|
||||
,MEMO
|
||||
,MKER_ID
|
||||
,MKER_NM
|
||||
,REG_ID
|
||||
,REG_DT
|
||||
) SELECT
|
||||
(SELECT MAX(eum.SEQ_NO)+1 FROM ${HUBEZ_COMMON}.EZ_USER_MEMO eum)
|
||||
, esu.USER_SEQ
|
||||
, #{memo}
|
||||
, #{userId}
|
||||
, esu.USER_NM
|
||||
, #{userId}
|
||||
, NOW()
|
||||
FROM ${HUBEZ_COMMON}.EZ_SVC_USER esu
|
||||
WHERE esu.USER_ID = #{userId}
|
||||
</insert>
|
||||
|
||||
<select id="selectAdminSendingLimt" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
FX_LMT_AMT AS fxLmtAmt
|
||||
,MRT_LMT_AMT AS mrtLmtAmt
|
||||
FROM ${HUBEZ_ADMIN}.EZ_USER_LMT
|
||||
WHERE USER_SEQ = (SELECT USER_SEQ FROM ${HUBEZ_COMMON}.EZ_SVC_USER WHERE USER_ID = #{userId})
|
||||
</select>
|
||||
|
||||
<update id="updateAdminSendingLimit" parameterType="map">
|
||||
UPDATE ${HUBEZ_ADMIN}.EZ_USER_LMT
|
||||
SET
|
||||
CHG_ID = #{userId}
|
||||
,CHG_DT = NOW()
|
||||
<if test="sendingLimit != null and sendingLimit != ''">
|
||||
,MRT_LMT_AMT = #{sendingLimit}
|
||||
</if>
|
||||
WHERE USER_SEQ = (SELECT USER_SEQ FROM ${HUBEZ_COMMON}.EZ_SVC_USER WHERE USER_ID = #{userId})
|
||||
</update>
|
||||
|
||||
<select id="selectSvcUserInfo" parameterType="String" resultType="kr.co.uplus.ez.api.custMgt.dto.SvcUserInfo">
|
||||
/* custMgt-mapper.xml(selectSvcUserInfo) */
|
||||
SELECT
|
||||
USER_SEQ
|
||||
,USER_ID
|
||||
,USER_NM
|
||||
,USER_STTUS_CD
|
||||
,PRNTS_USER_SEQ
|
||||
,CUST_SEQ
|
||||
,USER_TP_CD
|
||||
,PWD
|
||||
,BIZR_AUTH_YN
|
||||
,LINE_TP_CD
|
||||
,HP_NO
|
||||
,EMAIL
|
||||
,AUTHCD_080
|
||||
,AUT_CD
|
||||
,LAST_LOGIN_DT
|
||||
,LOGIN_FAIL_CNT
|
||||
,PWD_INIT
|
||||
,PWD_CHG_DT
|
||||
,REG_ID
|
||||
,REG_DT
|
||||
,CHG_ID
|
||||
,CHG_DT
|
||||
FROM ${HUBEZ_COMMON}.EZ_SVC_USER
|
||||
WHERE USER_ID = #{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user