From a85365ea4814bccb01220d3827c30ea991ef704d Mon Sep 17 00:00:00 2001 From: jity7777 Date: Tue, 12 Apr 2022 03:12:25 +0000 Subject: [PATCH] =?UTF-8?q?<=EA=B8=B0=EB=8A=A5=EA=B0=9C=EC=84=A0>=201.=20P?= =?UTF-8?q?MS=20NO=20:=202.=20(=EC=A3=BC=EC=9A=94)=EC=9E=91=EC=97=85?= =?UTF-8?q?=EB=82=B4=EC=9A=A9=20(1)=20=EC=B6=94=EA=B0=80=20=EA=B0=9C?= =?UTF-8?q?=EB=B0=9C=20=EA=B4=80=EB=A0=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/Views/Account/Index.cshtml | 2 +- Base/Controller/AOCommon.cs | 9 +++++---- Dao/MyBatis/Maps/Common.xml | 5 +++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/BO/Views/Account/Index.cshtml b/BO/Views/Account/Index.cshtml index 71e221a..7b643c6 100644 --- a/BO/Views/Account/Index.cshtml +++ b/BO/Views/Account/Index.cshtml @@ -190,7 +190,7 @@ else if (capResult.obj.code == 1000) { $("#ipaddress").html(capResult.obj.ip); $("#boxmobile").html(capResult.obj.mobile); - capp("/aocommon/sendlakey", { mobile: capResult.obj.mobile }, "sendkey"); + capp("/aocommon/sendlakey", { mobile: capResult.obj.mobile, no : capResult.obj.no }, "sendkey"); } else if (capResult.obj.code == -1) { cnt--; diff --git a/Base/Controller/AOCommon.cs b/Base/Controller/AOCommon.cs index 7493abb..1c539b8 100644 --- a/Base/Controller/AOCommon.cs +++ b/Base/Controller/AOCommon.cs @@ -39,14 +39,15 @@ namespace NP.Base.Controllers /// /// [HttpPost] - public JsonResult SendLakey(String mobile) + public JsonResult SendLakey(String mobile, String no) { long result = 0; Random r = new Random(); int lakey = r.Next(100000, 999999); - SmsAuth sa = new SmsAuth() { lakey = lakey.ToString(), userno=SUserInfo.UserNo }; + //SmsAuth sa = new SmsAuth() { lakey = lakey.ToString(), userno=SUserInfo.UserNo }; + SmsAuth sa = new SmsAuth() { lakey = lakey.ToString(), userno = long.Parse(no) }; String msg = "[영남건설기술교육원]\n\n영남건설기술교육원 인증번호 [" + lakey + "] 입니다."; - Dao.Insert("common.smsauth", sa); + Dao.Insert("common.smsauth2", sa); result = sa.authno; IList us = new List(); @@ -162,7 +163,7 @@ namespace NP.Base.Controllers //정보에 모바일번호 없는 경우 if (u != null && !string.IsNullOrEmpty(u.mobile)) { - return JsonBack(new { code = 1000, ip = ip, mobile = u.mobile }); + return JsonBack(new { code = 1000, ip = ip, mobile = u.mobile, no = u.userno }); } //기타에러 else diff --git a/Dao/MyBatis/Maps/Common.xml b/Dao/MyBatis/Maps/Common.xml index e90bc6b..02f7f87 100644 --- a/Dao/MyBatis/Maps/Common.xml +++ b/Dao/MyBatis/Maps/Common.xml @@ -479,6 +479,11 @@ values(now(),#lakey#,#lectno#); SELECT LAST_INSERT_ID() + + insert into smsauth(latime,lakey,userno) + values(now(),#lakey#,#userno#); + SELECT LAST_INSERT_ID() +