20220928登录接口方法修改

This commit is contained in:
杨红卫 2022-09-28 15:47:47 +08:00
parent 0bbeca57e6
commit 04babbce4a
2 changed files with 3 additions and 2 deletions

View File

@ -17,7 +17,8 @@ namespace BLL
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
var getUser = db.Person_Persons.FirstOrDefault(x =>( x.Account == userInfo.Account || x.Telephone == userInfo.Telephone || x.PersonName == userInfo.Account) var getUser = db.Person_Persons.FirstOrDefault(x =>( x.Account == userInfo.Account || x.Telephone == userInfo.Telephone || x.PersonName == userInfo.Account)
&& x.Password == Funs.EncryptionPassword(userInfo.Password) && (!x.IsPost.HasValue || x.IsPost == true) && x.RoleIds != null); && x.Password == Funs.EncryptionPassword(userInfo.Password) && (!x.IsPost.HasValue || x.IsPost == true)
&& (x.Account != null || x.PersonId == Const.hfnbdId || x.PersonId == Const.sysglyId));
if (getUser != null) if (getUser != null)
{ {
Model.UserItem newItem = new Model.UserItem(); Model.UserItem newItem = new Model.UserItem();

View File

@ -195,7 +195,7 @@ namespace BLL
string clientId = SynchroSet.ClientId; string clientId = SynchroSet.ClientId;
string userName = SynchroSet.UserName; string userName = SynchroSet.UserName;
string password = Funs.EncryptionPassword(SynchroSet.Password); string password = Funs.EncryptionPassword(SynchroSet.Password);
string timestamp = string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now.AddMinutes(-2)); string timestamp = string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now.AddMinutes(-3));
string sign = Funs.EncryptionPassword(clientId + userName + password + timestamp); string sign = Funs.EncryptionPassword(clientId + userName + password + timestamp);
var getToken = new var getToken = new
{ {