|
|
|
@ -556,7 +556,7 @@ namespace _24Hour.Controllers
|
|
|
|
|
[Route("cardIdLogin")] |
|
|
|
|
public async Task<Result> cardIdLogin(string cardId, string name) |
|
|
|
|
{ |
|
|
|
|
var date = await _db.Queryable<App_Sys_UserModel>().Where(q => q.IsDeleted == 0 && q.isdeactivate == 0 && q.cardId == cardId).FirstAsync(); |
|
|
|
|
var date = await _db.Queryable<App_Sys_UserModel>().Where(q => q.IsDeleted == 0 && q.cardId == cardId && q.name == name).FirstAsync(); |
|
|
|
|
if (date != null) |
|
|
|
|
{ |
|
|
|
|
//if (date.usertype == 1 && date.audit == null) |
|
|
|
@ -572,7 +572,7 @@ namespace _24Hour.Controllers
|
|
|
|
|
// return ret; |
|
|
|
|
// } |
|
|
|
|
// else |
|
|
|
|
if (date.usertype == 0 && date.becurrent == 1) |
|
|
|
|
if (date.usertype == 0 && date.becurrent == 1 && date.isdeactivate==1) |
|
|
|
|
{ |
|
|
|
|
ret.IsSucceed = false; |
|
|
|
|
ret.Message = $"用户未授权无法登录,请联系管理员!"; |
|
|
|
@ -615,6 +615,9 @@ namespace _24Hour.Controllers
|
|
|
|
|
ret.IsSucceed = true; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
var datea = await _db.Queryable<App_Sys_UserModel>().Where(q => q.IsDeleted == 0 && q.cardId == cardId).FirstAsync(); |
|
|
|
|
if (datea==null) |
|
|
|
|
{ |
|
|
|
|
var UserModel = new App_Sys_UserModel(); |
|
|
|
|
_db.BeginTran(); |
|
|
|
@ -633,6 +636,14 @@ namespace _24Hour.Controllers
|
|
|
|
|
ret.result = "添加成功"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
ret.IsSucceed = false; |
|
|
|
|
ret.Message = $"用户未授权无法登录,请联系管理员!"; |
|
|
|
|
return ret; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
return ret; |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|