From a131c45400cff8d46becbe899eda9580148d45b5 Mon Sep 17 00:00:00 2001 From: kubo8 Date: Tue, 8 Nov 2022 16:20:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=96=B4=EB=93=9C=EB=AF=BC=20=EA=B3=A0?= =?UTF-8?q?=EA=B0=9D=20=EC=A0=95=EB=B3=B4=20=EC=88=98=EC=A0=95=20(?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EA=B5=AC=EC=84=B1=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?=EB=B0=8F=20=EC=82=AC=EC=9A=A9=EC=9E=90=20=EB=9D=BC=EC=9D=B8=20?= =?UTF-8?q?=ED=83=80=EC=9E=85=20=EC=88=98=EC=A0=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custMgt/components/MemberModifyPop.vue | 13 ++ .../custMgt/views/MemberAdminDetail.vue | 128 +++++++++++++----- .../modules/custMgt/views/MemberDetail.vue | 80 ++++++----- .../src/modules/custMgt/views/SubsDetail.vue | 23 ++-- .../uplus/ez/api/custMgt/CustMgtMapper.java | 2 + .../uplus/ez/api/custMgt/CustMgtService.java | 2 +- .../ez/api/custMgt/dto/MemberDetailRes.java | 2 + .../uplus/ez/api/custMgt/dto/SubsDetail.java | 2 + .../dto/UpdateAdminInfoTotalReqDto.java | 9 ++ .../ez/api/custMgt/dto/UpdateUserReqDto.java | 2 + .../mapper/mysql/custMgt/custMgt-mapper.xml | 25 +++- 11 files changed, 207 insertions(+), 81 deletions(-) diff --git a/frontend/src/modules/custMgt/components/MemberModifyPop.vue b/frontend/src/modules/custMgt/components/MemberModifyPop.vue index ceca50d..f70ebfe 100644 --- a/frontend/src/modules/custMgt/components/MemberModifyPop.vue +++ b/frontend/src/modules/custMgt/components/MemberModifyPop.vue @@ -42,6 +42,16 @@ + + 라인타입 + + + + 상태 @@ -106,6 +116,7 @@ export default { userPwd1: "", userPwd2: "", code: "", + lineType:"", userStat: "", } }, @@ -122,6 +133,7 @@ export default { this.userNm = result.data.userNm; this.email = result.data.email; this.mdn = result.data.mdn; + this.lineType = result.data.lineType; this.userStat = result.data.userStat; } else { this.row.title = '청약고객관리'; @@ -153,6 +165,7 @@ export default { this.row.userNm = this.userNm; this.row.userEmail = this.email; this.row.mdn = this.mdn; + this.row.lineType = this.lineType; this.row.userStat = this.userStat; try { const response = await custMgtApi.updateUser(this.row); diff --git a/frontend/src/modules/custMgt/views/MemberAdminDetail.vue b/frontend/src/modules/custMgt/views/MemberAdminDetail.vue index bb2cbd3..e9f00f5 100644 --- a/frontend/src/modules/custMgt/views/MemberAdminDetail.vue +++ b/frontend/src/modules/custMgt/views/MemberAdminDetail.vue @@ -21,24 +21,28 @@ - + 이름 - {{ userNm }} - - - 등록일 - {{ regDt }} + 구분 - {{ userType }} +    {{ userType }} - + + 등록일 +    {{ regDt }} + 휴대폰번호 + + + + + ID - {{ userId }} +    {{ userId }} - 관리자명 - {{ adminId }} / {{ adminNm }} + 이메일 + 발송한도 설정 @@ -46,14 +50,7 @@ - + 라인타입 @@ -65,14 +62,14 @@ - ID 잠금 + 상태 - + - 마지막 접속일 + 최종 접속일 {{ lastLoginDt }} @@ -336,20 +333,87 @@ export default { this.$refs.commmonModal.alertModalOpen(this.row); } }, + fnPhoneDash(e) { + const pattern_notNumber = /[^-0-9]/g; // 숫자가 아닌것 체크 + // 숫자 외 입력시 + if (pattern_notNumber.test(e.target.value)) { + alert("휴대폰번호는 숫자만 입력 가능 합니다."); + this.userInfo.hpNo = e.target.value.replace(/[^0-9]/g, ""); + } + }, /** 저장 */ async updateAdminInfoTotal() { - this.row = {}; - this.row.userId = this.adminId; - this.row.sendingLimit = this.sendingLimit; - this.row.lineType = this.lineType; - this.row.userStat = this.userStat; - if(this.memo != this.oldMemo){ - this.row.memo = this.memo; - } else { - this.row.memo = ''; + + if(this.userNm == ""){ + this.row.title = '청약고객관리'; + this.row.msg1 = '이름을 입력해 주세요.'; + this.$refs.commmonModal.alertModalOpen(this.row); + return false; } + if(this.mdn == ""){ + this.row.title = '청약고객관리'; + this.row.msg1 = '휴대폰번호를 입력해 주세요.'; + this.$refs.commmonModal.alertModalOpen(this.row); + return false; + }else{ + let regExp = /^01([0|1|6|7|8|9])?([0-9]{3,4})?([0-9]{4})$/; + if (!regExp.test(this.mdn)) { + this.row.title = '청약고객관리'; + this.row.msg1 = '휴대폰 번호를 올바르게 입력하여 주십시오.'; + this.$refs.commmonModal.alertModalOpen(this.row); + return false; + } + } + if(this.email == ""){ + this.row.title = '청약고객관리'; + this.row.msg1 = '이메일을 입력해 주세요.'; + this.$refs.commmonModal.alertModalOpen(this.row); + return false; + }else{ + let regExp = /^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*\.[a-zA-Z]{2,3}$/i; + if (!regExp.test(this.email)) { + this.row.title = '청약고객관리'; + this.row.msg1 = '이메일을 올바르게 입력하여 주십시오.'; + this.$refs.commmonModal.alertModalOpen(this.row); + return false; + } + } + if(this.sendingLimit == ""){ + this.row.title = '청약고객관리'; + this.row.msg1 = '발송한도 설정을 입력해 주세요.'; + this.$refs.commmonModal.alertModalOpen(this.row); + return false; + } + this.info = {}; + if(this.memo != this.oldMemo){ + if(this.memo == "" || this.memo == null){ + this.row.title = '청약고객관리'; + this.row.msg1 = '변경 내용에 대한 메모를 입력해 주세요.'; + this.$refs.commmonModal.alertModalOpen(this.row); + return false; + } + this.info.memo = this.memo; + }else{ + if(this.memo == "" || this.memo == null || this.memo == this.oldMemo){ + this.row.title = '청약고객관리'; + this.row.msg1 = '변경 내용에 대한 메모를 입력해 주세요.'; + this.$refs.commmonModal.alertModalOpen(this.row); + return false; + } + this.info.memo = this.memo; + } + + this.info.userId = this.adminId; + this.info.userNm = this.userNm; + this.info.hpNo = this.mdn; + this.info.email = this.email; + this.info.sendingLimit = this.sendingLimit; + this.info.lineType = this.lineType; + this.info.userStat = this.userStat; + + try { - const response = await custMgtApi.updateAdminInfoTotal(this.row); + const response = await custMgtApi.updateAdminInfoTotal(this.info); const result = response.data; if (result != null && result.retCode == '0000') { this.row.title = '청약고객관리'; diff --git a/frontend/src/modules/custMgt/views/MemberDetail.vue b/frontend/src/modules/custMgt/views/MemberDetail.vue index 9aa3341..f6a6cd2 100644 --- a/frontend/src/modules/custMgt/views/MemberDetail.vue +++ b/frontend/src/modules/custMgt/views/MemberDetail.vue @@ -26,41 +26,49 @@ - - - 등록일 - {{ regDt }} - 관리자 ID - {{ adminId }} - - - ID - - {{ userId }} - - - 구분 - {{ userType }} + 구분 +    {{ userType }} + 등록일 +    {{ regDt }} 휴대폰번호 - + - 이메일 + + + ID + +    {{ userId }} + + + 이메일 + + 관리자 ID +    {{ adminId }} + 라인타입 + + + + - 잠금 + 상태 - 최종접속일 + 최종접속일 {{ lastLoginDt }} @@ -177,11 +185,12 @@ export default { return false; } - this.row.userId = this.userId; - this.row.userNm = this.userNm; - this.row.userEmail = this.email; - this.row.mdn = this.mdn; - this.row.userStat = this.stat; + this.row.userId = this.userId; + this.row.userNm = this.userNm; + this.row.userEmail = this.email; + this.row.mdn = this.mdn; + this.row.userStat = this.stat; + this.row.lineType = this.lineType; try { const response = await custMgtApi.updateUser(this.row); const result = response.data; @@ -221,16 +230,15 @@ export default { this.$refs.commmonModal.alertModalOpen(this.row); this.$refs._email.focus(); return false; - } - const email = this.email; - if (!this.isNull(email) && !lodash.isEqual(email, '@') && !this.emailCheck(email)) { - this.row.title = '청약고객관리'; - this.row.msg1 = '이메일 형식이 잘못되었습니다. 확인해 주세요.'; - this.$refs.commmonModal.alertModalOpen(this.row); - this.$refs._email.focus(); - //this.$refs.validationConfirmPopModal.validationEmailOpen(); - - return false; + }else{ + let regExp = /^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*\.[a-zA-Z]{2,3}$/i; + if (!regExp.test(this.email)) { + this.row.title = '청약고객관리'; + this.row.msg1 = '이메일을 올바르게 입력하여 주십시오.'; + this.$refs.commmonModal.alertModalOpen(this.row); + this.$refs._email.focus(); + return false; + } } if (this.isNull(this.mdn)) { @@ -243,11 +251,9 @@ export default { const hp = this.mdn; if (!this.isNull(hp) && !this.isMobile(hp)) { this.row.title = '청약고객관리'; - this.row.msg1 = '휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요.'; + this.row.msg1 = '휴대폰 번호를 올바르게 입력하여 주십시오.'; this.$refs.commmonModal.alertModalOpen(this.row); this.$refs._phone.focus(); - //this.$refs.validationConfirmPopModal.validationPhonenumberOpen(); - return false; } diff --git a/frontend/src/modules/custMgt/views/SubsDetail.vue b/frontend/src/modules/custMgt/views/SubsDetail.vue index fb76557..79fdc48 100644 --- a/frontend/src/modules/custMgt/views/SubsDetail.vue +++ b/frontend/src/modules/custMgt/views/SubsDetail.vue @@ -6,7 +6,7 @@
-
기본정보
+
고객정보
@@ -62,7 +62,7 @@
-
사용정보
+
청약정보
@@ -110,7 +110,7 @@
-
담당자 데이터
+
담당자 정보
@@ -125,16 +125,21 @@ - 서비스 ID - - 이용권한 + 담당자명 + +
+ + +
+ + 구분 - 담당자명 - 휴대폰 번호 + 이메일 + 이월누적금액 @@ -211,6 +216,7 @@ export default { useAuth: '', userNm: '', mdn: '', + email: '', carryOver: '', userCnt: '', saveConfirm: false, @@ -304,6 +310,7 @@ export default { this.useAuth = result.data.useAuth; this.userNm = result.data.userNm; this.mdn = result.data.mdn; + this.email = result.data.email; this.carryOver = result.data.carryOver; this.userCnt = result.data.userCnt; if (this.bregNo != '' && this.bregNo != null) { 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 bbeafc6..bb022d1 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 @@ -73,6 +73,8 @@ public interface CustMgtMapper { String selectAdminId(String adminId); int updateAdminInfoTotal(UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto); + + int updateMemberInfo(UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto); int insertMemo(UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto); 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 de77176..77cf801 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 @@ -918,7 +918,7 @@ public class CustMgtService { Map rstAmtMap = new HashMap(); try { // 1. 사용자 정보 update - custMgtMapper.updateAdminInfoTotal(updateAdminInfoTotalReqDto); + custMgtMapper.updateMemberInfo(updateAdminInfoTotalReqDto); // 2. 메모정보 insert if(StringUtils.isNotEmpty(updateAdminInfoTotalReqDto.getMemo())) { diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/MemberDetailRes.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/MemberDetailRes.java index c6400e6..998f016 100644 --- a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/MemberDetailRes.java +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/MemberDetailRes.java @@ -29,6 +29,8 @@ public class MemberDetailRes implements Serializable { private String mdn; @ApiModelProperty(example = "이메일", name = "이메일", dataType = "String") private String email; + @ApiModelProperty(example = "라인타입", name = "라인타입", dataType = "String") + private String lineType; /** 홈페이지 로그인 url */ @ApiModelProperty(hidden = true) diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/SubsDetail.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/SubsDetail.java index 0500536..e207050 100644 --- a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/SubsDetail.java +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/SubsDetail.java @@ -51,6 +51,8 @@ public class SubsDetail implements Serializable { private String userNm; @ApiModelProperty(example = "휴대폰번호", name = "휴대폰번호", dataType = "String") private String mdn; + @ApiModelProperty(example = "이메일", name = "이메일", dataType = "String") + private String email; @ApiModelProperty(example = "이월누적금액", name = "이월누적금액", dataType = "String") private String carryOver; @ApiModelProperty(example = "사용자ID개수", name = "사용자ID개수", dataType = "String") diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateAdminInfoTotalReqDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateAdminInfoTotalReqDto.java index deb0f00..e05f136 100644 --- a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateAdminInfoTotalReqDto.java +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateAdminInfoTotalReqDto.java @@ -12,6 +12,15 @@ public class UpdateAdminInfoTotalReqDto implements Serializable { @ApiModelProperty(example = "사용자ID", name = "사용자ID", dataType = "String") private String userId; + @ApiModelProperty(example = "사용자명", name = "사용자명", dataType = "String") + private String userNm; + + @ApiModelProperty(example = "핸드폰번호", name = "핸드폰번호", dataType = "String") + private String hpNo; + + @ApiModelProperty(example = "이메일", name = "이메일", dataType = "String") + private String email; + @ApiModelProperty(example = "사용자 상태", name = "사용자 상태", dataType = "String") private String userStat; diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateUserReqDto.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateUserReqDto.java index ebd4c1c..2e07814 100644 --- a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateUserReqDto.java +++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UpdateUserReqDto.java @@ -23,5 +23,7 @@ public class UpdateUserReqDto implements Serializable { private String userEmail; @ApiModelProperty(example = "사용자 상태", name = "사용자 상태", dataType = "String") private String userStat; + @ApiModelProperty(example = "라인타입", name = "라인타입", dataType = "String") + private String lineType; } diff --git a/src/main/resources/mapper/mysql/custMgt/custMgt-mapper.xml b/src/main/resources/mapper/mysql/custMgt/custMgt-mapper.xml index ea0ce3a..79275a9 100644 --- a/src/main/resources/mapper/mysql/custMgt/custMgt-mapper.xml +++ b/src/main/resources/mapper/mysql/custMgt/custMgt-mapper.xml @@ -373,6 +373,7 @@ esu.USER_ID as SERVICE_ID, esu.USER_SEQ, esu.HP_NO as mdn, + esu.EMAIL, ( SELECT DTL_CD_NM @@ -421,8 +422,7 @@ /* custMgt-mapper.xml(updateUserInfo) */ - UPDATE hubez_common.EZ_SVC_USER - SET + UPDATE hubez_common.EZ_SVC_USER SET CHG_ID = #{userId} ,CHG_DT = NOW() @@ -440,7 +440,11 @@ ,EMAIL = #{userEmail} - WHERE USER_ID = #{userId} + + ,LINE_TP_CD = #{lineType} + + WHERE + USER_ID = #{userId} @@ -864,6 +869,20 @@ WHERE USER_ID = #{userId} + + + /* custMgt-mapper.xml(updateMemberInfo) */ + UPDATE hubez_common.EZ_SVC_USER SET + USER_NM = #{userNm}, + HP_NO = #{hpNo}, + EMAIL = #{email}, + USER_STTUS_CD = #{userStat}, + LINE_TP_CD = #{lineType}, + CHG_ID = #{userId}, + CHG_DT = NOW() + WHERE + USER_ID = #{userId} + /* custMgt-mapper.xml(insertMemo) */