|
|
@@ -739,6 +739,54 @@ namespace Learun.Application.Web.Controllers |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[HttpGet] |
|
|
|
public ActionResult CheckLoginForSSOBC(string u) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
string uid = Request.QueryString["u"]; |
|
|
|
if (!string.IsNullOrEmpty(uid)) |
|
|
|
{ |
|
|
|
string username = uid; |
|
|
|
string password = "www.qj.com"; |
|
|
|
UserEntity userEntity = userBll.CheckLogin(username, Md5Helper.Encrypt(password, 32)); |
|
|
|
|
|
|
|
LogEntity logEntity = new LogEntity(); |
|
|
|
logEntity.F_CategoryId = 1; |
|
|
|
logEntity.F_OperateTypeId = ((int)OperationType.Login).ToString(); |
|
|
|
logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Login); |
|
|
|
logEntity.F_OperateAccount = username + "(" + userEntity.F_RealName + ")"; |
|
|
|
logEntity.F_OperateUserId = !string.IsNullOrEmpty(userEntity.F_UserId) ? userEntity.F_UserId : username; |
|
|
|
logEntity.F_Module = "接口登录"; |
|
|
|
logEntity.F_Description = "PC端"; |
|
|
|
if (!userEntity.LoginOk)//登录失败 |
|
|
|
{ |
|
|
|
//写入日志 |
|
|
|
logEntity.F_ExecuteResult = 0; |
|
|
|
logEntity.F_ExecuteResultJson = "接口登录失败:" + userEntity.LoginMsg; |
|
|
|
logEntity.WriteLog(); |
|
|
|
return Fail(userEntity.LoginMsg); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
//OperatorHelper.Instance.AddLoginUser(userEntity.F_Account, "Learun_ADMS_6.1_PC", null);//写入缓存信息 |
|
|
|
//写入日志 |
|
|
|
logEntity.F_ExecuteResult = 1; |
|
|
|
logEntity.F_ExecuteResultJson = "无ui接口登录成功"; |
|
|
|
logEntity.WriteLog(); |
|
|
|
return Success("login success"); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
return Fail("参数错误"); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception e) |
|
|
|
{ |
|
|
|
return Fail("参数错误"); |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
|
#region 微信登录 |
|
|
|