20220925 人员登录接口修改

This commit is contained in:
2022-09-25 17:46:49 +08:00
parent 5e4a7de2ac
commit 0bbeca57e6
8 changed files with 102 additions and 1284 deletions
+2 -9
View File
@@ -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();