parent
acbdbc0c83
commit
a85365ea48
|
|
@ -190,7 +190,7 @@
|
||||||
else if (capResult.obj.code == 1000) {
|
else if (capResult.obj.code == 1000) {
|
||||||
$("#ipaddress").html(capResult.obj.ip);
|
$("#ipaddress").html(capResult.obj.ip);
|
||||||
$("#boxmobile").html(capResult.obj.mobile);
|
$("#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) {
|
else if (capResult.obj.code == -1) {
|
||||||
cnt--;
|
cnt--;
|
||||||
|
|
|
||||||
|
|
@ -39,14 +39,15 @@ namespace NP.Base.Controllers
|
||||||
/// <param name="mobile"></param>
|
/// <param name="mobile"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public JsonResult SendLakey(String mobile)
|
public JsonResult SendLakey(String mobile, String no)
|
||||||
{
|
{
|
||||||
long result = 0;
|
long result = 0;
|
||||||
Random r = new Random();
|
Random r = new Random();
|
||||||
int lakey = r.Next(100000, 999999);
|
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 + "] 입니다.";
|
String msg = "[영남건설기술교육원]\n\n영남건설기술교육원 인증번호 [" + lakey + "] 입니다.";
|
||||||
Dao.Insert("common.smsauth", sa);
|
Dao.Insert("common.smsauth2", sa);
|
||||||
result = sa.authno;
|
result = sa.authno;
|
||||||
|
|
||||||
IList<NP.Model.MemoUser> us = new List<NP.Model.MemoUser>();
|
IList<NP.Model.MemoUser> us = new List<NP.Model.MemoUser>();
|
||||||
|
|
@ -162,7 +163,7 @@ namespace NP.Base.Controllers
|
||||||
//정보에 모바일번호 없는 경우
|
//정보에 모바일번호 없는 경우
|
||||||
if (u != null && !string.IsNullOrEmpty(u.mobile))
|
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
|
else
|
||||||
|
|
|
||||||
|
|
@ -479,6 +479,11 @@
|
||||||
values(now(),#lakey#,#lectno#);
|
values(now(),#lakey#,#lectno#);
|
||||||
<selectKey type="post" property="authno" resultClass="long">SELECT LAST_INSERT_ID()</selectKey>
|
<selectKey type="post" property="authno" resultClass="long">SELECT LAST_INSERT_ID()</selectKey>
|
||||||
</insert>
|
</insert>
|
||||||
|
<insert id="common.smsauth2" parameterClass="smsauth">
|
||||||
|
insert into smsauth(latime,lakey,userno)
|
||||||
|
values(now(),#lakey#,#userno#);
|
||||||
|
<selectKey type="post" property="authno" resultClass="long">SELECT LAST_INSERT_ID()</selectKey>
|
||||||
|
</insert>
|
||||||
<select id ="common.sms.chk" parameterClass="hashtable" resultClass="data">
|
<select id ="common.sms.chk" parameterClass="hashtable" resultClass="data">
|
||||||
select authno intval,lectno intval2,latime time,lakey strval
|
select authno intval,lectno intval2,latime time,lakey strval
|
||||||
from smsauth
|
from smsauth
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue