mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-06 20:53:52 +09:00
Merge branch '20230314_cashcharge' into develop
This commit is contained in:
@@ -29,10 +29,18 @@ import kr.co.uplus.ez.api.custMgt.dto.AllMemoListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.AllMemoListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.CarryOverListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.CarryOverListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.ChrgDetailReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.ChrgDetailResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.ChrgListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.ChrgListResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteChrgReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.DeleteChrgResDto;
|
||||
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.InsertChrgReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertChrgResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUserReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUserResDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.InsertTestIdReqDto;
|
||||
@@ -55,11 +63,20 @@ 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.UpdateChrgReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UpdateChrgResDto;
|
||||
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.UserListReqDto;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.UserListResDto;
|
||||
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;
|
||||
import lombok.val;
|
||||
|
||||
/**
|
||||
* 고객관리 Controller.
|
||||
@@ -476,5 +493,179 @@ public class CustMgtController {
|
||||
}
|
||||
return custService.duplicateCheckUserId(insertUserReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 목록 조회
|
||||
* @param ChrgListReqDto
|
||||
* @return ChrgListResDto
|
||||
* @
|
||||
*/
|
||||
@ApiOperation(value="chrgList", notes = "충전관리 목록 조회")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value="/chrgList", method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ChrgListResDto chrgList(@RequestBody @Valid ChrgListReqDto chrgListReqDto, BindingResult bindingResult) {
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new ChrgListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.chrgList(chrgListReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 상세 조회
|
||||
* @param ChrgDetailReqDto
|
||||
* @return ChrgDetailResDto
|
||||
* @
|
||||
*/
|
||||
@ApiOperation(value="chrgDetail", notes = "충전관리 목록 조회")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value="/chrgDetail", method = {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public ChrgDetailResDto chrgDetail(@RequestBody @Valid ChrgDetailReqDto chrgDetailReqDto, BindingResult bindingResult) {
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new ChrgDetailResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.chrgDetail(chrgDetailReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 유저ID 목록 조회
|
||||
* @param adminListReqDto
|
||||
*/
|
||||
@ApiOperation(value = "/userList", notes = "관리자ID 목록 조회")
|
||||
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
|
||||
@RequestMapping(value = "userList", method = { RequestMethod.POST })
|
||||
@ResponseBody
|
||||
public UserListResDto userList(@RequestBody @Valid UserListReqDto userListReqDto, BindingResult bindingResult) {
|
||||
|
||||
if (validComponents.validParameter(bindingResult)) {
|
||||
return new UserListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
|
||||
return custService.userList(userListReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 등록
|
||||
* @param paramMap
|
||||
* @return
|
||||
* @
|
||||
*/
|
||||
@ApiOperation(value="insertChrg", notes = "충전관리 등록")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value="/insertChrg", method= {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public InsertChrgResDto insertChrg (@RequestBody @Valid InsertChrgReqDto insertChrgReqDto, BindingResult bindingResult) {
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new InsertChrgResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.InsertChrg(insertChrgReqDto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 수정
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="updateChrg", notes = "충전관리 수정")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value="/updateChrg", method= {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public UpdateChrgResDto updateChrg(@RequestBody @Valid UpdateChrgReqDto updateChrgReqDto, BindingResult bindingResult) {
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new UpdateChrgResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.UpdateChrg(updateChrgReqDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 삭제
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="deleteChrg", notes = "충전관리 수정")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
|
||||
})
|
||||
@RequestMapping(value="/deleteChrg", method= {RequestMethod.POST})
|
||||
@ResponseBody
|
||||
public DeleteChrgResDto deleteChrg(@RequestBody @Valid DeleteChrgReqDto deleteChrgReqDto, BindingResult bindingResult) {
|
||||
|
||||
logger.debug("deleteChrgReqDto={}",deleteChrgReqDto.getList());
|
||||
logger.debug("deleteChrgReqDto={}",deleteChrgReqDto.getList().get(0));
|
||||
|
||||
if(validComponents.validParameter(bindingResult)) {
|
||||
return new DeleteChrgResDto(ApiResponseCode.CM_PARAMETER_ERROR);
|
||||
}
|
||||
return custService.DeleteChrg(deleteChrgReqDto);
|
||||
}
|
||||
|
||||
|
||||
/*2023-03-07 add request 부분
|
||||
*
|
||||
* date : 2023. 1. 1.
|
||||
* auth : won
|
||||
* 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 : won
|
||||
* 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);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package kr.co.uplus.ez.api.custMgt;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.*;
|
||||
import kr.co.uplus.ez.common.data.ImUser;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -106,4 +105,42 @@ public interface CustMgtMapper {
|
||||
/** 결합할인여부 수정*/
|
||||
int updateBindDcYn(SubsDetail subDetail);
|
||||
|
||||
/** 청구정보 카운트 조회.*/
|
||||
int selectUserLmtListTotalCnt(UserLmtListReqDto userLmtListReqDto);
|
||||
|
||||
/** 충전관리 카운트 조회.*/
|
||||
int cntChrgList(ChrgListReqDto chrgListReqDto);
|
||||
/**충전관리 목록 조회*/
|
||||
List<ChrgList> selectChrgList(ChrgListReqDto chrgListReqDto);
|
||||
/** 충전관리 상세 조회 */
|
||||
ChrgDetail selectChrgDetail(ChrgDetailReqDto chrgDetailReqDto);
|
||||
/**유저ID 카운트 조회*/
|
||||
int selectuserTotalCnt(UserListReqDto userListReqDto);
|
||||
/**유저ID 목록 조회*/
|
||||
List<UserinInfo> selectUserList(UserListReqDto userListReqDto);
|
||||
/**이용자 충전번호 */
|
||||
String getChrgSeq();
|
||||
|
||||
/**충전관리 등록 */
|
||||
int insertChrgInfo(ChrgInfo chrgInfo);
|
||||
/**충전관리 수정 */
|
||||
void updateChrg(UpdateChrgReqDto updateChrgReqDto);
|
||||
/**충전관리 수정후 등록 */
|
||||
void addChrg(ChrgInfo chrgInfo);
|
||||
/**충전관리 삭제 */
|
||||
void deleteChrg(DeleteChrgReqDto deleteChrgReqDto);
|
||||
int updateChrgAmt(ChrgAmtDto chrgAmtDto);
|
||||
|
||||
SvcUserInfo selectUserInfo(String register);
|
||||
public String selectSequence(String seqKey);
|
||||
public String selectNotiSeq(); //알림이련seq
|
||||
void insertWebMsgCli(WebMsgCliDto params);
|
||||
void insertNotiHst(NotiHistDto params);
|
||||
|
||||
|
||||
//2023-03-07 add request 부분
|
||||
// /** 요금제 구매 내역 정보 목록 조회.*/
|
||||
// List<UserLmtList> selectBLNCLists(UserLmtListReqDto userLmtListReqDto);
|
||||
// /** 요금제 구매 내역 정보 엑셀 목록 조회.*/
|
||||
// List<UserLmtList> selectBLNCListsExcel(UserLmtListExcelReqDto userLmtListExcelReqDto);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,11 @@ package kr.co.uplus.ez.api.custMgt;
|
||||
import kr.co.uplus.ez.api.custMgt.dto.*;
|
||||
import kr.co.uplus.ez.common.components.HubeasyApiComponents;
|
||||
import kr.co.uplus.ez.common.data.*;
|
||||
import kr.co.uplus.ez.common.utils.CommonUtils;
|
||||
import kr.co.uplus.ez.common.utils.DateUtil;
|
||||
import kr.co.uplus.ez.common.utils.DateUtils;
|
||||
import kr.co.uplus.ez.common.utils.EncryptionUtil;
|
||||
import kr.co.uplus.ez.common.utils.TextUtils;
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
@@ -19,12 +22,17 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Service
|
||||
public class CustMgtService {
|
||||
|
||||
@@ -113,6 +121,10 @@ public class CustMgtService {
|
||||
|
||||
@Value("${mail.templeteCode:E0005}")
|
||||
private String templeteCode;
|
||||
|
||||
public static final String YEAR_MONTH_DAY = "yyyyMMdd";
|
||||
public static final String WEB_REQ_ID = "WEB_REQ_ID";
|
||||
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25. auth : ckr desc : 청약 고객 정보 목록 조회
|
||||
@@ -995,4 +1007,378 @@ public class CustMgtService {
|
||||
|
||||
return new InsertUserResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 목록 조회
|
||||
* @param ChrgListReqDto
|
||||
* @return ChrgListResDto
|
||||
*/
|
||||
public ChrgListResDto chrgList(ChrgListReqDto chrgListReqDto) {
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
String nowPage = String.valueOf(chrgListReqDto.getPage());
|
||||
int totalCnt = custMgtMapper.cntChrgList(chrgListReqDto);
|
||||
logger.debug("getStartDt={}",chrgListReqDto.getStartDt());
|
||||
if (totalCnt == 0) {
|
||||
|
||||
ChrgListRes chrgListRes = new ChrgListRes();
|
||||
chrgListRes.setList(new ArrayList<>());
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
chrgListRes.setPaging(paging);
|
||||
|
||||
return new ChrgListResDto(ApiResponseCode.CM_NOT_FOUND, chrgListRes);
|
||||
}
|
||||
|
||||
int page = chrgListReqDto.getPage();
|
||||
int pagePerRows = chrgListReqDto.getPagePerRows();
|
||||
page = (page - 1) * pagePerRows;
|
||||
chrgListReqDto.setPage(page);
|
||||
|
||||
// Date now = new Date();
|
||||
// String chrgYm = DateUtils.dateToStr(now, "yyyyMM");
|
||||
|
||||
|
||||
List<ChrgList> chrgList= custMgtMapper.selectChrgList(chrgListReqDto);
|
||||
|
||||
|
||||
|
||||
for (int i = 0; i < chrgList.size(); i++) {
|
||||
String startDt = chrgList.get(i).getStrtYm();
|
||||
String endDt = chrgList.get(i).getEndYm();
|
||||
|
||||
chrgList.get(i).setChrgDate(startDt + "~" +endDt);
|
||||
}
|
||||
|
||||
ChrgListRes chrgListRes = new ChrgListRes();
|
||||
chrgListRes.setList(chrgList);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setPage(nowPage);
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
chrgListRes.setPaging(paging);
|
||||
|
||||
return new ChrgListResDto(ApiResponseCode.SUCCESS, chrgListRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 상세 조회
|
||||
* @param ChrgDetailReqDto
|
||||
* @return ChrgDetailResDto
|
||||
*/
|
||||
public ChrgDetailResDto chrgDetail(@Valid ChrgDetailReqDto chrgDetailReqDto) {
|
||||
CustMgtMapper custMgtMapper = sqlSessionSlave.getMapper(CustMgtMapper.class);
|
||||
|
||||
ChrgDetail chrgDetail = custMgtMapper.selectChrgDetail(chrgDetailReqDto);
|
||||
|
||||
if (chrgDetail == null) {
|
||||
return new ChrgDetailResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
// 성공 응답.
|
||||
return new ChrgDetailResDto(ApiResponseCode.SUCCESS, chrgDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* * date : 2023. 3. 15.
|
||||
* * auth : won
|
||||
* * desc : 충전관리 등록
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@Transactional(value="db1TransactionManager")
|
||||
public InsertChrgResDto InsertChrg(@Valid InsertChrgReqDto insertChrgReqDto){
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
int resultcnt = 0;
|
||||
|
||||
// 1. 사용자 유무 확인
|
||||
int getUserIdCount = custMgtMapper.getUserIdCount(insertChrgReqDto.getUserId());
|
||||
|
||||
if (getUserIdCount < 1) {
|
||||
return new InsertChrgResDto(ApiResponseCode.CM_NOT_FOUND);
|
||||
}
|
||||
|
||||
// 3. 충전 정보 등록
|
||||
String chrgSeq = custMgtMapper.getChrgSeq();
|
||||
SvcUserInfo userInfo = custMgtMapper.selectUserInfo(insertChrgReqDto.getUserId());
|
||||
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
UserDetails userDetails = (UserDetails) principal;
|
||||
String regId = userDetails.getUsername();
|
||||
|
||||
logger.debug("insertChrgReqDto= {}", insertChrgReqDto);
|
||||
|
||||
ChrgInfo chrgInfo = new ChrgInfo();
|
||||
chrgInfo.setChrgSeq(chrgSeq);
|
||||
chrgInfo.setUserSeq(userInfo.getUserSeq());
|
||||
chrgInfo.setChrgDiv(insertChrgReqDto.getChrgDiv());
|
||||
String StrYm = insertChrgReqDto.getStrtYm().replace("-", "").substring(0, 6);
|
||||
chrgInfo.setStrtYm(StrYm);
|
||||
String EndYm = insertChrgReqDto.getEndYm().replace("-", "").substring(0, 6);
|
||||
chrgInfo.setEndYm(EndYm);
|
||||
chrgInfo.setChrgAmt(insertChrgReqDto.getChrgAmt());
|
||||
chrgInfo.setRegId(regId); //로그인 ID
|
||||
chrgInfo.setChgId(regId); //로그인 ID
|
||||
|
||||
resultcnt = custMgtMapper.insertChrgInfo(chrgInfo);
|
||||
|
||||
Date now = new Date();
|
||||
String presentYm = DateUtils.dateToStr(now, "yyyyMM");
|
||||
ChrgAmtDto chrgAmtDto = new ChrgAmtDto();
|
||||
|
||||
if (presentYm.equals(StrYm)) {
|
||||
|
||||
if ("E".equals(insertChrgReqDto.getChrgDiv())) {
|
||||
//소멸 충전금 업데이트
|
||||
chrgAmtDto.setUserSeq(userInfo.getUserSeq());
|
||||
chrgAmtDto.setLmtYm(chrgInfo.getStrtYm());
|
||||
chrgAmtDto.setExtcChrgAmt(chrgInfo.getChrgAmt());
|
||||
chrgAmtDto.setCfwdChrgAmt("0");
|
||||
|
||||
}else if ("C".equals(insertChrgReqDto.getChrgDiv())) {
|
||||
//이월 충전금 업데이트
|
||||
chrgAmtDto.setUserSeq(userInfo.getUserSeq());
|
||||
chrgAmtDto.setLmtYm(chrgInfo.getStrtYm());
|
||||
chrgAmtDto.setCfwdChrgAmt(chrgInfo.getChrgAmt());
|
||||
chrgAmtDto.setExtcChrgAmt("0");
|
||||
}
|
||||
if(resultcnt > 0) {
|
||||
resultcnt = custMgtMapper.updateChrgAmt(chrgAmtDto);
|
||||
}else {
|
||||
logger.error("충전금 등록 오류");
|
||||
}
|
||||
|
||||
//update성공시
|
||||
if (resultcnt>0) {
|
||||
String prefix = getCurrentDate(YEAR_MONTH_DAY);
|
||||
String webReqId = "";
|
||||
|
||||
// 1. webReqId 채번
|
||||
webReqId = prefix + custMgtMapper.selectSequence(WEB_REQ_ID);
|
||||
BigDecimal chargeAmt= BigDecimal.ZERO;
|
||||
BigDecimal zero = BigDecimal.ZERO;
|
||||
|
||||
//충전 금액 조회
|
||||
chargeAmt = new BigDecimal(chrgInfo.getChrgAmt());
|
||||
//알림문자 발송테이블 insert
|
||||
WebMsgCliDto ezMsgDto = new WebMsgCliDto();
|
||||
ezMsgDto.setTableName("EZ_MSG_REAL");
|
||||
ezMsgDto.setTrafficType("real");
|
||||
String clientKey = generateClientKey("R", 10);
|
||||
ezMsgDto.setClientKey(clientKey);
|
||||
ezMsgDto.setReqProduct("LMS");
|
||||
ezMsgDto.setMsgStatus("ready");
|
||||
ezMsgDto.setCallbackNumber("15445992");
|
||||
ezMsgDto.setPhone(userInfo.getHpNo());
|
||||
ezMsgDto.setWebReqId(webReqId);
|
||||
ezMsgDto.setOrderId("2");
|
||||
|
||||
String msg = "[LG U+메시지허브이지]\n이번 달 이벤트 충전 금액이 충전 되었습니다.\n*충전 금액 : "+chargeAmt+"원";
|
||||
ezMsgDto.setMsg(msg);
|
||||
|
||||
custMgtMapper.insertWebMsgCli(ezMsgDto);
|
||||
logger.info("충전 알림 등록 : [{}]", ezMsgDto.toString());
|
||||
|
||||
//알림 이력 insert
|
||||
NotiHistDto notihist = new NotiHistDto();
|
||||
String notiSeq = custMgtMapper.selectNotiSeq();
|
||||
notihist.setUserSeq(userInfo.getUserSeq());
|
||||
notihist.setNotiSeq(notiSeq);
|
||||
notihist.setNotiMsg(msg);
|
||||
notihist.setWebReqId(webReqId);
|
||||
|
||||
custMgtMapper.insertNotiHst(notihist);
|
||||
logger.info("충전 알림 이력 등록 : [{}]", ezMsgDto.toString());
|
||||
}else{
|
||||
logger.error("충전금 한도 업데이트 오류");
|
||||
}
|
||||
}
|
||||
return new InsertChrgResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 수정
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public UpdateChrgResDto UpdateChrg(@Valid UpdateChrgReqDto updateChrgReqDto) {
|
||||
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
|
||||
// 1. 사용여부 update
|
||||
custMgtMapper.updateChrg(updateChrgReqDto);
|
||||
|
||||
// 2. 새 정보 insert
|
||||
String chrgSeq = custMgtMapper.getChrgSeq();
|
||||
SvcUserInfo userInfo = custMgtMapper.selectUserInfo(updateChrgReqDto.getUserId());
|
||||
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||
UserDetails userDetails = (UserDetails) principal;
|
||||
String regId = userDetails.getUsername();
|
||||
|
||||
logger.debug("updateChrgReqDto= {}", updateChrgReqDto);
|
||||
|
||||
ChrgInfo chrgInfo = new ChrgInfo();
|
||||
chrgInfo.setChrgSeq(chrgSeq);
|
||||
chrgInfo.setUserSeq(userInfo.getUserSeq());
|
||||
chrgInfo.setChrgDiv(updateChrgReqDto.getChrdDiv());
|
||||
String StrYm = updateChrgReqDto.getStrtYm().replace("-", "").substring(0, 6);
|
||||
chrgInfo.setStrtYm(StrYm);
|
||||
String EndYm = updateChrgReqDto.getEndYm().replace("-", "").substring(0, 6);
|
||||
chrgInfo.setEndYm(EndYm);
|
||||
chrgInfo.setChrgAmt(updateChrgReqDto.getChrgAmt());
|
||||
chrgInfo.setRegId(regId); //로그인 ID
|
||||
chrgInfo.setChgId(regId); //로그인 ID
|
||||
|
||||
custMgtMapper.addChrg(chrgInfo);
|
||||
|
||||
return new UpdateChrgResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2023. 3. 15.
|
||||
* auth : won
|
||||
* desc : 충전관리 삭제
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public DeleteChrgResDto DeleteChrg(@Valid DeleteChrgReqDto deleteChrgReqDto) {
|
||||
|
||||
logger.debug("deleteChrgReqDto={}",deleteChrgReqDto);
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
custMgtMapper.deleteChrg(deleteChrgReqDto);
|
||||
return new DeleteChrgResDto(ApiResponseCode.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* date : 2022. 4. 25.
|
||||
* auth : ckr
|
||||
* desc : 유저ID 목록 조회
|
||||
* @param userListReqDto
|
||||
* @return
|
||||
*/
|
||||
public UserListResDto userList(UserListReqDto userListReqDto) {
|
||||
CustMgtMapper custMgtMapper = sqlSessionMaster.getMapper(CustMgtMapper.class);
|
||||
int totalCnt = custMgtMapper.selectuserTotalCnt(userListReqDto);
|
||||
|
||||
if(totalCnt == 0) {
|
||||
UserListRes userListRes = new UserListRes();
|
||||
userListRes.setList(new ArrayList<>());
|
||||
return new UserListResDto(ApiResponseCode.CM_NOT_FOUND, userListRes);
|
||||
}
|
||||
|
||||
List<UserinInfo> userinInfo = custMgtMapper.selectUserList(userListReqDto);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setTotalCnt(String.valueOf(totalCnt));
|
||||
|
||||
UserListRes userListRes = new UserListRes();
|
||||
userListRes.setList(userinInfo);
|
||||
|
||||
return new UserListResDto(ApiResponseCode.SUCCESS, userListRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 날짜 형식을 받아서 오늘 날짜를 해당 형식으로 반환
|
||||
*
|
||||
* @param format
|
||||
* @return
|
||||
*/
|
||||
public String getCurrentDate(String format) {
|
||||
Date date = Calendar.getInstance().getTime();
|
||||
DateFormat dateFormat = new SimpleDateFormat(format);
|
||||
return dateFormat.format(date);
|
||||
}
|
||||
|
||||
/**
|
||||
* clientKey 생성
|
||||
*
|
||||
* @param rsvtType
|
||||
* @return
|
||||
*/
|
||||
public String generateClientKey(String lineTpCdKey, int length) {
|
||||
String prefix = DateUtil.getCurrentDate("yyyyMMddHHmmss") + lineTpCdKey;
|
||||
String clientKey = "";
|
||||
|
||||
clientKey = CommonUtils.getCommonId(prefix, length);
|
||||
|
||||
return clientKey;
|
||||
}
|
||||
|
||||
/* 2023-03-07 add request 부분
|
||||
* date : 2023. 1. 1.
|
||||
* auth : won
|
||||
* 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 : won
|
||||
* 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.selectBLNCListsExcel(userLmtListExcelReqDto);
|
||||
|
||||
Paging paging = new Paging();
|
||||
paging.setTotalCnt(String.valueOf(userLmtLists.size()));
|
||||
userLmtListRes.setPaging(paging);
|
||||
userLmtListRes.setList(userLmtLists);
|
||||
|
||||
return new UserLmtListExcelResDto(ApiResponseCode.SUCCESS,userLmtListRes);
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
25
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgAmtDto.java
Normal file
25
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgAmtDto.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class ChrgAmtDto implements Serializable{
|
||||
|
||||
/** 충전 SEQUENCE */
|
||||
private String chrgSeq;
|
||||
/** 유저 SEQUENCE */
|
||||
private String userSeq;
|
||||
/** 한도년월 */
|
||||
private String lmtYm;
|
||||
/** 충전 시작년월 */
|
||||
private String strtYm;
|
||||
/** 충전구분 */
|
||||
private String chrgDiv;
|
||||
/** 소멸 충전금 */
|
||||
private String extcChrgAmt;
|
||||
/** 이월 충전금 */
|
||||
private String cfwdChrgAmt;
|
||||
}
|
||||
15
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDelete.java
Normal file
15
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDelete.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ChrgDelete implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
|
||||
private String useYn;
|
||||
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
|
||||
private String chrgSeq;
|
||||
}
|
||||
30
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetail.java
Normal file
30
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetail.java
Normal file
@@ -0,0 +1,30 @@
|
||||
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 ChrgDetail implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "고객명", name = "고객명", dataType = "String")
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String")
|
||||
private String chrgDiv;
|
||||
@ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String")
|
||||
private String strtYm;
|
||||
@ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String")
|
||||
private String endYm;
|
||||
@ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String")
|
||||
private String chrgAmt;
|
||||
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
|
||||
private String useYn;
|
||||
@ApiModelProperty(example = "사업자명", name = "사업자명", dataType = "String")
|
||||
private String bizrNo;
|
||||
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
|
||||
private String chrgSeq;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
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 ChrgDetailReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
|
||||
private String chrgSeq;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import kr.co.uplus.ez.common.data.ApiResponseCode;
|
||||
import kr.co.uplus.ez.common.data.ResponseMessage;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class ChrgDetailResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "데이터")
|
||||
private ChrgDetail data;
|
||||
|
||||
public ChrgDetailResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public ChrgDetailResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public ChrgDetailResDto(ApiResponseCode returnStr, ChrgDetail data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
33
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgInfo.java
Normal file
33
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgInfo.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class ChrgInfo implements Serializable{
|
||||
|
||||
/** 충전 SEQUENCE */
|
||||
private String chrgSeq;
|
||||
/** 유저 SEQUENCE */
|
||||
private String userSeq;
|
||||
/** 충전구분 */
|
||||
private String chrgDiv;
|
||||
/** 충전 시작년월 */
|
||||
private String strtYm;
|
||||
/** 충전 종료년월 */
|
||||
private String endYm;
|
||||
/** 충전금액 */
|
||||
private String chrgAmt;
|
||||
/** 사용여부 */
|
||||
private String useYn;
|
||||
/** 등록_ID . */
|
||||
private String regId;
|
||||
/** 등록_일시 . */
|
||||
private String regDt;
|
||||
/** 변경_ID . */
|
||||
private String chgId;
|
||||
/** 변경_일시 . */
|
||||
private String chgDt;
|
||||
}
|
||||
34
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgList.java
Normal file
34
src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgList.java
Normal file
@@ -0,0 +1,34 @@
|
||||
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 ChrgList implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "리스트 번호", name = "리스트 번호", dataType = "Integer")
|
||||
private Integer no;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "고객명", name = "고객명", dataType = "String")
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String")
|
||||
private String chrgDiv;
|
||||
@ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String")
|
||||
private String strtYm;
|
||||
@ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String")
|
||||
private String endYm;
|
||||
@ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String")
|
||||
private String chrgAmt;
|
||||
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
|
||||
private String useYn;
|
||||
@ApiModelProperty(example = "사업자명", name = "사업자명", dataType = "String")
|
||||
private String bizrNo;
|
||||
@ApiModelProperty(example = "충전기간", name = "충전기간", dataType = "String")
|
||||
private String chrgDate;
|
||||
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
|
||||
private String chrgSeq;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
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 ChrgListReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMM", dataType = "String")
|
||||
private String startDt;
|
||||
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMM", dataType = "String")
|
||||
private String endDt;
|
||||
@ApiModelProperty(example = "상세검색", name = "상세검색", notes = "항목 : 고객사명(01)/가입번호(02)/서비스ID(03)", dataType = "String")
|
||||
private String searchType1;
|
||||
@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 ChrgListRes implements Serializable{
|
||||
|
||||
private Paging paging;
|
||||
private List<ChrgList> list;
|
||||
}
|
||||
@@ -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 ChrgListResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private ChrgListRes data;
|
||||
|
||||
public ChrgListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public ChrgListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public ChrgListResDto(ApiResponseCode returnStr, ChrgListRes data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class DeleteChrgReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
|
||||
private String useYn;
|
||||
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
|
||||
private String chrgSeq;
|
||||
|
||||
private List<ChrgDelete> list;
|
||||
}
|
||||
@@ -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 DeleteChrgResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private Object data;
|
||||
|
||||
public DeleteChrgResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public DeleteChrgResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public DeleteChrgResDto(ApiResponseCode returnStr, Object data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class InsertChrgReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "관리자 ID", name = "관리자 ID", dataType = "String")
|
||||
private String adminId;
|
||||
@ApiModelProperty(example = "리스트 번호", name = "리스트 번호", dataType = "Integer")
|
||||
private Integer no;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "고객명", name = "고객명", dataType = "String")
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String")
|
||||
private String chrgDiv;
|
||||
@ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String")
|
||||
private String strtYm;
|
||||
@ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String")
|
||||
private String endYm;
|
||||
@ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String")
|
||||
private String chrgAmt;
|
||||
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
|
||||
private String useYn;
|
||||
@ApiModelProperty(example = "사업자명", name = "사업자명", dataType = "String")
|
||||
private String bizrNo;
|
||||
|
||||
|
||||
}
|
||||
@@ -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 InsertChrgResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private InsertChrgResDto data;
|
||||
|
||||
public InsertChrgResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public InsertChrgResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public InsertChrgResDto(ApiResponseCode returnStr, InsertChrgResDto data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class NotiHistDto implements Serializable {
|
||||
private String sndYmd; //알림일자
|
||||
private String userSeq; //유저seq
|
||||
private String notiDiv; //알림구분
|
||||
private String notiSeq; //알림seq
|
||||
private String notiMsg; //알림 메세지
|
||||
private String webReqId;//알림전송id
|
||||
private String regDt; //알림등록일자
|
||||
|
||||
/** 부모 유저 일련번호 */
|
||||
private String prntsUserSeq;
|
||||
|
||||
/** 등록 일 시 */
|
||||
private String regId;
|
||||
|
||||
/** 핸드폰 번호 */
|
||||
private String hpNo;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
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 TargetSubsInfoDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "청약ID", name = "청약ID", dataType = "String")
|
||||
private String subsId;
|
||||
@ApiModelProperty(example = "청약한 관리자ID userSeq", name = "청약한 관리자ID userSeq", dataType = "String")
|
||||
private String userSeq;
|
||||
@ApiModelProperty(example = "개통일시", name = "개통일시", dataType = "String")
|
||||
private String opnDt;
|
||||
@ApiModelProperty(example = "한도생성월", name = "한도생성월", dataType = "String")
|
||||
private String limitYm;
|
||||
@ApiModelProperty(example = "이월처리기간(월)", name = "이월처리기간(월)", dataType = "String")
|
||||
private String cFwdTermMonth;
|
||||
@ApiModelProperty(example = "청약상태", name = "청약상태", dataType = "String")
|
||||
private String subsSttusCd;
|
||||
@ApiModelProperty(example = "사용자 전화번호", name = "사용자 전화번호", dataType = "String")
|
||||
private String hpNo;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
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 UpdateChrgReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "고객명", name = "고객명", dataType = "String")
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "충전구분", name = "충전구분", dataType = "String")
|
||||
private String chrdDiv;
|
||||
@ApiModelProperty(example = "충전시작일", name = "충전시작일", dataType = "String")
|
||||
private String strtYm;
|
||||
@ApiModelProperty(example = "충전종료일", name = "충전종료일", dataType = "String")
|
||||
private String endYm;
|
||||
@ApiModelProperty(example = "충전금액", name = "충전금액", dataType = "String")
|
||||
private String chrgAmt;
|
||||
@ApiModelProperty(example = "사용여부", name = "사용여부", dataType = "String")
|
||||
private String useYn;
|
||||
@ApiModelProperty(example = "사업자명", name = "사업자명", dataType = "String")
|
||||
private String bizrNo;
|
||||
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
|
||||
private String chrgSeq;
|
||||
|
||||
}
|
||||
@@ -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 UpdateChrgResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
private Object data;
|
||||
|
||||
public UpdateChrgResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public UpdateChrgResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public UpdateChrgResDto(ApiResponseCode returnStr, Object data) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
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 UserListReqDto implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "검색어", name = "검색어", dataType = "String")
|
||||
private String searchText1;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class UserListRes {
|
||||
|
||||
List<UserinInfo> list;
|
||||
}
|
||||
@@ -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 UserListResDto extends ResponseMessage implements Serializable{
|
||||
|
||||
// 데이터.
|
||||
private UserListRes data;
|
||||
|
||||
public UserListResDto() {
|
||||
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
|
||||
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
|
||||
}
|
||||
|
||||
public UserListResDto(ApiResponseCode returnStr) {
|
||||
this.retCode = returnStr.getResultCode();
|
||||
this.retMsg = returnStr.getResultMsg();
|
||||
}
|
||||
|
||||
public UserListResDto(ApiResponseCode returnStr, UserListRes 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 UserLmtList implements Serializable {
|
||||
|
||||
@ApiModelProperty(example = "리스트 번호", name = "리스트 번호", dataType = "Integer")
|
||||
private Integer no;
|
||||
@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;
|
||||
}
|
||||
|
||||
}
|
||||
23
src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserinInfo.java
Normal file
23
src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserinInfo.java
Normal file
@@ -0,0 +1,23 @@
|
||||
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 UserinInfo implements Serializable{
|
||||
|
||||
@ApiModelProperty(example = "고객명", name = "고객명", dataType = "String")
|
||||
private String userId;
|
||||
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")
|
||||
private String custNm;
|
||||
@ApiModelProperty(example = "유저seq", name = "유저seq", dataType = "String")
|
||||
private String userSeq;
|
||||
@ApiModelProperty(example = "이용자 상태 코드", name = "이용자 상태 코드", dataType = "String")
|
||||
private String userSttusCd;
|
||||
@ApiModelProperty(example = "이용자 유형 코드", name = "이용자 유형 코드", dataType = "String")
|
||||
private String userTpCd;
|
||||
|
||||
}
|
||||
162
src/main/java/kr/co/uplus/ez/api/custMgt/dto/WebMsgCliDto.java
Normal file
162
src/main/java/kr/co/uplus/ez/api/custMgt/dto/WebMsgCliDto.java
Normal file
@@ -0,0 +1,162 @@
|
||||
package kr.co.uplus.ez.api.custMgt.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class WebMsgCliDto implements Serializable{
|
||||
|
||||
/** 테이블명 */
|
||||
private String tableName;
|
||||
|
||||
/** DB insert시 App에서 생성해서 만듦. format example : datetime + bsiness name + random string */
|
||||
private String clientKey;
|
||||
|
||||
/** 문자 : SMS, LMS, MMS, 글로벌SMS : SMS_GLOBAL, RCS : RCS, 카카오톡 : KKO_NOTI (알림톡), KKO_FRIEND (친구톡) */
|
||||
private String reqProduct;
|
||||
|
||||
/** 메시지 유형 ( 기본값 normal ), real : 실시간 보장 중요한 메시지, normal : 일반, ad : 마케팅, 광고 */
|
||||
private String trafficType;
|
||||
|
||||
/** req : 발송 대기, sent : 발송완료, complete : 결과 수신 완료, pre-send : select 완료, pre-image : 이미지 등록 작업 중 */
|
||||
private String msgStatus;
|
||||
|
||||
/** 고객 요청 시간, 미래시간일 경우 예약 */
|
||||
private String reqDate;
|
||||
|
||||
/** 메시지허브에서 사용하는 템플릿 키 */
|
||||
private String templateCode;
|
||||
|
||||
/** 동보 발송 묶음 단위, Agent에서 발송 시 multi_key가 동일한 메시지는 묶어서 발송하여 발송 효율을 높입니다. */
|
||||
private String sendGroupKey;
|
||||
|
||||
/** 문자, RCS 일 때 필수 입력, 발신번호(*특수부가사업자의 경우 필수 아님) */
|
||||
private String callbackNumber;
|
||||
|
||||
/** KISA 최초발신사업자 구분 코드, 직접고객은 config에 있는 값으로 사용, 재판매고객은 건별 입력으로 사용 */
|
||||
private String msgBizKey;
|
||||
|
||||
/** 태그, 이벤트, 캠페인 등을 분류하기 위한 용도로 사용 */
|
||||
private String tag;
|
||||
|
||||
/** 부서코드, 부서별 빌링이 필요한 경우만 사용 */
|
||||
private String deptCode;
|
||||
|
||||
/** 메시지 내용 (text) */
|
||||
private String msg;
|
||||
|
||||
/** 수신번호 */
|
||||
private String phone;
|
||||
|
||||
/** 가변 데이터 */
|
||||
private String mergeData;
|
||||
|
||||
/** 제목, 대상상품 : LMS/MMS/RCS/PUSH */
|
||||
private String title;
|
||||
|
||||
/** MMS 파일 절대 경로, ","로 구분되어 N개를 입력할 수 있다. */
|
||||
private String fileList;
|
||||
|
||||
/** 상품, SMS/LMS/MMS 만 가능 */
|
||||
private String fbProduct;
|
||||
|
||||
/** fallback 제목 */
|
||||
private String fbTitle;
|
||||
|
||||
/** fallback 메시지 */
|
||||
private String fbMsg;
|
||||
|
||||
/** 파일 아이디 단일파일 제공, fallback MMS는 이미지 사전 등록 방식만 제공함 */
|
||||
private String fbFileId;
|
||||
|
||||
/** 메시지베이스 ID */
|
||||
private String rcsMsgbaseId;
|
||||
|
||||
/** RCS 메시지 유형, info : 정보성 메시지, ad : 광고성 메시지 */
|
||||
private String rcsHeader;
|
||||
|
||||
/** 무료수신거부 번호 (header의 값이 광고성일 때 footer 값을 포함하지 않고 발송하면 실패 처리) */
|
||||
private String rcsFooter;
|
||||
|
||||
/** 사용자의 복사/공유 허용여부, 기본값 Y, Y : 허용, N : 미허용 */
|
||||
private String rcsCopyAllowed;
|
||||
|
||||
/** 발송 타임아웃 옵션 : 옵션의 시간 만큼 발송을 시도 또는 결과 대기함, 1 : 72시간, 2 :30초 */
|
||||
private String rcsExpiryOption;
|
||||
|
||||
/*
|
||||
* 대행사 ID, 메시지허브와 직접 계약한 고객은 사용하지 않음,
|
||||
* 재판매 사업자의 경우 RCS 브랜드 사업자와 RCS 발송 계약을 맺은 1차 대행사의 id를 넣어야 함
|
||||
*/
|
||||
private String rcsAgencyId;
|
||||
|
||||
/** RCS 버튼 Object array */
|
||||
private String rcsButton;
|
||||
|
||||
/** 카카오톡 발신 프로필키 */
|
||||
private String kakaoSenderKey;
|
||||
|
||||
/** 알림톡, 친구톡 템플릿 키 */
|
||||
private String kakaoTemplateKey;
|
||||
|
||||
/** 카카오 버튼 Object array(LMKakaoButton) */
|
||||
private String kakaoButton;
|
||||
|
||||
/** 친구톡 와이드 이미지 여부(Y/N) */
|
||||
private String kakaoImageWideYn;
|
||||
|
||||
/** 친구톡 이미지(이미지 URL) */
|
||||
private String kakaoImageUrl;
|
||||
|
||||
/** 친구톡 이미지(이미지 링크) */
|
||||
private String kakaoImageLink;
|
||||
|
||||
/** kakao 파일 아이디 */
|
||||
private String kakaoFileId;
|
||||
|
||||
/** 광고 표기 여부(Y/N) */
|
||||
private String kakaoAdFlag;
|
||||
|
||||
/** 앱 아이디 */
|
||||
private String pushAppId;
|
||||
|
||||
/** PUSH 공급자, FCM : 구글, APNS : 애플 */
|
||||
private String pushProvider;
|
||||
|
||||
/** 앱 사용자 시 사용되는 아이디 */
|
||||
private String pushAppUserId;
|
||||
|
||||
/** 발송 시간, Agent가 메시지허브로 발송 한 시간 */
|
||||
private String sentDate;
|
||||
|
||||
/** 성공한 상품 종류, SMS, LMS, MMS, RCS_XXX, KKO_XXX, PUSH */
|
||||
private String doneProduct;
|
||||
|
||||
/** 단말 전달 시간 or 실패 최종 시간 */
|
||||
private String doneDate;
|
||||
|
||||
/** 처리 결과 코드, 10000 : 성공 */
|
||||
private String doneCode;
|
||||
|
||||
/** 처리 결과 상세 */
|
||||
private String doneCodeDesc;
|
||||
|
||||
/** 대체 발송 처리 상세. json array */
|
||||
private String doneFbDetail;
|
||||
|
||||
/** 이통사 정보, 발송이 성공이고 채널이 문자, RCS 인 경우만 업데이트 됨 */
|
||||
private String doneTelco;
|
||||
|
||||
/** 웹요청ID */
|
||||
private String webReqId;
|
||||
|
||||
/* 승인오더ID */
|
||||
private String orderId;
|
||||
|
||||
private String tmpltSbst;
|
||||
private String tmpltTpCd;
|
||||
private String etcInfo;
|
||||
private String adMsg;
|
||||
}
|
||||
@@ -101,6 +101,7 @@ public class HomeMgtService {
|
||||
homeMgtMapper.insertNotice(insertNoticeReqDto);
|
||||
NT_NO = homeMgtMapper.insertNoticeNtNo();
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
return new InsertNoticeResDto(ApiResponseCode.CM_DB_QUERY_ERR);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,12 @@ public class InsertNoticeReqDto implements Serializable {
|
||||
@ApiModelProperty(example = "사용 여부", name = "사용 여부", dataType = "String")
|
||||
private String useYn;
|
||||
|
||||
@ApiModelProperty(example = "시작일자", name = "시작일자", dataType = "Int")
|
||||
private String ntStrtDt;
|
||||
|
||||
@ApiModelProperty(example = "종료일자", name = "종료일자", dataType = "Int")
|
||||
private String ntEndDt;
|
||||
|
||||
@ApiModelProperty(example = "등록 ID", name = "등록 ID", dataType = "String")
|
||||
private String regId;
|
||||
|
||||
|
||||
@@ -41,6 +41,12 @@ public class NoticeDto implements Serializable {
|
||||
@ApiModelProperty(example = "조회수", name = "조회수", dataType = "Int")
|
||||
private String retvCnt;
|
||||
|
||||
@ApiModelProperty(example = "시작일자", name = "시작일자", dataType = "Int")
|
||||
private String ntStrtDt;
|
||||
|
||||
@ApiModelProperty(example = "종료일자", name = "종료일자", dataType = "Int")
|
||||
private String ntEndDt;
|
||||
|
||||
@ApiModelProperty(example = "등록 ID", name = "등록 ID", dataType = "String")
|
||||
private String regId;
|
||||
|
||||
|
||||
@@ -32,6 +32,12 @@ public class NoticeListReqDto implements Serializable {
|
||||
@ApiModelProperty(example = "사용 여부", name = "사용 여부", dataType = "String")
|
||||
private String useYn;
|
||||
|
||||
@ApiModelProperty(example = "시작일자", name = "시작일자", dataType = "Int")
|
||||
private String ntStrtDt;
|
||||
|
||||
@ApiModelProperty(example = "종료일자", name = "종료일자", dataType = "Int")
|
||||
private String ntEndDt;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "페이지당 조회할 목록 수",notes = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "int")
|
||||
private int pagePerRows;
|
||||
|
||||
@@ -33,6 +33,12 @@ public class UpdateNoticeReqDto implements Serializable {
|
||||
@ApiModelProperty(example = "변경 ID", name = "변경 ID", dataType = "String")
|
||||
private String chgId;
|
||||
|
||||
@ApiModelProperty(example = "시작일자", name = "시작일자", dataType = "Int")
|
||||
private String ntStrtDt;
|
||||
|
||||
@ApiModelProperty(example = "종료일자", name = "종료일자", dataType = "Int")
|
||||
private String ntEndDt;
|
||||
|
||||
@ApiModelProperty(example = "업로드된 파일", name = "업로드된 파일", dataType = "String")
|
||||
private String legacyFiles;
|
||||
|
||||
|
||||
477
src/main/java/kr/co/uplus/ez/common/utils/CommonUtils.java
Normal file
477
src/main/java/kr/co/uplus/ez/common/utils/CommonUtils.java
Normal file
@@ -0,0 +1,477 @@
|
||||
package kr.co.uplus.ez.common.utils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.text.DateFormat;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
public class CommonUtils {
|
||||
/*============================ 문자열관련 Util ============================*/
|
||||
/**
|
||||
* 문자열이 null일 경우 기본값으로 반환하는 메소드
|
||||
*
|
||||
* @param String string : 검사할 문자열
|
||||
* @param String defaultValue : 기본값
|
||||
* @return String : 반환값
|
||||
* @throws Exception : 반환 중 예외 발생시
|
||||
*/
|
||||
public static String nvl(String string, String defaultValue) throws Exception{
|
||||
return getString(string, defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 문자열이 널일경우 ""으로 반환하는 메소드
|
||||
*
|
||||
* @param String string : 검사할 문자열
|
||||
* @return String : 결과값
|
||||
*/
|
||||
public static String nvl(String string){
|
||||
return getString(string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Object를 받아 문자열 값으로 리턴함.
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
public static String getString(Object obj) {
|
||||
return getString(obj,"");
|
||||
}
|
||||
|
||||
/**
|
||||
* Object를 받아 문자열 값으로 리턴함, 없을경우 DefaultValue 리턴.
|
||||
* @param obj
|
||||
* @param defaultValue
|
||||
* @return
|
||||
*/
|
||||
public static String getString(Object obj, String defaultValue) {
|
||||
String value = "" + obj;
|
||||
try {
|
||||
if(obj == null) {
|
||||
value = defaultValue;
|
||||
} else {
|
||||
if(value.equals("null") || value.length() == 0) {
|
||||
value = defaultValue;
|
||||
}
|
||||
}
|
||||
} catch(Exception e){
|
||||
value = defaultValue;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 기능 : 에러대신 Zero String을 리턴하는 substring 함수 <BR>
|
||||
* (예) getSubstring("1234",4,2) --> "" <BR>
|
||||
* @param String str string source
|
||||
* @param int start substring 시작위치
|
||||
* @param int length substring 길이
|
||||
* @return String
|
||||
*/
|
||||
public static String getSubstring(String str, int start, int len){
|
||||
String result = null;
|
||||
int slen = 0;
|
||||
|
||||
try{
|
||||
str = nvl(str);
|
||||
slen = str.length();
|
||||
|
||||
if((slen < 1) || (start < 0) || (len < 1)){
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if((slen - 1) < start){
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if(slen >= (start + len)){
|
||||
slen = start+len;
|
||||
}
|
||||
|
||||
result = str.substring(start, slen);
|
||||
}
|
||||
catch(Exception e){
|
||||
result = "";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 숫자나 문자열ㅇ르 Int형 문자로 변환
|
||||
* @param object
|
||||
* @return
|
||||
*/
|
||||
public static String getIntString(Object object) {
|
||||
String returnString = "";
|
||||
if(object==null) return returnString;
|
||||
returnString = String.valueOf(object);
|
||||
if("".equals(returnString)) return returnString;
|
||||
try {
|
||||
Double doubleValue = Double.valueOf(returnString);
|
||||
DecimalFormat df = new DecimalFormat( "#,###" );
|
||||
return df.format(doubleValue);
|
||||
} catch(Exception e) {
|
||||
returnString = String.valueOf(object);
|
||||
}
|
||||
return returnString;
|
||||
}
|
||||
|
||||
/**
|
||||
* 숫자나 문자열ㅇ르 Int형 문자로 변환
|
||||
* @param object
|
||||
* @return
|
||||
*/
|
||||
public static String getIntString(Object object, String str) {
|
||||
String returnString = "";
|
||||
if(object==null) return str;
|
||||
returnString = String.valueOf(object);
|
||||
if(returnString == "") return returnString;
|
||||
try {
|
||||
Double doubleValue = Double.valueOf(returnString);
|
||||
DecimalFormat df = new DecimalFormat( "#,###" );
|
||||
return df.format(doubleValue);
|
||||
} catch(Exception e) {
|
||||
returnString = String.valueOf(object);
|
||||
}
|
||||
return returnString;
|
||||
}
|
||||
|
||||
/**
|
||||
* 숫자나 문자열ㅇ르 Int형 문자로 변환 (소숫점 2자리)
|
||||
* @param object
|
||||
* @return
|
||||
*/
|
||||
public static String getDoubleString(Object object) {
|
||||
String returnString = "";
|
||||
if(object==null) return returnString;
|
||||
returnString = String.valueOf(object);
|
||||
if(returnString == "") return returnString;
|
||||
try {
|
||||
Double doubleValue = Double.valueOf(returnString);
|
||||
DecimalFormat df = new DecimalFormat( "#,###.##" );
|
||||
return df.format(doubleValue);
|
||||
} catch(Exception e) {
|
||||
returnString = String.valueOf(object);
|
||||
}
|
||||
return returnString;
|
||||
}
|
||||
|
||||
/**
|
||||
* 숫자나 문자열ㅇ르 Int형 문자로 변환 (소숫점 2자리)
|
||||
* @param object
|
||||
* @return
|
||||
*/
|
||||
public static String getDoubleString(Object object, String str) {
|
||||
String returnString = "";
|
||||
if(object==null) return str;
|
||||
returnString = String.valueOf(object);
|
||||
if(returnString == "") return returnString;
|
||||
try {
|
||||
Double doubleValue = Double.valueOf(returnString);
|
||||
DecimalFormat df = new DecimalFormat( "#,###.##" );
|
||||
return df.format(doubleValue);
|
||||
} catch(Exception e) {
|
||||
//
|
||||
returnString = String.valueOf(object);
|
||||
}
|
||||
return returnString;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* String UnEscape 처리
|
||||
*
|
||||
* @param src
|
||||
* @return
|
||||
*/
|
||||
public static String unescape(String src) {
|
||||
StringBuffer tmp = new StringBuffer();
|
||||
tmp.ensureCapacity(src.length());
|
||||
int lastPos = 0, pos = 0;
|
||||
char ch;
|
||||
while (lastPos < src.length()) {
|
||||
pos = src.indexOf("%", lastPos);
|
||||
if (pos == lastPos) {
|
||||
if (src.charAt(pos + 1) == 'u') {
|
||||
ch = (char) Integer.parseInt(src
|
||||
.substring(pos + 2, pos + 6), 16);
|
||||
tmp.append(ch);
|
||||
lastPos = pos + 6;
|
||||
} else {
|
||||
ch = (char) Integer.parseInt(src
|
||||
.substring(pos + 1, pos + 3), 16);
|
||||
tmp.append(ch);
|
||||
lastPos = pos + 3;
|
||||
}
|
||||
} else {
|
||||
if (pos == -1) {
|
||||
tmp.append(src.substring(lastPos));
|
||||
lastPos = src.length();
|
||||
} else {
|
||||
tmp.append(src.substring(lastPos, pos));
|
||||
lastPos = pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
return tmp.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Object -> int
|
||||
*/
|
||||
public static int getInt (Object quan) throws Exception{
|
||||
String strValue = getString(quan);
|
||||
int value = 0;
|
||||
try{
|
||||
value = Integer.valueOf(strValue);
|
||||
}catch(Exception e){
|
||||
}
|
||||
return value;
|
||||
}
|
||||
/*============================ 문자열관련 Util 끝 ============================*/
|
||||
|
||||
/**
|
||||
* 공통ID 생성(템플릿ID, 프로젝트ID, 사용자ID 등등)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getCommonId(String prefix, int len) {
|
||||
// 공통 ID 접미사
|
||||
String suffix = randomGeneration(len);
|
||||
|
||||
// 공통 ID
|
||||
String commonId = prefix + suffix;
|
||||
|
||||
return commonId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 난수 생성(매개변수로 난수길이 세팅)
|
||||
*
|
||||
* @param len
|
||||
* @return
|
||||
*/
|
||||
public static String randomGeneration(int len) {
|
||||
String randomStr = RandomStringUtils.randomAlphanumeric(len);
|
||||
return randomStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 빈 object인지 확인
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public static Boolean isEmptyObject(Object obj) {
|
||||
if (obj instanceof String) return obj == null || "".equals(obj.toString().trim());
|
||||
else if (obj instanceof List) return obj == null || ((List) obj).isEmpty();
|
||||
else if (obj instanceof Map) return obj == null || ((Map) obj).isEmpty();
|
||||
else if (obj instanceof Object[]) return obj == null || Array.getLength(obj) == 0;
|
||||
else return obj == null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 비어있지 않은 object인지 확인
|
||||
* @param obj
|
||||
* @return
|
||||
*/
|
||||
public static Boolean isNotEmptyObject(Object obj) {
|
||||
return !isEmptyObject(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* map에 key값에 매핑되는 value가 있는지 확인(빈값 true)
|
||||
* @param tMap
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public static Boolean isEmptyValue(Map<String, Object> tMap, String key) {
|
||||
if(!tMap.containsKey(key) || isEmptyObject(tMap.get(key))) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* map에 key값에 매핑되는 value가 없으면 빈값 있으면 해당값을 String으로 return
|
||||
* @param tMap
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public static String getStrValue(Map<String, Object> tMap, String key) {
|
||||
if(isEmptyValue(tMap, key)) return StringUtils.EMPTY;
|
||||
else return getString(tMap.get(key));
|
||||
}
|
||||
|
||||
/**
|
||||
* 시분초 + 쓰는곳 해서 ID 만들어주는것
|
||||
* @param targetStr - 3글자 이상 하면 varchar(18) 이상 됨
|
||||
* @return
|
||||
*/
|
||||
public static String generationSringToHex(String targetStr) {
|
||||
|
||||
String now = new SimpleDateFormat("HHmmss").format(System.currentTimeMillis()) + targetStr;
|
||||
String result = "";
|
||||
for (int i = 0; i < now.length(); i++) {
|
||||
result += String.format("%02X", (int) now.charAt(i));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 로그인 아이디 마스킹 처리
|
||||
*/
|
||||
public static String setMaskingLoginId(String loginId){
|
||||
String maskingLoginId = loginId;
|
||||
int length = maskingLoginId.length();
|
||||
length = length-2;
|
||||
maskingLoginId = maskingLoginId.replaceAll("(?=.{"+length+"}).", "*"); //<2F><><EFBFBD>ڸ<EFBFBD> 3<><33> <20><><EFBFBD><EFBFBD>ŷ
|
||||
return maskingLoginId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 이름 마스킹 처리
|
||||
*/
|
||||
public static String setMaskingUserNm(String userNm){
|
||||
String firstName = "";
|
||||
String midName = "";
|
||||
String lastName = "";
|
||||
if(!isAlpha(userNm) && !isKorean(userNm)) {
|
||||
firstName = userNm;
|
||||
} else {
|
||||
if(!isAlpha(userNm)) {
|
||||
firstName = userNm.substring(0, 1);
|
||||
midName = userNm.substring(1, 2);
|
||||
lastName = userNm.substring(2, userNm.length());
|
||||
} else {
|
||||
firstName = userNm.substring(0, 2);
|
||||
midName = userNm.substring(2, userNm.length()-2);
|
||||
lastName = userNm.substring(userNm.length()-2, userNm.length());
|
||||
}
|
||||
|
||||
}
|
||||
String masking = "";
|
||||
for(int i = 0; i < midName.length(); i++) {
|
||||
masking += "*";
|
||||
}
|
||||
String rtnUserNm = firstName + masking + lastName;
|
||||
return rtnUserNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* 영어이름인지 확인
|
||||
*/
|
||||
public static boolean isAlpha(String userNm){
|
||||
boolean isAlpha = Pattern.matches("^[a-zA-Z]*$", userNm.subSequence(0, 1));
|
||||
return isAlpha;
|
||||
}
|
||||
|
||||
/**
|
||||
* 한글이름인지 확인
|
||||
*/
|
||||
public static boolean isKorean(String userNm){
|
||||
boolean isKorean = Pattern.matches("^[<5B><>-<2D>R]*$", userNm.subSequence(0, 1));
|
||||
return isKorean;
|
||||
}
|
||||
|
||||
/**
|
||||
* convert List to JSONArray
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
public static JSONArray convertListToJsonArray(List<Map<String, Object>> list) {
|
||||
JSONArray jsonArr = new JSONArray();
|
||||
for(Map<String, Object> map : list) {
|
||||
jsonArr.add(convertMapToJson(map));
|
||||
}
|
||||
return jsonArr;
|
||||
}
|
||||
|
||||
/**
|
||||
* convert Map to JSONObject
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public static JSONObject convertMapToJson(Map<String, Object> map) {
|
||||
JSONObject jsonObj = new JSONObject();
|
||||
for(Map.Entry<String, Object> entry : map.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
Object value = entry.getValue();
|
||||
jsonObj.put(key, value);
|
||||
}
|
||||
return jsonObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* 세션 생성
|
||||
* @param req
|
||||
* @param attrib
|
||||
* @param ser
|
||||
*/
|
||||
public static void addToSession(HttpServletRequest req, String attrib, Serializable ser) {
|
||||
HttpSession sess = req.getSession(true);
|
||||
sess.setAttribute(attrib, sess);
|
||||
}
|
||||
|
||||
|
||||
// 핸드폰번호 유효성 체크
|
||||
public static boolean isHpNumber(String value) {
|
||||
String regExp = "^01(?:0|1|[6-9])[.-]?(\\d{3}|\\d{4})[.-]?(\\d{4})$";
|
||||
return value.matches(regExp);
|
||||
}
|
||||
|
||||
// 중복제거 메소드, key는 제거할 맵 대상
|
||||
public static List<Map<String, Object>> distinctArray(List<Map<String, Object>> target, Object key){
|
||||
if(target != null){
|
||||
target = target.stream().filter(distinctByKey(o-> o.get(key))).collect(Collectors.toList());
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
// 중복 제거를 위한 함수
|
||||
public static <T> Predicate<T> distinctByKey(Function<? super T,Object> keyExtractor) {
|
||||
Map<Object,Boolean> seen = new ConcurrentHashMap<>();
|
||||
return t -> seen.putIfAbsent(keyExtractor.apply(t), Boolean.TRUE) == null;
|
||||
}
|
||||
|
||||
// 검색 조건 날짜 배열에 넣어서 리턴해주는 함수
|
||||
public static String[] dateArrReturn(String startDate, String endDate) throws Exception{
|
||||
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
Date strDate = dateFormat.parse(startDate);
|
||||
Date edDate = dateFormat.parse(endDate);
|
||||
|
||||
long diffSec = (edDate.getTime() - strDate.getTime()) / 1000;
|
||||
int diffDays = (int) diffSec / (24 * 60 * 60);
|
||||
|
||||
String[] dateArr = new String[diffDays + 1];
|
||||
|
||||
for(int i=0; i<=diffDays; i++) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(strDate);
|
||||
cal.add(Calendar.DATE, i);
|
||||
String dateStr = dateFormat.format(cal.getTime());
|
||||
dateArr[i] = dateStr;
|
||||
}
|
||||
|
||||
return dateArr;
|
||||
}
|
||||
|
||||
}
|
||||
159
src/main/java/kr/co/uplus/ez/common/utils/DateUtil.java
Normal file
159
src/main/java/kr/co/uplus/ez/common/utils/DateUtil.java
Normal file
@@ -0,0 +1,159 @@
|
||||
package kr.co.uplus.ez.common.utils;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class DateUtil {
|
||||
|
||||
/**
|
||||
* 날짜 형식을 받아서 오늘 날짜를 해당 형식으로 반환
|
||||
*
|
||||
* @param format
|
||||
* @return
|
||||
*/
|
||||
public static String getCurrentDate(String format) {
|
||||
Date date = Calendar.getInstance().getTime();
|
||||
DateFormat dateFormat = new SimpleDateFormat(format);
|
||||
return dateFormat.format(date);
|
||||
}
|
||||
|
||||
/**
|
||||
* 현재날짜의 분을 첫째자리 반올림하여 리턴
|
||||
* @return
|
||||
*/
|
||||
public static String getCurrentRoundMin() {
|
||||
int min = LocalDateTime.now().getMinute();
|
||||
min = (int) (Math.round((double)min/10)*10);
|
||||
return StringUtils.leftPad(String.valueOf(min), 2, '0');
|
||||
}
|
||||
|
||||
/**
|
||||
* 현재 시스템 날짜를 "yyyy-MM-dd" 형식으로 String 형으로 반환
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public static String getCurrentDate() {
|
||||
return getCustomDay("", 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 현재 시스템 시간을 "HHmmss" 형식으로 String 형으로 반환
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public static String getCurrentTime() {
|
||||
Timestamp wdate = null;
|
||||
String sDate = null;
|
||||
String temp = null;
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
long currentTimeMillis = System.currentTimeMillis();
|
||||
|
||||
wdate = new Timestamp(currentTimeMillis);
|
||||
sDate = wdate.toString();
|
||||
|
||||
stringBuffer.append(sDate.substring(11, 13));
|
||||
stringBuffer.append(sDate.substring(14, 16));
|
||||
stringBuffer.append(sDate.substring(17, 19));
|
||||
|
||||
temp = stringBuffer.toString();
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 현재 시스템 날짜 시간을 "yyyy-MM-dd HH24:mm:ss" 형식으로 반환
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public static String getCurrentDateTime() {
|
||||
Timestamp timestamp = null;
|
||||
String timestampString = null;
|
||||
long currentTimeMillis = 0;
|
||||
|
||||
currentTimeMillis = System.currentTimeMillis();
|
||||
|
||||
timestamp = new Timestamp(currentTimeMillis);
|
||||
|
||||
timestampString = timestamp.toString();
|
||||
timestampString = timestampString.substring(0, 19);
|
||||
|
||||
return timestampString;
|
||||
}
|
||||
|
||||
/**
|
||||
* 현재 일자 기준으로 이전 일자를 찾아 리턴한다.
|
||||
*
|
||||
* @param int
|
||||
* @return String
|
||||
*/
|
||||
public static String getCustomDay(String mode, int addDay) {
|
||||
Calendar dt = Calendar.getInstance();
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
if (addDay == 0) {
|
||||
return df.format(dt.getTime());
|
||||
} else {
|
||||
if (mode.equals("MONTH")) {
|
||||
dt.add(Calendar.MONTH, addDay);
|
||||
|
||||
return df.format(dt.getTime());
|
||||
} else if (mode.equals("YEAR")) {
|
||||
dt.add(Calendar.YEAR, addDay);
|
||||
|
||||
return df.format(dt.getTime());
|
||||
} else {
|
||||
dt.add(Calendar.DATE, addDay);
|
||||
|
||||
return df.format(dt.getTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 특일 일자 기준으로 말일을 확인
|
||||
*
|
||||
* @param String
|
||||
* @return String
|
||||
**/
|
||||
public static String getCustomLastDay(String CallDay) {
|
||||
int Year = Integer.valueOf(CallDay.substring(0, 4));
|
||||
int Month = Integer.valueOf(CallDay.substring(5, 7)) - 1;
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
calendar.set(Year, Month, 1);
|
||||
|
||||
int DayOfMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
|
||||
|
||||
calendar.set(Year, Month, DayOfMonth);
|
||||
|
||||
return df.format(calendar.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 현재일 기준으로 특정일까지 일수 차이를 리턴
|
||||
* @param targetDate
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static long diffDays(Date targetDate) throws Exception {
|
||||
Calendar getToday = Calendar.getInstance();
|
||||
getToday.setTime(new Date());
|
||||
|
||||
Calendar cmpDate = Calendar.getInstance();
|
||||
cmpDate.setTime(targetDate);
|
||||
|
||||
long diffSec = (cmpDate.getTimeInMillis() - getToday.getTimeInMillis()) / 1000;
|
||||
long diffDays = diffSec / (24*60*60);
|
||||
|
||||
return diffDays;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1143,4 +1143,517 @@
|
||||
WHERE
|
||||
ENTR_NO = #{entrNo}
|
||||
</update>
|
||||
|
||||
<select id="cntChrgList" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgListReqDto" resultType="int">
|
||||
SELECT
|
||||
|
||||
COUNT(*) AS TOTALCNT
|
||||
|
||||
FROM hubez_admin.EZ_CHARGE_MNG ecm
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu ON esu.USER_SEQ = ecm.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SUBS_INFO esi ON esi.USER_SEQ = ecm.USER_SEQ
|
||||
WHERE 1 = 1
|
||||
AND ecm.USE_YN ='Y'
|
||||
AND esi.SUBS_STTUS_CD ='02'
|
||||
AND (#{startDt} BETWEEN ecm.STRT_YM AND ecm.END_YM
|
||||
OR #{endDt} BETWEEN ecm.STRT_YM AND ecm.END_YM
|
||||
OR ecm.STRT_YM BETWEEN #{startDt} AND #{endDt}
|
||||
OR ecm.END_YM BETWEEN #{startDt} AND #{endDt})
|
||||
<if test="searchType1 != null and searchType1 != ''">
|
||||
<if test="searchType1 == '01' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.CUST_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType1 == '02' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.BIZRNO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType1 == '03' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(esu.USER_ID) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY ecm.CHRG_SEQ DESC
|
||||
</select>
|
||||
|
||||
<!-- 충전관리 목록 조회 -->
|
||||
<select id="selectChrgList" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.ChrgList">
|
||||
SELECT
|
||||
@ROWNUM := @ROWNUM + 1 AS NO
|
||||
,A.*
|
||||
FROM (
|
||||
SELECT
|
||||
eci.CUST_NM
|
||||
, esu.USER_ID
|
||||
, ecm.CHRG_DIV
|
||||
, ecm.STRT_YM
|
||||
, ecm.END_YM
|
||||
, ecm.CHRG_AMT
|
||||
, ecm.USE_YN
|
||||
, eci.BIZRNO
|
||||
, ecm.CHRG_SEQ
|
||||
|
||||
FROM hubez_admin.EZ_CHARGE_MNG ecm
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu ON esu.USER_SEQ = ecm.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
INNER JOIN hubez_common.EZ_SUBS_INFO esi ON esi.USER_SEQ = ecm.USER_SEQ
|
||||
WHERE 1 = 1
|
||||
AND ecm.USE_YN ='Y'
|
||||
AND esi.SUBS_STTUS_CD ='02'
|
||||
AND (#{startDt} BETWEEN ecm.STRT_YM AND ecm.END_YM
|
||||
OR #{endDt} BETWEEN ecm.STRT_YM AND ecm.END_YM
|
||||
OR ecm.STRT_YM BETWEEN #{startDt} AND #{endDt}
|
||||
OR ecm.END_YM BETWEEN #{startDt} AND #{endDt})
|
||||
<if test="searchType1 != null and searchType1 != ''">
|
||||
<if test="searchType1 == '01' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.CUST_NM) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType1 == '02' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.BIZRNO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType1 == '03' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(esu.USER_ID) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY ecm.CHRG_SEQ DESC
|
||||
LIMIT #{page}, #{pagePerRows}) A, ( SELECT @ROWNUM := #{page} ) AS R
|
||||
</select>
|
||||
|
||||
<!-- 충전관리 상세 조회 -->
|
||||
<select id="selectChrgDetail" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgDetailReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.ChrgDetail">
|
||||
SELECT
|
||||
eci.CUST_NM
|
||||
, esu.USER_ID
|
||||
, ecm.CHRG_DIV
|
||||
, ecm.STRT_YM
|
||||
, ecm.END_YM
|
||||
, ecm.CHRG_AMT
|
||||
, ecm.USE_YN
|
||||
, eci.BIZRNO
|
||||
, ecm.CHRG_SEQ
|
||||
FROM hubez_admin.EZ_CHARGE_MNG ecm
|
||||
INNER JOIN hubez_common.EZ_SVC_USER esu ON esu.USER_SEQ = ecm.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
WHERE 1 = 1
|
||||
AND ecm.USE_YN ='Y'
|
||||
AND ecm.CHRG_SEQ = #{chrgSeq}
|
||||
ORDER BY ecm.CHRG_SEQ DESC
|
||||
</select>
|
||||
|
||||
<!-- 유저ID 카운트 조회 -->
|
||||
<select id="selectuserTotalCnt" parameterType="kr.co.uplus.ez.api.custMgt.dto.UserListReqDto" resultType="int">
|
||||
/* custMgt-mapper.xml(getChrgSeq) */
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM hubez_common.EZ_SVC_USER esu
|
||||
INNER JOIN hubez_common.EZ_SUBS_INFO esi ON esi.USER_SEQ = esu.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
WHERE 1 = 1
|
||||
AND esu.USER_TP_CD ='01'
|
||||
AND esi.SUBS_STTUS_CD ='02'
|
||||
AND esu.USER_ID LIKE CONCAT('%' , #{searchText1}, '%')
|
||||
</select>
|
||||
|
||||
<!-- 유저ID 목록 조회 -->
|
||||
<select id="selectUserList" parameterType="kr.co.uplus.ez.api.custMgt.dto.UserListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.UserinInfo">
|
||||
/* custMgt-mapper.xml(getChrgSeq) */
|
||||
SELECT
|
||||
esu.USER_ID
|
||||
, eci.CUST_NM
|
||||
, esu.USER_SEQ
|
||||
, esu.USER_STTUS_CD
|
||||
, esu.USER_TP_CD
|
||||
FROM hubez_common.EZ_SVC_USER esu
|
||||
INNER JOIN hubez_common.EZ_SUBS_INFO esi ON esi.USER_SEQ = esu.USER_SEQ
|
||||
INNER JOIN hubez_common.EZ_CUST_INFO eci ON eci.CUST_SEQ = esu.CUST_SEQ
|
||||
WHERE 1 = 1
|
||||
AND esu.USER_TP_CD ='01'
|
||||
AND esi.SUBS_STTUS_CD ='02'
|
||||
AND esu.USER_ID LIKE CONCAT('%' , #{searchText1}, '%')
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 이용자 충전번호 조회(채번) -->
|
||||
<select id="getChrgSeq" resultType="String">
|
||||
/* custMgt-mapper.xml(getChrgSeq) */
|
||||
SELECT hubez_common.FUN_NEXT_SEQ('CHRG_SEQ')
|
||||
</select>
|
||||
|
||||
<!-- 충전관리 등록 -->
|
||||
<insert id="insertChrgInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgInfo">
|
||||
INSERT INTO hubez_admin.EZ_CHARGE_MNG (
|
||||
CHRG_SEQ
|
||||
, USER_SEQ
|
||||
, CHRG_DIV
|
||||
, STRT_YM
|
||||
, END_YM
|
||||
, CHRG_AMT
|
||||
, USE_YN
|
||||
, REG_ID
|
||||
, REG_DT
|
||||
, CHG_ID
|
||||
, CHG_DT
|
||||
) VALUES(
|
||||
#{chrgSeq}
|
||||
, #{userSeq}
|
||||
, #{chrgDiv}
|
||||
, #{strtYm}
|
||||
, #{endYm}
|
||||
, #{chrgAmt}
|
||||
, 'Y'
|
||||
, #{regId}
|
||||
, NOW()
|
||||
, #{regId}
|
||||
, NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateChrgAmt" parameterType= "kr.co.uplus.ez.api.custMgt.dto.ChrgAmtDto">
|
||||
UPDATE
|
||||
hubez_admin.EZ_USER_LMT eul
|
||||
set
|
||||
eul.MRT_LMT_AMT = eul.MRT_LMT_AMT + #{extcChrgAmt}+ #{cfwdChrgAmt}
|
||||
,eul.EXTC_CHRG_AMT = eul.EXTC_CHRG_AMT + #{extcChrgAmt}
|
||||
,eul.EXTC_CHRG_BLNC = eul.EXTC_CHRG_BLNC + #{extcChrgAmt}
|
||||
,eul.CFWD_CHRG_AMT = eul.CFWD_CHRG_AMT+ #{cfwdChrgAmt}
|
||||
,eul.CFWD_CHRG_BLNC = eul.CFWD_CHRG_BLNC+ #{cfwdChrgAmt}
|
||||
WHERE eul.USER_SEQ = #{userSeq}
|
||||
AND eul.LMT_YM =#{lmtYm}
|
||||
|
||||
</update>
|
||||
|
||||
<update id="updateChrg" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgInfo">
|
||||
UPDATE
|
||||
hubez_admin.EZ_CHARGE_MNG ecm
|
||||
set
|
||||
ecm.USE_YN ='N'
|
||||
WHERE ecm.CHRG_SEQ = #{chrgSeq}
|
||||
</update>
|
||||
|
||||
<insert id="addChrg" parameterType="kr.co.uplus.ez.api.custMgt.dto.ChrgInfo">
|
||||
INSERT INTO hubez_admin.EZ_CHARGE_MNG (
|
||||
CHRG_SEQ
|
||||
, USER_SEQ
|
||||
, CHRG_DIV
|
||||
, STRT_YM
|
||||
, END_YM
|
||||
, CHRG_AMT
|
||||
, USE_YN
|
||||
, REG_ID
|
||||
, REG_DT
|
||||
, CHG_ID
|
||||
, CHG_DT
|
||||
) VALUES(
|
||||
#{chrgSeq}
|
||||
, #{userSeq}
|
||||
, 'E'
|
||||
, #{strtYm}
|
||||
, #{endYm}
|
||||
, #{chrgAmt}
|
||||
, 'Y'
|
||||
, #{regId}
|
||||
, NOW()
|
||||
, #{regId}
|
||||
, NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="deleteChrg" parameterType="kr.co.uplus.ez.api.custMgt.dto.DeleteChrgReqDto">
|
||||
UPDATE
|
||||
hubez_admin.EZ_CHARGE_MNG ecm
|
||||
set
|
||||
ecm.USE_YN ='N'
|
||||
WHERE ecm.CHRG_SEQ in
|
||||
<foreach collection="list" index="i" item="list" open="(" close=")" separator=",">
|
||||
#{list.chrgSeq}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 2023-03-07 add request 부분
|
||||
<select id="selectBLNCLists" parameterType="kr.co.uplus.ez.api.custMgt.dto.UserLmtListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.UserLmtList" >
|
||||
/* custMgt-mapper.xml(selectBLNCLists) */
|
||||
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(esi.ENTR_NO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType3 == '02' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.BIZRNO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY eci.CUST_SEQ DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBLNCListsExcel" parameterType="kr.co.uplus.ez.api.custMgt.dto.UserLmtListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.UserLmtList">
|
||||
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(esi.ENTR_NO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
<if test="searchType3 == '02' and searchText1 != null and searchText1 != ''">
|
||||
AND UPPER(eci.BIZRNO) LIKE UPPER(CONCAT('%', #{searchText1}, '%'))
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY eci.CUST_SEQ DESC
|
||||
</select>
|
||||
-->
|
||||
<select id="selectUserInfo" parameterType="String" resultType="kr.co.uplus.ez.api.custMgt.dto.SvcUserInfo">
|
||||
/* custMgt-mapper.xml(selectUserInfo) */
|
||||
SELECT
|
||||
USER_SEQ, HP_NO
|
||||
FROM
|
||||
hubez_common.EZ_SVC_USER
|
||||
WHERE
|
||||
USER_ID = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectSequence" parameterType="String" resultType="String">
|
||||
/* extCarryOverAmtNoti.selectSequence -- sequence 채번 일반 */
|
||||
SELECT hubez_common.FUN_NEXT_SEQ(#{seqKey})
|
||||
</select>
|
||||
|
||||
<select id="selectNotiSeq" resultType="String">
|
||||
/* extCarryOverAmtNoti.selectNotiSeq 노티 알림 시퀀스 채번 */
|
||||
SELECT hubez_common.FUN_NEXT_SEQ('NOTI_SEQ') AS notiSeq
|
||||
</select>
|
||||
|
||||
<insert id="insertWebMsgCli" parameterType="kr.co.uplus.ez.api.custMgt.dto.WebMsgCliDto">
|
||||
/* extCarryOverAmtNoti.insertWebMsgCli - 메시지 원장 등록 */
|
||||
INSERT INTO
|
||||
<if test="tableName == 'EZ_MSG_NORMAL'">
|
||||
hubez_send.EZ_MSG_NORMAL
|
||||
</if>
|
||||
<if test="tableName == 'EZ_MSG_REAL'">
|
||||
hubez_send.EZ_MSG_REAL
|
||||
</if>
|
||||
(
|
||||
CLIENT_KEY,
|
||||
REQ_PRODUCT,
|
||||
TRAFFIC_TYPE,
|
||||
MSG_STATUS,
|
||||
REQ_DATE,
|
||||
MSG_BIZ_KEY,
|
||||
TEMPLATE_CODE,
|
||||
SEND_GROUP_KEY,
|
||||
CALLBACK_NUMBER,
|
||||
DEPT_CODE,
|
||||
MSG,
|
||||
PHONE,
|
||||
MERGE_DATA,
|
||||
TITLE,
|
||||
FILE_LIST,
|
||||
FB_PRODUCT,
|
||||
FB_TITLE,
|
||||
FB_MSG,
|
||||
FB_FILE_ID,
|
||||
RCS_MSGBASE_ID,
|
||||
RCS_HEADER,
|
||||
RCS_FOOTER,
|
||||
RCS_COPY_ALLOWED,
|
||||
RCS_EXPIRY_OPTION,
|
||||
RCS_AGENCY_ID,
|
||||
RCS_BUTTON,
|
||||
KAKAO_SENDER_KEY,
|
||||
KAKAO_TEMPLATE_KEY,
|
||||
KAKAO_BUTTON,
|
||||
KAKAO_IMAGE_WIDE_YN,
|
||||
KAKAO_IMAGE_URL,
|
||||
KAKAO_IMAGE_LINK,
|
||||
PUSH_APP_ID,
|
||||
PUSH_PROVIDER,
|
||||
PUSH_APP_USER_ID,
|
||||
WEB_REQ_ID,
|
||||
ORDER_ID
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{clientKey},
|
||||
#{reqProduct},
|
||||
#{trafficType},
|
||||
#{msgStatus},
|
||||
NOW(),
|
||||
#{msgBizKey},
|
||||
#{templateCode},
|
||||
#{sendGroupKey},
|
||||
#{callbackNumber},
|
||||
#{deptCode},
|
||||
#{msg},
|
||||
#{phone},
|
||||
#{mergeData},
|
||||
'충전금액알림',
|
||||
#{fileList},
|
||||
#{fbProduct},
|
||||
#{fbTitle},
|
||||
#{fbMsg},
|
||||
#{fbFileId},
|
||||
#{rcsMsgbaseId},
|
||||
#{rcsHeader},
|
||||
#{rcsFooter},
|
||||
#{rcsCopyAllowed},
|
||||
#{rcsExpiryOption},
|
||||
#{rcsAgencyId},
|
||||
#{rcsButton},
|
||||
#{kakaoSenderKey},
|
||||
#{kakaoTemplateKey},
|
||||
#{kakaoButton},
|
||||
#{kakaoImageWideYn},
|
||||
#{kakaoImageUrl},
|
||||
#{kakaoImageLink},
|
||||
#{pushAppId},
|
||||
#{pushProvider},
|
||||
#{pushAppUserId},
|
||||
#{webReqId},
|
||||
#{orderId}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertNotiHst" parameterType="kr.co.uplus.ez.api.custMgt.dto.NotiHistDto">
|
||||
/* extCarryOverAmtNoti.insertNotiHst - 알림 이력 등록 */
|
||||
INSERT INTO hubez_common.EZ_NOTI_HIST
|
||||
(
|
||||
SND_YMD,
|
||||
USER_SEQ,
|
||||
NOTI_SEQ,
|
||||
NOTI_DIV,
|
||||
NOTI_MSG,
|
||||
WEB_REQ_ID,
|
||||
REG_DT
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
DATE_FORMAT(NOW(), '%Y%m%d'),
|
||||
#{userSeq},
|
||||
#{notiSeq},
|
||||
'04',
|
||||
#{notiMsg},
|
||||
#{webReqId},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
</mapper>
|
||||
|
||||
@@ -25,18 +25,23 @@
|
||||
@ROWNUM := @ROWNUM + 1 AS NO,
|
||||
NT_NO,
|
||||
CTG_CD,
|
||||
(
|
||||
SELECT DTL_CD_NM
|
||||
FROM hubez_common.EZ_CD_DTL
|
||||
WHERE DTL_CD = N1.CTG_CD
|
||||
AND GRP_CD = 'NTBBS_CTG_CD' AND USE_YN = 'Y'
|
||||
) AS CTG_CD_NM,
|
||||
CASE WHEN CTG_CD = '06' THEN '팝업공지'
|
||||
ELSE
|
||||
(
|
||||
SELECT DTL_CD_NM
|
||||
FROM hubez_common.EZ_CD_DTL
|
||||
WHERE DTL_CD = N1.CTG_CD
|
||||
AND GRP_CD = 'NTBBS_CTG_CD' AND USE_YN = 'Y'
|
||||
)
|
||||
END AS CTG_CD_NM,
|
||||
TITLE,
|
||||
EMG_YN,
|
||||
NT_SBST,
|
||||
REGR,
|
||||
USE_YN,
|
||||
RETV_CNT,
|
||||
DATE_FORMAT(NT_STRT_DT, '%Y-%m-%d') AS ntStrtDt,
|
||||
DATE_FORMAT(NT_END_DT, '%Y-%m-%d') AS ntEndDt,
|
||||
REG_ID,
|
||||
DATE_FORMAT(REG_DT, '%Y-%m-%d') AS regDt,
|
||||
CHG_ID,
|
||||
@@ -110,7 +115,11 @@
|
||||
NT_SBST,
|
||||
REGR,
|
||||
USE_YN,
|
||||
RETV_CNT,
|
||||
RETV_CNT,
|
||||
<if test="ctgCd == '06'">
|
||||
NT_STRT_DT,
|
||||
NT_END_DT,
|
||||
</if>
|
||||
REG_ID,
|
||||
REG_DT,
|
||||
CHG_ID,
|
||||
@@ -123,6 +132,10 @@
|
||||
#{regr},
|
||||
#{useYn},
|
||||
0,
|
||||
<if test="ctgCd == '06'">
|
||||
#{ntStrtDt},
|
||||
#{ntEndDt},
|
||||
</if>
|
||||
#{regId},
|
||||
NOW(),
|
||||
#{chgId},
|
||||
@@ -181,6 +194,10 @@
|
||||
,USE_YN = #{useYn}
|
||||
,TITLE = #{title}
|
||||
,NT_SBST = #{ntSbst}
|
||||
<if test="ctgCd == '06'">
|
||||
,NT_STRT_DT = #{ntStrtDt}
|
||||
,NT_END_DT = #{ntEndDt}
|
||||
</if>
|
||||
,CHG_DT = NOW()
|
||||
,CHG_ID = #{chgId}
|
||||
WHERE
|
||||
|
||||
Reference in New Issue
Block a user