Browse Source

[WHAT] 修正ticket 過期時間

Dev
berlin-tzen 2 years ago
parent
commit
30d80914c7
  1. 9
      EuroTran/EasyBL.WEBAPP/ShowEasy/SystemService.cs

9
EuroTran/EasyBL.WEBAPP/ShowEasy/SystemService.cs

@ -163,17 +163,14 @@ namespace EasyBL.WEBAPP.SYS
// LoginIp = i_crm.ClientIP, // LoginIp = i_crm.ClientIP,
LoginTime = DateTime.Now LoginTime = DateTime.Now
}; };
var iExpireTime = 240;
var iExpireTime = 720; // 30 Days = 720 hrs
var sExpireTime = Common.GetSystemSetting(db, oUser.OrgID, @"SEexpireTime"); var sExpireTime = Common.GetSystemSetting(db, oUser.OrgID, @"SEexpireTime");
if (!string.IsNullOrEmpty(sExpireTime)) if (!string.IsNullOrEmpty(sExpireTime))
{ {
iExpireTime = int.Parse(sExpireTime); iExpireTime = int.Parse(sExpireTime);
} }
else
{
iExpireTime = int.Parse(Common.GetAppSettings(@"SEexpireTime"));
}
ticket.ExpireTime = DateTime.Now.AddMinutes(iExpireTime); //30天過期
ticket.ExpireTime = DateTime.Now.AddHours(iExpireTime); //30天過期
ticket.IsVerify = @"Y"; ticket.IsVerify = @"Y";
var oTicket = db.Queryable<OTB_SYS_TicketAuth>().Single(x => x.OrgID == oUser.OrgID && x.UserID == oUser.Account); var oTicket = db.Queryable<OTB_SYS_TicketAuth>().Single(x => x.OrgID == oUser.OrgID && x.UserID == oUser.Account);
if (oTicket != null) if (oTicket != null)

Loading…
Cancel
Save