diff --git a/frontend/src/modules/custMgt/components/ChrgDetailPop.vue b/frontend/src/modules/custMgt/components/ChrgDetailPop.vue new file mode 100644 index 0000000..0a6c8c3 --- /dev/null +++ b/frontend/src/modules/custMgt/components/ChrgDetailPop.vue @@ -0,0 +1,347 @@ + + + diff --git a/frontend/src/modules/custMgt/components/InsertChrgModal.vue b/frontend/src/modules/custMgt/components/InsertChrgModal.vue new file mode 100644 index 0000000..bebfc86 --- /dev/null +++ b/frontend/src/modules/custMgt/components/InsertChrgModal.vue @@ -0,0 +1,320 @@ + + + diff --git a/frontend/src/modules/custMgt/components/UserListPop.vue b/frontend/src/modules/custMgt/components/UserListPop.vue new file mode 100644 index 0000000..1cac24d --- /dev/null +++ b/frontend/src/modules/custMgt/components/UserListPop.vue @@ -0,0 +1,101 @@ + + diff --git a/frontend/src/modules/custMgt/components/ValidationConfirmPop.vue b/frontend/src/modules/custMgt/components/ValidationConfirmPop.vue index c65bc94..1ea3dff 100644 --- a/frontend/src/modules/custMgt/components/ValidationConfirmPop.vue +++ b/frontend/src/modules/custMgt/components/ValidationConfirmPop.vue @@ -161,6 +161,41 @@ + +
+ + + +
+ + @@ -407,6 +442,58 @@ export default { // 부모 함수 호출. this.$parent.confirmCalbackFnc(this.row); }, + + //충전금 수정 확인 Open + chrgconfirmUpdateOpen() { + var dimmed = document.getElementsByClassName('chrgconfirm-update'); + for (var i = 0; i < dimmed.length; i++) { + dimmed[i].style.display = 'block'; + } + + }, + //충전금 수정 확인 + chrgconfirmUpdate() { + var dimmed = document.getElementsByClassName('chrgconfirm-update'); + for (var i = 0; i < dimmed.length; i++) { + dimmed[i].style.display = 'none'; + } + this.$parent.ChrgUpdateModal(); + + }, + // 충전금 수정 Close + chrgconfirmUpdateClose() { + var dimmed = document.getElementsByClassName('chrgconfirm-update'); + for (var i = 0; i < dimmed.length; i++) { + dimmed[i].style.display = 'none'; + } + + }, + + // 충전금 삭제 Open + chrgconfirmDeleteOpen() { + var dimmed = document.getElementsByClassName('chrgconfirm-delete'); + for (var i = 0; i < dimmed.length; i++) { + dimmed[i].style.display = 'block'; + } + }, + //충전금 삭제 + chrgconfirmDelete() { + var dimmed = document.getElementsByClassName('chrgconfirm-delete'); + for (var i = 0; i < dimmed.length; i++) { + dimmed[i].style.display = 'none'; + } + this.$parent.ChrgDeleteModal(); + }, + //충전금 삭제 Close + chrgconfirmDeleteClose() { + var dimmed = document.getElementsByClassName('chrgconfirm-delete'); + for (var i = 0; i < dimmed.length; i++) { + dimmed[i].style.display = 'none'; + } + + }, + + } } \ No newline at end of file diff --git a/frontend/src/modules/custMgt/router/index.js b/frontend/src/modules/custMgt/router/index.js index 16910f6..4d0f922 100644 --- a/frontend/src/modules/custMgt/router/index.js +++ b/frontend/src/modules/custMgt/router/index.js @@ -1,5 +1,6 @@ import SubsList from '../views/SubsList' import MemberList from '../views/MemberList' +import ChrgList from '../views/ChrgList' import SubsDetail from '../views/SubsDetail' import MemberDetail from '../views/MemberDetail' import MemberAdminDetail from '../views/MemberAdminDetail' @@ -18,6 +19,12 @@ export default [ name: 'memberList', meta: { public: false } }, + { + path: '/custMgt/chrgList', + component: ChrgList, + name: 'chrgList', + meta: { public: false } + }, { path: '/custMgt/subsDetail', component: SubsDetail, diff --git a/frontend/src/modules/custMgt/service/custMgtApi.js b/frontend/src/modules/custMgt/service/custMgtApi.js index a65a865..852b827 100644 --- a/frontend/src/modules/custMgt/service/custMgtApi.js +++ b/frontend/src/modules/custMgt/service/custMgtApi.js @@ -83,6 +83,37 @@ const deleteMemo = (params) => { return httpClient.post('/api/v1/bo/custMgt/deleteMemo', params); } +// 충전금 조회 +const chrgList = (params) => { + return httpClient.post('/api/v1/bo/custMgt/chrgList', params); +} + +// 충전금 생성 +const insertChrg = (params) => { + return httpClient.post('/api/v1/bo/custMgt/insertChrg', params); +} + +// 충전금 생성 +const chrgDetail = (params) => { + return httpClient.post('/api/v1/bo/custMgt/chrgDetail', params); +} + +// 충전금 수정 +const updateChrg = (params) => { + return httpClient.post('/api/v1/bo/custMgt/updateChrg', params); +} + +// 충전금 삭제 +const deleteChrg = (params) => { + return httpClient.post('/api/v1/bo/custMgt/deleteChrg', params); +} + +// 유저 ID 조회 +const userList = (params) => { + return httpClient.post('/api/v1/bo/custMgt/userList', params); +} + + const getExcelHeader = category => { // 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다. return new Promise(function(resolve, reject) { @@ -123,4 +154,10 @@ export default { deleteMemo, insertTestId, duplicateCheckUserId, + chrgList, + insertChrg, + updateChrg, + chrgDetail, + deleteChrg, + userList, } diff --git a/frontend/src/modules/custMgt/views/ChrgList.vue b/frontend/src/modules/custMgt/views/ChrgList.vue new file mode 100644 index 0000000..9c5832b --- /dev/null +++ b/frontend/src/modules/custMgt/views/ChrgList.vue @@ -0,0 +1,413 @@ + + + + diff --git a/frontend/src/modules/custMgt/views/MemberList.vue b/frontend/src/modules/custMgt/views/MemberList.vue index 673476d..66e77e2 100644 --- a/frontend/src/modules/custMgt/views/MemberList.vue +++ b/frontend/src/modules/custMgt/views/MemberList.vue @@ -10,6 +10,7 @@
청약고객관리 회원관리 + 충전관리
diff --git a/frontend/src/modules/custMgt/views/SubsList.vue b/frontend/src/modules/custMgt/views/SubsList.vue index 76932f6..5011888 100644 --- a/frontend/src/modules/custMgt/views/SubsList.vue +++ b/frontend/src/modules/custMgt/views/SubsList.vue @@ -9,6 +9,7 @@
청약고객관리 회원관리 + 충전관리
diff --git a/frontend/src/modules/homeMgt/components/NoticePop.vue b/frontend/src/modules/homeMgt/components/NoticePop.vue index a3774a7..2997607 100644 --- a/frontend/src/modules/homeMgt/components/NoticePop.vue +++ b/frontend/src/modules/homeMgt/components/NoticePop.vue @@ -33,7 +33,7 @@ 긴급여부
- @@ -49,6 +49,35 @@
+ + 노출기간 + +
+
+ + ~ + + + +
+
+ + 제목 @@ -113,25 +142,34 @@ diff --git a/frontend/src/modules/homeMgt/components/NoticeUpdatePop.vue b/frontend/src/modules/homeMgt/components/NoticeUpdatePop.vue index 27f48a3..dbfd5c0 100644 --- a/frontend/src/modules/homeMgt/components/NoticeUpdatePop.vue +++ b/frontend/src/modules/homeMgt/components/NoticeUpdatePop.vue @@ -33,7 +33,7 @@ 긴급여부
- @@ -49,6 +49,35 @@
+ + 노출기간 + +
+
+ + ~ + + + +
+
+ + 제목 @@ -118,22 +147,31 @@ diff --git a/frontend/src/modules/homeMgt/views/notice.vue b/frontend/src/modules/homeMgt/views/notice.vue index 119c456..96fd916 100644 --- a/frontend/src/modules/homeMgt/views/notice.vue +++ b/frontend/src/modules/homeMgt/views/notice.vue @@ -15,6 +15,7 @@ +
@@ -173,21 +174,10 @@ export default { }; }, mounted() { - // this.fnSelectNoticeList(); - //let page = 1; // 페이지 정보 및 검색 조건 const getCondition = this.$store.getters['searchcondition/getSearchCondition']; - // store에 저장된 페이지 정보 및 검색 조건을 불러오기 let isKeep = false; - /* - if (getCondition) { - this.grid.pagePerRows = getCondition.perPage; - this.grid.params = getCondition.params; - // page = getCondition.page; - //isKeep = true; - } - */ this.grid.pagePerRows = 50; this.search(isKeep); }, @@ -214,7 +204,6 @@ export default { this.$refs.NoticePop.ModalOpen(); }, noticeDetail(props) { - //console.log(props); this.$refs.NoticeUpdatePop.ModalOpen(props); }, search: function (isKeep) { @@ -230,8 +219,6 @@ export default { perPage: this.perPageCnt, params: this.grid.params, }); - - //const getCondition = this.$store.getters['searchcondition/getSearchCondition']; }, changePerPage: function () { // 페이지당 조회할 개수 @@ -246,16 +233,12 @@ export default { this.$refs.commmonModal.alertModalOpen(this.row); return false; } - //const param = chkList.map((row)=>({regReqNo:row.regReqNo} )); const param = chkList.map((row) => ({ ntNo: row.ntNo })); this.row.list = param; this.row.title = '공지사항 관리'; this.row.msg1 = '삭제 하시겠습니까?'; this.$refs.commmonModal.confirmModalOpen2(this.row); - - console.log(typeof this.row.list[0].ntNo); - //this.$refs.commmonModal.confirmModalOpen2(this.row); }, confirmCalbackFnc(props) { if (props.result) { diff --git a/frontend/src/router.js b/frontend/src/router.js index 36bcd24..4589580 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -105,7 +105,8 @@ router.beforeEach((to, from, next) => { nextUrl == '/custMgt/memberList' || nextUrl == '/custMgt/memberDetail' || nextUrl == '/custMgt/subsDetail' || - nextUrl == '/custMgt/memberAdminDetail' + nextUrl == '/custMgt/memberAdminDetail' || + nextUrl == '/custMgt/chrgList' ) { for (var i = 0; i < menuUrls.length; i++) { if (menuUrls[i] == '/custMgt/subsList') { diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/CustMgtController.java b/src/main/java/kr/co/uplus/ez/api/custMgt/CustMgtController.java index 470fb46..e97c18e 100644 --- a/src/main/java/kr/co/uplus/ez/api/custMgt/CustMgtController.java +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/CustMgtController.java @@ -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); + } + */ } diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/CustMgtMapper.java b/src/main/java/kr/co/uplus/ez/api/custMgt/CustMgtMapper.java index c36af77..75c277e 100644 --- a/src/main/java/kr/co/uplus/ez/api/custMgt/CustMgtMapper.java +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/CustMgtMapper.java @@ -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 selectChrgList(ChrgListReqDto chrgListReqDto); + /** 충전관리 상세 조회 */ + ChrgDetail selectChrgDetail(ChrgDetailReqDto chrgDetailReqDto); + /**유저ID 카운트 조회*/ + int selectuserTotalCnt(UserListReqDto userListReqDto); + /**유저ID 목록 조회*/ + List 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 selectBLNCLists(UserLmtListReqDto userLmtListReqDto); +// /** 요금제 구매 내역 정보 엑셀 목록 조회.*/ +// List selectBLNCListsExcel(UserLmtListExcelReqDto userLmtListExcelReqDto); } diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/CustMgtService.java b/src/main/java/kr/co/uplus/ez/api/custMgt/CustMgtService.java index 6a63570..63171c3 100644 --- a/src/main/java/kr/co/uplus/ez/api/custMgt/CustMgtService.java +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/CustMgtService.java @@ -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= 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 = 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 = 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 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); + } + */ + } diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgAmtDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgAmtDto.java new file mode 100644 index 0000000..1293e2e --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgAmtDto.java @@ -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; +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDelete.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDelete.java new file mode 100644 index 0000000..4fdbd6f --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDelete.java @@ -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; +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetail.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetail.java new file mode 100644 index 0000000..da2218c --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetail.java @@ -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; +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetailReqDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetailReqDto.java new file mode 100644 index 0000000..a3d8c9e --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetailReqDto.java @@ -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; +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetailResDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetailResDto.java new file mode 100644 index 0000000..b283973 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetailResDto.java @@ -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; + } + +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgInfo.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgInfo.java new file mode 100644 index 0000000..d51f75c --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgInfo.java @@ -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; +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgList.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgList.java new file mode 100644 index 0000000..1484253 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgList.java @@ -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; + +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgListReqDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgListReqDto.java new file mode 100644 index 0000000..dc54264 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgListReqDto.java @@ -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; +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgListRes.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgListRes.java new file mode 100644 index 0000000..7ac6585 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgListRes.java @@ -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 list; +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgListResDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgListResDto.java new file mode 100644 index 0000000..c14aa57 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgListResDto.java @@ -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; + } +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/DeleteChrgReqDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/DeleteChrgReqDto.java new file mode 100644 index 0000000..2d3802e --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/DeleteChrgReqDto.java @@ -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 list; +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/DeleteChrgResDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/DeleteChrgResDto.java new file mode 100644 index 0000000..792779d --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/DeleteChrgResDto.java @@ -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; + } + +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/InsertChrgReqDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/InsertChrgReqDto.java new file mode 100644 index 0000000..2033e25 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/InsertChrgReqDto.java @@ -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; + + +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/InsertChrgResDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/InsertChrgResDto.java new file mode 100644 index 0000000..e178565 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/InsertChrgResDto.java @@ -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; + } + +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/NotiHistDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/NotiHistDto.java new file mode 100644 index 0000000..7c365e2 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/NotiHistDto.java @@ -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; +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/TargetSubsInfoDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/TargetSubsInfoDto.java new file mode 100644 index 0000000..3cc69c0 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/TargetSubsInfoDto.java @@ -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; + + + + + + +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateChrgReqDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateChrgReqDto.java new file mode 100644 index 0000000..2e33975 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateChrgReqDto.java @@ -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; + +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateChrgResDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateChrgResDto.java new file mode 100644 index 0000000..076e98f --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateChrgResDto.java @@ -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; + } +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserListReqDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserListReqDto.java new file mode 100644 index 0000000..2394e98 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserListReqDto.java @@ -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; +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserListRes.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserListRes.java new file mode 100644 index 0000000..38df65d --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserListRes.java @@ -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 list; +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserListResDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserListResDto.java new file mode 100644 index 0000000..02a017c --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserListResDto.java @@ -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; + } +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtList.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtList.java new file mode 100644 index 0000000..249aae2 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtList.java @@ -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; + +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListExcelReqDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListExcelReqDto.java new file mode 100644 index 0000000..48c3c5c --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListExcelReqDto.java @@ -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; +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListExcelResDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListExcelResDto.java new file mode 100644 index 0000000..330c954 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListExcelResDto.java @@ -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; + } + +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListReqDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListReqDto.java new file mode 100644 index 0000000..6655979 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListReqDto.java @@ -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; + +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListRes.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListRes.java new file mode 100644 index 0000000..dc4a819 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListRes.java @@ -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 list; + private Paging paging; +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListResDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListResDto.java new file mode 100644 index 0000000..d61542b --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserLmtListResDto.java @@ -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; + } + +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserinInfo.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserinInfo.java new file mode 100644 index 0000000..7e587c9 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserinInfo.java @@ -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; + +} diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/WebMsgCliDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/WebMsgCliDto.java new file mode 100644 index 0000000..55c77af --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/WebMsgCliDto.java @@ -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; +} diff --git a/src/main/java/kr/co/uplus/ez/api/homeMgt/HomeMgtService.java b/src/main/java/kr/co/uplus/ez/api/homeMgt/HomeMgtService.java index 0f800f3..6a4d5fa 100644 --- a/src/main/java/kr/co/uplus/ez/api/homeMgt/HomeMgtService.java +++ b/src/main/java/kr/co/uplus/ez/api/homeMgt/HomeMgtService.java @@ -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); } diff --git a/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/InsertNoticeReqDto.java b/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/InsertNoticeReqDto.java index cd81c2b..93b52c8 100644 --- a/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/InsertNoticeReqDto.java +++ b/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/InsertNoticeReqDto.java @@ -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; diff --git a/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/NoticeDto.java b/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/NoticeDto.java index c3ffe2a..756dcc5 100644 --- a/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/NoticeDto.java +++ b/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/NoticeDto.java @@ -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; diff --git a/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/NoticeListReqDto.java b/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/NoticeListReqDto.java index 363f54b..fb8cf55 100644 --- a/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/NoticeListReqDto.java +++ b/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/NoticeListReqDto.java @@ -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; diff --git a/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/UpdateNoticeReqDto.java b/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/UpdateNoticeReqDto.java index 73ac27d..57f3007 100644 --- a/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/UpdateNoticeReqDto.java +++ b/src/main/java/kr/co/uplus/ez/api/homeMgt/dto/UpdateNoticeReqDto.java @@ -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; diff --git a/src/main/java/kr/co/uplus/ez/common/utils/CommonUtils.java b/src/main/java/kr/co/uplus/ez/common/utils/CommonUtils.java new file mode 100644 index 0000000..63c37ae --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/common/utils/CommonUtils.java @@ -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 함수
+ * (예) getSubstring("1234",4,2) --> ""
+ * @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 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 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+"}).", "*"); //���ڸ� 3�� ����ŷ + 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("^[��-�R]*$", userNm.subSequence(0, 1)); + return isKorean; + } + + /** + * convert List to JSONArray + * @param list + * @return + */ + public static JSONArray convertListToJsonArray(List> list) { + JSONArray jsonArr = new JSONArray(); + for(Map map : list) { + jsonArr.add(convertMapToJson(map)); + } + return jsonArr; + } + + /** + * convert Map to JSONObject + * @param map + * @return + */ + public static JSONObject convertMapToJson(Map map) { + JSONObject jsonObj = new JSONObject(); + for(Map.Entry 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> distinctArray(List> target, Object key){ + if(target != null){ + target = target.stream().filter(distinctByKey(o-> o.get(key))).collect(Collectors.toList()); + } + return target; + } + + // 중복 제거를 위한 함수 + public static Predicate distinctByKey(Function keyExtractor) { + Map 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; + } + +} diff --git a/src/main/java/kr/co/uplus/ez/common/utils/DateUtil.java b/src/main/java/kr/co/uplus/ez/common/utils/DateUtil.java new file mode 100644 index 0000000..3dabea9 --- /dev/null +++ b/src/main/java/kr/co/uplus/ez/common/utils/DateUtil.java @@ -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; + } + +} diff --git a/src/main/resources/mapper/mysql/custMgt/custMgt-mapper.xml b/src/main/resources/mapper/mysql/custMgt/custMgt-mapper.xml index 5c88977..a805bca 100644 --- a/src/main/resources/mapper/mysql/custMgt/custMgt-mapper.xml +++ b/src/main/resources/mapper/mysql/custMgt/custMgt-mapper.xml @@ -1143,4 +1143,517 @@ WHERE ENTR_NO = #{entrNo} + + + + + + + + + + + + + + + + + + + + + + + + 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() + ) + + + + 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 + hubez_admin.EZ_CHARGE_MNG ecm + set + ecm.USE_YN ='N' + WHERE ecm.CHRG_SEQ = #{chrgSeq} + + + + 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() + ) + + + + UPDATE + hubez_admin.EZ_CHARGE_MNG ecm + set + ecm.USE_YN ='N' + WHERE ecm.CHRG_SEQ in + + #{list.chrgSeq} + + + + + + + + + + + + + /* extCarryOverAmtNoti.insertWebMsgCli - 메시지 원장 등록 */ + INSERT INTO + + hubez_send.EZ_MSG_NORMAL + + + hubez_send.EZ_MSG_REAL + + ( + 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} + ) + + + + /* 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() + ) + diff --git a/src/main/resources/mapper/mysql/homeMgt/homeMgt-mapper.xml b/src/main/resources/mapper/mysql/homeMgt/homeMgt-mapper.xml index ea27c32..acbadc8 100644 --- a/src/main/resources/mapper/mysql/homeMgt/homeMgt-mapper.xml +++ b/src/main/resources/mapper/mysql/homeMgt/homeMgt-mapper.xml @@ -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, + + NT_STRT_DT, + NT_END_DT, + REG_ID, REG_DT, CHG_ID, @@ -123,6 +132,10 @@ #{regr}, #{useYn}, 0, + + #{ntStrtDt}, + #{ntEndDt}, + #{regId}, NOW(), #{chgId}, @@ -181,6 +194,10 @@ ,USE_YN = #{useYn} ,TITLE = #{title} ,NT_SBST = #{ntSbst} + + ,NT_STRT_DT = #{ntStrtDt} + ,NT_END_DT = #{ntEndDt} + ,CHG_DT = NOW() ,CHG_ID = #{chgId} WHERE