mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 04:27:21 +09:00
어드민 추가요건 개발중
This commit is contained in:
@@ -57,6 +57,10 @@ 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.api.custMgt.dto.UserLmtListExcelReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListExcelResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListResDto;
|
||||
import kr.co.uplus.ez.common.components.ValidComponents;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseMessage;
|
||||
@@ -476,5 +480,49 @@ public class CustMgtController {
|
||||
}
|
||||
return custService.duplicateCheckUserId(insertUserReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 1. 1.
|
||||
* auth : ckr
|
||||
* desc : 요금제 구매 내역 목록 조회
|
||||
* @param UserLmtListReqDto
|
||||
* @return UserLmtListRestDto
|
||||
* @
|
||||
*/
|
||||
@ApiOperation(value = "BLNCList", notes = "요금제 구매 내역 목록 조회")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value = "/BLNCList" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public UserLmtListResDto BLNCList(@RequestBody @Valid UserLmtListReqDto userLmtListReqDto, BindingResult bindingResult) {
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new UserLmtListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.BLNCList(userLmtListReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 1. 1.
|
||||
* auth : ckr
|
||||
* desc : 요금제 구매 내역 정보 목록 엑셀 다운로드
|
||||
*
|
||||
* @param userLmtListExcelReqDto
|
||||
* @return UserLmtListExcelResDto
|
||||
* @
|
||||
*/
|
||||
@ApiOperation(value = "BLNCListExcel", notes = "청약 고객 정보 목록 엑셀 다운로드")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value = "/BLNCListExcel" , method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public UserLmtListExcelResDto BLNCListExcel(@RequestBody @Valid UserLmtListExcelReqDto userLmtListExcelReqDto, BindingResult bindingResult) {
|
||||
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new UserLmtListExcelResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return custService.userLmtListExcel(userLmtListExcelReqDto);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Mapper
|
||||
public interface CustMgtMapper {
|
||||
|
||||
@@ -106,4 +108,11 @@ public interface CustMgtMapper {
|
||||
/** 결합할인여부 수정*/
|
||||
int updateBindDcYn(SubsDetail subDetail);
|
||||
|
||||
/** 청구정보 카운트 조회.*/
|
||||
int selectUserLmtListTotalCnt(UserLmtListReqDto userLmtListReqDto);
|
||||
|
||||
/** 요금제 구매 내역 정보 목록 조회.*/
|
||||
List<UserLmtList> selectBLNCLists(UserLmtListReqDto userLmtListReqDto);
|
||||
/** 요금제 구매 내역 정보 엑셀 목록 조회.*/
|
||||
List<UserLmtList> selectUserLmtListsExcel(UserLmtListExcelReqDto userLmtListExcelReqDto);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Service
|
||||
public class CustMgtService {
|
||||
|
||||
@@ -995,4 +997,74 @@ public class CustMgtService {
|
||||
|
||||
return new InsertUserResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 1. 1.
|
||||
* auth : ckr
|
||||
* desc : 요금제 구매 내역 목록 조회
|
||||
* @param UserLmtListReqDto
|
||||
* @return UserLmtListRestDto
|
||||
* @
|
||||
*/
|
||||
public UserLmtListResDto BLNCList(UserLmtListReqDto userLmtListReqDto) {
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
String nowPage = String.valueOf(userLmtListReqDto.getPage());
|
||||
int totalCnt = custMgtMapper.selectUserLmtListTotalCnt(userLmtListReqDto);
|
||||
if (totalCnt==0) {
|
||||
UserLmtListRes userLmtListRes = new UserLmtListRes();
|
||||
userLmtListRes.setList(new ArrayList<>());
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
userLmtListRes.setPaging(paging);
|
||||
|
||||
return new UserLmtListResDto(ApiResponseCode.CM_NOT_FOUND, userLmtListRes);
|
||||
}
|
||||
|
||||
int page = userLmtListReqDto.getPage();
|
||||
int pagePerRows = userLmtListReqDto.getPagePerRows();
|
||||
page = (page-1) * pagePerRows;
|
||||
userLmtListReqDto.setPage(page);
|
||||
|
||||
//리스트 조회
|
||||
List<UserLmtList> userlmtlist = custMgtMapper.selectBLNCLists(userLmtListReqDto);
|
||||
|
||||
UserLmtListRes userLmtListRes = new UserLmtListRes();
|
||||
userLmtListRes.setList(userlmtlist);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
userLmtListRes.setPaging(paging);
|
||||
|
||||
return new UserLmtListResDto(ApiResponseCode.SUCCESS, userLmtListRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 1. 1.
|
||||
* auth : ckr
|
||||
* desc : 요금제 구매 내역 정보 목록 엑셀 다운로드
|
||||
*
|
||||
* @param userLmtListExcelReqDto
|
||||
* @return UserLmtListExcelResDto
|
||||
*/
|
||||
public UserLmtListExcelResDto userLmtListExcel(@Valid UserLmtListExcelReqDto userLmtListExcelReqDto) {
|
||||
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
UserLmtListRes userLmtListRes = new UserLmtListRes();
|
||||
//리스트 조회
|
||||
List<UserLmtList> userLmtLists = custMgtMapper.selectUserLmtListsExcel(userLmtListExcelReqDto);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setTotalCnt(String.valueOf(userLmtLists.size()));
|
||||
userLmtListRes.setPaging(paging);
|
||||
userLmtListRes.setList(userLmtLists);
|
||||
|
||||
return new UserLmtListExcelResDto(ApiResponseCode.SUCCESS,userLmtListRes);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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 UserLmtList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "이용자일련번호", name = "이용자일련번호", dataType = "String")
|
||||
private String userSeq;
|
||||
@ApiModelProperty(example = "한도년월", name = "한도년월", dataType = "String")
|
||||
private String lmtYm;
|
||||
@ApiModelProperty(example = "요금제확보금액", name = "요금제확보금액", dataType = "String")
|
||||
private String fxlmtamt;
|
||||
@ApiModelProperty(example = "이월금액", name = "이월금액", dataType = "String")
|
||||
private String cfwdAmt;
|
||||
@ApiModelProperty(example = "총사용금액", name = "총사용금액", dataType = "String")
|
||||
private String totalamt;
|
||||
@ApiModelProperty(example = "당월사용금액", name = "당월사용금액", dataType = "String")
|
||||
private String ymuseamt;
|
||||
@ApiModelProperty(example = "잔액", name = "잔액", dataType = "String")
|
||||
private String ymblnc;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
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 UserLmtListExcelReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String startDt;
|
||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String endDt;
|
||||
@ApiModelProperty(example = "청약 상태", name = "청약 상태", notes = "항목 : 전체(Default)/사용(01)/미납중지(02)/일시중지(03)/해지(04)", dataType = "String")
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "유치채널", name = "유치채널", notes = "항목 : 전체(Default)/고객 셀프가입(01)/대리점(02)/고객센터(03)/직접영업(04)", dataType = "String")
|
||||
private String searchType2;
|
||||
@ApiModelProperty(example = "상세검색", name = "상세검색", notes = "항목 : 고객사명(01)/가입번호(02)/서비스ID(03)", dataType = "String")
|
||||
private String searchType3;
|
||||
@ApiModelProperty(example = "검색어 (입력항목)", name = "검색어 (입력항목)", dataType = "String")
|
||||
private String searchText1;
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
private int pagePerRows;
|
||||
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "String")
|
||||
private int page;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
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;
|
||||
|
||||
public class UserLmtListExcelResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private UserLmtListRes data;
|
||||
|
||||
public UserLmtListExcelResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public UserLmtListExcelResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public UserLmtListExcelResDto(ApiResponseCode returnStr, UserLmtListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
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 UserLmtListReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String startDt;
|
||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
|
||||
private String endDt;
|
||||
@ApiModelProperty(example = "청약 상태", name = "청약 상태", notes = "항목 : 전체(Default)/사용(01)/미납중지(02)/일시중지(03)/해지(04)", dataType = "String")
|
||||
private String searchType1;
|
||||
@ApiModelProperty(example = "유치채널", name = "유치채널", notes = "항목 : 전체(Default)/고객 셀프가입(01)/대리점(02)/고객센터(03)/직접영업(04)", dataType = "String")
|
||||
private String searchType2;
|
||||
@ApiModelProperty(example = "상세검색", name = "상세검색", notes = "항목 : 고객사명(01)/가입번호(02)/서비스ID(03)", dataType = "String")
|
||||
private String searchType3;
|
||||
@ApiModelProperty(example = "검색어 (입력항목)", name = "검색어 (입력항목)", dataType = "String")
|
||||
private String searchText1;
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String")
|
||||
private int pagePerRows;
|
||||
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "String")
|
||||
private int page;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.custMgt.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 UserLmtListRes implements Serializable{
|
||||
|
||||
private List<UserLmtList> list;
|
||||
private Paging paging;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
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 UserLmtListResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private UserLmtListRes data;
|
||||
|
||||
public UserLmtListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public UserLmtListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public UserLmtListResDto(ApiResponseCode returnStr, UserLmtListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1143,4 +1143,83 @@
|
||||
WHERE
|
||||
ENTR_NO = #{entrNo}
|
||||
</update>
|
||||
|
||||
<select id="selectBLNCLists" resultType="kr.co.uplus.ez.api.custMgt.dto.UserLmtDto" parameterType="Map" >
|
||||
/* custMgt-mapper.xml(selectSubsLists) */
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
, eci.CUST_SEQ
|
||||
, eul.LMT_YM
|
||||
, eul.FX_LMT_AMT
|
||||
, eul.CFWD_AMT
|
||||
, eul.FX_LMT_AMT + eul.CFWD_AMT AS TOTAL_AMT
|
||||
, eul.SMS_USE_AMT + eul.MMS_USE_AMT + eul.LMS_USE_AMT + eul.MMS_USE_AMT AS YM_USE_AMT
|
||||
, CASE WHEN (eul.FX_LMT_AMT + eul.CFWD_AMT)-(eul.SMS_USE_AMT + eul.MMS_USE_AMT+ eul.LMS_USE_AMT + eul.MMS_USE_AMT) <![CDATA[<]]>0 THEN '-'
|
||||
ELSE (eul.FX_LMT_AMT + eul.CFWD_AMT)-(eul.SMS_USE_AMT + eul.MMS_USE_AMT + eul.LMS_USE_AMT + eul.MMS_USE_AMT)
|
||||
END AS YM_BLNC
|
||||
FROM hubez_admin.EZ_USER_LMT eul
|
||||
INNER JOIN hubez_common.EZ_SUBS_INFO esi on eul.USER_SEQ = esi.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci on esi.CUST_SEQ =eci.CUST_SEQ
|
||||
LEFT JOIN hubez_imdb.EZ_IM_USER eiu on eiu.LOGIN_ID = esi.ATTRCTOR_ID
|
||||
WHERE 1 = 1
|
||||
<if test="startDt != null and startDt != ''">
|
||||
AND eul.REG_DT <![CDATA[ >= ]]> STR_TO_DATE(concat(REPLACE(#{startDt}, '-', '' ),'000000') , '%Y%m%d%H%i%s')
|
||||
</if>
|
||||
<if test="endDt != null and endDt != ''">
|
||||
AND esi.SUBS_STTUS_CD <![CDATA[ <= ]]> STR_TO_DATE(concat(REPLACE(#{endDt}, '-', '' ),'235959'), '%Y%m%d%H%i%s')
|
||||
</if>
|
||||
<if test="searchType1 != null and searchType1 != ''">
|
||||
AND esi.SUBS_STTUS_CD = #{searchType1}
|
||||
</if>
|
||||
<if test="searchType2 != null and searchType2 != ''">
|
||||
<if test="searchType2 == '01'">
|
||||
AND eiu.EX_PROVUSERTYPE is null
|
||||
</if>
|
||||
<if test="searchType2 == '02' ">
|
||||
AND eiu.EX_PROVUSERTYPE = 'DEALER'
|
||||
</if>
|
||||
<if test="searchType2 == '03' ">
|
||||
AND eiu.EX_PROVUSERTYPE in ( 'CCS-CS1'
|
||||
, 'CCS-CB1'
|
||||
, 'CCS-CB2'
|
||||
, 'CCS-CJ'
|
||||
, 'CCS-LS2'
|
||||
, 'CCS-LS3'
|
||||
, 'CCS-M'
|
||||
, 'CCS-MJ'
|
||||
, 'CCS-P'
|
||||
, 'CCS-P2'
|
||||
, 'CCS-D'
|
||||
, 'CCS-G'
|
||||
, 'CCS-S')
|
||||
</if>
|
||||
<if test="searchType2 == '04' ">
|
||||
AND eiu.EX_PROVUSERTYPE not in ( 'CCS-CS1'
|
||||
, 'CCS-CB1'
|
||||
, 'CCS-CB2'
|
||||
, 'CCS-CJ'
|
||||
, 'CCS-LS2'
|
||||
, 'CCS-LS3'
|
||||
, 'CCS-M'
|
||||
, 'CCS-MJ'
|
||||
, 'CCS-P'
|
||||
, 'CCS-P2'
|
||||
, 'CCS-D'
|
||||
, 'CCS-G'
|
||||
, 'CCS-S', 'DEALER')
|
||||
</if>
|
||||
</if>
|
||||
<if test="searchType3 != null and searchType3 != ''">
|
||||
<if test="searchType3 == '01' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.CUST_SEQ) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType3 == '02' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(esi.ENTR_NO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType3 == '03' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.BIZRNO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY eci.CUST_SEQ DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user