Merge branch 'master' of https://gitee.com/frane-yang/SGGL_SeDin_New
This commit is contained in:
@@ -16,15 +16,9 @@ namespace BLL
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
var getPersons = db.Person_Persons.Where(x => !x.IsPost.HasValue || x.IsPost == true);
|
||||
var getUser = getPersons.FirstOrDefault(x => x.Account == userInfo.Account && x.Password == Funs.EncryptionPassword(userInfo.Password));
|
||||
if (getUser == null)
|
||||
{
|
||||
getUser = getPersons.FirstOrDefault(x => (x.Telephone == userInfo.Telephone || x.PersonName == userInfo.Account)
|
||||
&& x.IdentityCard != null && x.IdentityCard.Substring(x.IdentityCard.Length - 4) == userInfo.Password);
|
||||
}
|
||||
|
||||
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.Account != null || x.PersonId == Const.hfnbdId || x.PersonId == Const.sysglyId));
|
||||
if (getUser != null)
|
||||
{
|
||||
Model.UserItem newItem = new Model.UserItem();
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace BLL
|
||||
string clientId = SynchroSet.ClientId;
|
||||
string userName = SynchroSet.UserName;
|
||||
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);
|
||||
var getToken = new
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user