20220925 人员登录接口修改
This commit is contained in:
@@ -16,15 +16,8 @@ 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.RoleIds != null);
|
||||
if (getUser != null)
|
||||
{
|
||||
Model.UserItem newItem = new Model.UserItem();
|
||||
|
||||
Reference in New Issue
Block a user