From 52c5616da8349d6f49f1346827fc723955c6394b Mon Sep 17 00:00:00 2001 From: lch Date: Tue, 8 Jun 2021 04:04:03 +0000 Subject: [PATCH] =?UTF-8?q?=EB=82=B4=EC=A0=95=EB=B3=B4=20=ED=95=99?= =?UTF-8?q?=EC=8A=B5=EC=9D=B8=EC=A6=9D=EC=88=98=EB=8B=A8=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dao/MyBatis/Maps/User.xml | 5 +- FO/Controllers/AccountController.cs | 213 +++++++++++-------------- FO/FO.csproj | 1 - FO/Views/Account/CertOk3IPIN.cshtml | 24 +++ FO/Views/Account/CertOk3MCHK.cshtml | 49 ------ FO/Views/Account/CertOk3MOBI.cshtml | 37 ++++- FO/Views/Account/JoinIdVeri.cshtml | 4 +- FO/Views/My/MyInfoCheck.cshtml | 31 +++- FO/Views/Shared/Partial/OkCert3.cshtml | 4 +- 9 files changed, 193 insertions(+), 175 deletions(-) delete mode 100644 FO/Views/Account/CertOk3MCHK.cshtml diff --git a/Dao/MyBatis/Maps/User.xml b/Dao/MyBatis/Maps/User.xml index abba62f..249ee11 100644 --- a/Dao/MyBatis/Maps/User.xml +++ b/Dao/MyBatis/Maps/User.xml @@ -351,7 +351,10 @@ ,status =case when #status# > 0 then #status# else status end ,ischkatt = #ischkatt# - ,authplatform = case when #authplatform# > 0 then #authplatform# else authplatform end + ,authplatform =case when #authplatform# > 0 then #authplatform# else authplatform end + ,di =case when #di# is not null then #di# else di end + ,ci =case when #ci# is not null then #ci# else ci end + ,vssn =case when #vssn# is not null then #vssn# else vssn end where userno=#userno# diff --git a/FO/Controllers/AccountController.cs b/FO/Controllers/AccountController.cs index cb0cb11..03a321f 100644 --- a/FO/Controllers/AccountController.cs +++ b/FO/Controllers/AccountController.cs @@ -468,12 +468,13 @@ namespace NP.FO.Controllers return View(); } + #region 본인인증 요청(mobile(가입이전,휴대폰인증),ipin) /// /// 본인인증 요청(mobile(가입이전,휴대폰인증),ipin) /// /// /// - public ActionResult CertOk3Req(String sel) + public ActionResult CertOk3Req(String sel, String reason) { String CP_CD = "V47690000000"; String SITE_NAME = "YNICTE"; @@ -481,7 +482,14 @@ namespace NP.FO.Controllers String REQ_URL = ""; String RETURN_MSG = ""; String SITE_URL = GetConfig("fronturl"); - String RQST_CAUS_CD = "00"; + //인증요청사유코드 + //00 : 회원가입 + //01 : 성인인증 + //02 : 회원정보수정 + //03 : 비밀번호찾기 + //04 : 상품구매 + //99 : 기타 + String RQST_CAUS_CD = reason == "Join" ? "00" : "02"; String target = "PROD"; String param = null; String RSLT_CD = null; @@ -498,8 +506,8 @@ namespace NP.FO.Controllers ViewBag.PopupUrl = ""; //return url 설정 - RETURN_URL = GetConfig("fronturl") + "/Account/CertOk3" + sel; - RTN_URL = GetConfig("fronturl") + "/Account/CertOk3" + sel; + RETURN_URL = GetConfig("fronturl") + "/Account/CertOk3" + sel + "?reason=" + reason; + RTN_URL = GetConfig("fronturl") + "/Account/CertOk3" + sel + "?reason=" + reason; //모바일팝업 if (sel == "MOBI" || sel == "MCHK") { @@ -560,13 +568,15 @@ namespace NP.FO.Controllers } ViewBag.result = CP_CD + ":" + RSLT_CD + ":" + RSLT_MSG + ":" + MDL_TKN + ":" + TX_SEQ_No; return View(); - } + } + #endregion + #region 휴대폰인증 결과 /// /// 휴대폰인증 결과 /// /// - public ActionResult CertOk3MOBI() + public ActionResult CertOk3MOBI(string reason) { String MDL_TKN = Request["MDL_TKN"]; String CP_CD = "V47690000000"; @@ -635,11 +645,50 @@ namespace NP.FO.Controllers TEL_NO = string.IsNullOrEmpty(TEL_NO) || TEL_NO.Replace("-", "").Length < 10 ? (TEL_NO ?? "") : TEL_NO.Replace("-", "").Length == 10 ? string.Format("{0}-{1}-{2}", TEL_NO.Replace("-", "").Substring(0, 3), TEL_NO.Replace("-", "").Substring(3, 3), TEL_NO.Replace("-", "").Substring(6)) : string.Format("{0}-{1}-{2}", TEL_NO.Replace("-", "").Substring(0, 3), TEL_NO.Replace("-", "").Substring(3, 4), TEL_NO.Replace("-", "").Substring(7)); if (!string.IsNullOrEmpty(TEL_NO)) { - IList chk = Dao.Get("users.users", new System.Collections.Hashtable() { { "mobile", TEL_NO } }); - if (chk.Count() > 0) + if (reason == "Join") { - RSLT_CD = "U000"; - RSLT_MSG = "이미 해당 휴대폰번호로 등록된 회원이 존재합니다."; + IList chk = Dao.Get("users.users", new System.Collections.Hashtable() { { "mobile", TEL_NO } }); + if (chk.Count() > 0) + { + RSLT_CD = "U000"; + RSLT_MSG = "이미 해당 휴대폰번호로 등록된 회원이 존재합니다."; + } + } + else if (reason == "AuthPlatformChange") + { + if (SUserInfo.UserNo > 0) + { + //정보수정시 본인제외 체크를 위해 usernonot추가 + IList chk = Dao.Get("users.users", new System.Collections.Hashtable() { { "mobile", TEL_NO }, { "usernonot", SUserInfo.UserNo } }); + if (chk.Count() > 0) + { + RSLT_CD = "U000"; + RSLT_MSG = "이미 해당 휴대폰번호로 등록된 회원이 존재합니다."; + } + } + else + { + RSLT_CD = "U999"; + RSLT_MSG = "비로그인"; + } + } + else if (reason == "MobileNumberChange") + { + if (SUserInfo.UserNo > 0) + { + //정보수정시 본인제외 체크를 위해 usernonot추가 + IList chk = Dao.Get("users.users", new System.Collections.Hashtable() { { "mobile", TEL_NO }, { "usernonot", SUserInfo.UserNo } }); + if (chk.Count() > 0) + { + RSLT_CD = "U000"; + RSLT_MSG = "이미 해당 휴대폰번호로 등록된 회원이 존재합니다."; + } + } + else + { + RSLT_CD = "U999"; + RSLT_MSG = "비로그인"; + } } } else @@ -655,113 +704,18 @@ namespace NP.FO.Controllers + DI + ":" + CI + ":" + CI_UPDATE + ":" + TEL_COM_CD + ":" + TEL_NO + ":" + RETURN_MSG; Dao.Save("sys.kcblog.in", new System.Collections.Hashtable() { { "cp_cd", CP_CD }, { "mobile", TEL_NO }, { "logmsg", "RSLT_CD:" + RSLT_CD + "&RSLT_MSG:" + RSLT_MSG } }); + ViewBag.reason = reason; } return View(); - } - - /// - /// 휴대폰인증 결과 - /// - /// - public ActionResult CertOk3MCHK() - { - String MDL_TKN = Request["MDL_TKN"]; - String CP_CD = "V47690000000"; - String target = "PROD"; - String svcName = "IDS_HS_POPUP_RESULT"; - String license = "C:\\Windows\\SysWOW64\\" + CP_CD + "_IDS_01_" + target + "_AES_license.dat"; - String TX_SEQ_NO = null; - String RSLT_CD = null; - String RSLT_MSG = null; - - String RSLT_NAME = null; - String RSLT_BIRTHDAY = null; - String RSLT_SEX_CD = null; - String RSLT_NTV_FRNR_CD = null; - String DI = null; - String CI = null; - String CI_UPDATE = null; - String TEL_COM_CD = null; - String TEL_NO = null; - String RETURN_MSG = null; - - JObject reqJson = new JObject(); - JObject outputobj = new JObject(); - reqJson.Add("MDL_TKN", MDL_TKN); - - String param = JsonConvert.SerializeObject(reqJson); - reqJson.RemoveAll(); - reqJson = null; - - OkCert3 myObject = new OkCert3Com.OkCert3() { }; - if (myObject == null) - { - RETURN_MSG = null; - } - else - { - dynamic ret = myObject.callOkCert3(target, CP_CD, svcName, param, license, out object mOut); - ViewBag.ret = ret; - myObject = null; - - outputobj = JObject.FromObject(JsonConvert.DeserializeObject(mOut.ToString())); - TX_SEQ_NO = outputobj["TX_SEQ_NO"].ToString(); - RSLT_CD = outputobj["RSLT_CD"].ToString(); - RSLT_MSG = outputobj["RSLT_MSG"].ToString(); - RETURN_MSG = outputobj["RETURN_MSG"].ToString(); - - if (RSLT_CD == "B000") - { - RSLT_NAME = outputobj["RSLT_NAME"].ToString(); - RSLT_BIRTHDAY = outputobj["RSLT_BIRTHDAY"].ToString(); - RSLT_SEX_CD = outputobj["RSLT_SEX_CD"].ToString(); - RSLT_NTV_FRNR_CD = outputobj["RSLT_NTV_FRNR_CD"].ToString(); - DI = outputobj["DI"].ToString(); - CI = outputobj["CI"].ToString(); - CI_UPDATE = outputobj["CI_UPDATE"].ToString(); - TEL_COM_CD = outputobj["TEL_COM_CD"].ToString(); - TEL_NO = outputobj["TEL_NO"].ToString(); - //Users users = new Users() - //{ - // username = RSLT_NAME, - // birthday = RSLT_BIRTHDAY, - // di=DI, - // mobile = TEL_NO, - // jointype=0 - //}; - TEL_NO = string.IsNullOrEmpty(TEL_NO) || TEL_NO.Replace("-", "").Length < 10 ? (TEL_NO ?? "") : TEL_NO.Replace("-", "").Length == 10 ? string.Format("{0}-{1}-{2}", TEL_NO.Replace("-", "").Substring(0, 3), TEL_NO.Replace("-", "").Substring(3, 3), TEL_NO.Replace("-", "").Substring(6)) : string.Format("{0}-{1}-{2}", TEL_NO.Replace("-", "").Substring(0, 3), TEL_NO.Replace("-", "").Substring(3, 4), TEL_NO.Replace("-", "").Substring(7)); - if (!string.IsNullOrEmpty(TEL_NO)) - { - //정보수정시 본인제외 체크를 위해 usernonot추가 - IList chk = Dao.Get("users.users", new System.Collections.Hashtable() { { "mobile", TEL_NO },{ "usernonot",SUserInfo.UserNo} }); - if (chk.Count() > 0) - { - RSLT_CD = "U000"; - RSLT_MSG = "이미 해당 휴대폰번호로 등록된 회원이 존재합니다."; - } - } - else - { - RSLT_CD = "U001"; - RSLT_MSG = "휴대폰 번호 오류"; - } - } - outputobj = null; - mOut = null; - ViewBag.result = CP_CD + ":" + TX_SEQ_NO + ":" + RSLT_CD + ":" + RSLT_MSG + ":" - + RSLT_NAME + ":" + RSLT_BIRTHDAY + ":" + RSLT_SEX_CD + ":" + RSLT_NTV_FRNR_CD + ":" - + DI + ":" + CI + ":" + CI_UPDATE + ":" + TEL_COM_CD + ":" - + TEL_NO + ":" + RETURN_MSG; - Dao.Save("sys.kcblog.in", new System.Collections.Hashtable() { { "cp_cd", CP_CD }, { "mobile", TEL_NO }, { "logmsg", "RSLT_CD:" + RSLT_CD + "&RSLT_MSG:" + RSLT_MSG } }); - } - return View(); - } + } + #endregion + #region IPIN인증 결과 /// /// IPIN인증 결과 /// /// - public ActionResult CertOk3IPIN() + public ActionResult CertOk3IPIN(string reason) { String MDL_TKN = Request["MDL_TKN"]; String CP_CD = "V47690000000"; @@ -828,11 +782,36 @@ namespace NP.FO.Controllers //}; if (!string.IsNullOrEmpty(VSSN)) { - IList chk = Dao.Get("users.users", new System.Collections.Hashtable() { { "vssn", VSSN } }); - if (chk.Count() > 0) + if (reason == "Join") { - RSLT_CD = "U000"; - RSLT_MSG = "이미 해당 ipin으로 등록된 회원이 존재합니다."; + IList chk = Dao.Get("users.users", new System.Collections.Hashtable() { { "vssn", VSSN } }); + if (chk.Count() > 0) + { + RSLT_CD = "U000"; + RSLT_MSG = "이미 해당 ipin으로 등록된 회원이 존재합니다."; + } + } + else if (reason == "AuthPlatformChange") + { + if (SUserInfo.UserNo > 0) + { + //정보수정시 본인제외 체크를 위해 usernonot추가 + IList chk = Dao.Get("users.users", new System.Collections.Hashtable() { { "vssn", VSSN }, { "usernonot", SUserInfo.UserNo } }); + if (chk.Count() > 0) + { + RSLT_CD = "U000"; + RSLT_MSG = "이미 해당 ipin으로 등록된 회원이 존재합니다."; + } + } + else + { + RSLT_CD = "U999"; + RSLT_MSG = "비로그인"; + } + } + else if (reason == "LectinningAuth") + { + } } else @@ -848,10 +827,12 @@ namespace NP.FO.Controllers + DI + ":" + CI + ":" + CI_UPDATE + ":" + VSSN + ":" + RETURN_MSG; //vm.stringval = "CP_CD:" + CP_CD + "&RSLT_CD:" + RSLT_CD + "&RSLT_MSG:" + RSLT_MSG; - Dao.Save("sys.kcblog.in", new System.Collections.Hashtable() { {"cp_cd",CP_CD },{"vssn", VSSN}, { "logmsg", "RSLT_CD:" + RSLT_CD + "&RSLT_MSG:" + RSLT_MSG } }); + Dao.Save("sys.kcblog.in", new System.Collections.Hashtable() { { "cp_cd", CP_CD }, { "vssn", VSSN }, { "logmsg", "RSLT_CD:" + RSLT_CD + "&RSLT_MSG:" + RSLT_MSG } }); + ViewBag.reason = reason; } return View(); - } + } + #endregion public ActionResult NaverCallback() { diff --git a/FO/FO.csproj b/FO/FO.csproj index f724e62..747af24 100644 --- a/FO/FO.csproj +++ b/FO/FO.csproj @@ -700,7 +700,6 @@ - diff --git a/FO/Views/Account/CertOk3IPIN.cshtml b/FO/Views/Account/CertOk3IPIN.cshtml index 6daf2f8..b050573 100644 --- a/FO/Views/Account/CertOk3IPIN.cshtml +++ b/FO/Views/Account/CertOk3IPIN.cshtml @@ -24,6 +24,8 @@ $(document).ready(function () { if ('@(ViewBag.ret)' == '0') { if ('@(RSLT_CD)' == 'T000') { + @if (ViewBag.reason == "Join") { + $(opener.document).find("#mform").find("#User_username").val("@(RSLT_NAME)"); $(opener.document).find("#mform").find("#User_birthday").val("@(RSLT_BIRTHDAY)"); $(opener.document).find("#mform").find("#User_vssn").val("@(VSSN)"); @@ -34,6 +36,28 @@ $(opener.document).find("#mform").attr("action", "/Account/Join"); $(opener.document).find("#mform").submit(); self.close(); + + } else if (ViewBag.reason == "AuthPlatformChange") { + + if ("@(RSLT_NAME)" == $(opener.document).find("#mform").find("#username").val()) { + $(opener.document).find("#mform").find("#authplatform").val("@(AuthPlatform.IPIN.GetHashCode())"); + $(opener.document).find("#mform").find("#birthday").val("@(RSLT_BIRTHDAY)"); + $(opener.document).find("#mform").find("#di").val("@(DI)"); + $(opener.document).find("#mform").find("#ci").val("@(CI)"); + $(opener.document).find("#mform").find("#vssn").val("@(VSSN)"); + $(opener.document).find("#mform").find("#authPlatform_IPIN").show(); + $(opener.document).find("#mform").find("#authPlatform_Mobile").hide(); + alert("인증완료"); + } else { + alert("입력한 정보와 일치하지 않습니다.\n 재인증해주세요."); + } + self.close(); + + } else if (ViewBag.reason == "LectinningAuth") { + + self.close(); + + } } else { alert("인증요청 실패 : " + "@(RSLT_MSG)"); self.close(); diff --git a/FO/Views/Account/CertOk3MCHK.cshtml b/FO/Views/Account/CertOk3MCHK.cshtml deleted file mode 100644 index 030bb26..0000000 --- a/FO/Views/Account/CertOk3MCHK.cshtml +++ /dev/null @@ -1,49 +0,0 @@ -@{ - Layout = null; - var CP_CD = (ViewBag.result ?? "").Split(':')[0]; - var TX_SEQ_NO = (ViewBag.result ?? "").Split(':')[1]; - var RSLT_CD = (ViewBag.result ?? "").Split(':')[2]; - var RSLT_MSG = (ViewBag.result ?? "").Split(':')[3]; - var RSLT_NAME = (ViewBag.result ?? "").Split(':')[4]; - var RSLT_BIRTHDAY = (ViewBag.result ?? "").Split(':')[5]; - var RSLT_SEX_CD = (ViewBag.result ?? "").Split(':')[6]; - var RSLT_NTV_FRNR_CD = (ViewBag.result ?? "").Split(':')[7]; - var DI = (ViewBag.result ?? "").Split(':')[8]; - var CI = (ViewBag.result ?? "").Split(':')[9]; - var CI_UPDATE = (ViewBag.result ?? "").Split(':')[10]; - var TEL_COM_CD = (ViewBag.result ?? "").Split(':')[11]; - var TEL_NO = (ViewBag.result ?? "").Split(':')[12]; - var RETURN_MSG = (ViewBag.result ?? "").Split(':')[13]; -} - - -
-
- - \ No newline at end of file diff --git a/FO/Views/Account/CertOk3MOBI.cshtml b/FO/Views/Account/CertOk3MOBI.cshtml index f87e616..31c42c7 100644 --- a/FO/Views/Account/CertOk3MOBI.cshtml +++ b/FO/Views/Account/CertOk3MOBI.cshtml @@ -21,10 +21,12 @@
- \ No newline at end of file