租户端登录限制admin账号登录

usertest
cjy 3 months ago
parent da87e104b0
commit e4b6cc61d6

@ -375,6 +375,10 @@ public class CommonService : ICommonService
/// <returns></returns>
public async Task<DataResult<string>> ClientUserLogin(UserLoginModel model)
{
if (model.UserName.ToLower().Trim() == "admin")
{
return await Task.FromResult(DataResult<string>.Failed("非租户端用户!"));
}
var userInfo = await db.Queryable<SysUser>().Filter(null, true)
.FirstAsync(x => x.UserCode == model.UserName && x.IsUseSystem == true);
if (userInfo == null)
@ -382,6 +386,7 @@ public class CommonService : ICommonService
return await Task.FromResult(DataResult<string>.Failed("账号不存在或账号禁用,请检查!"));
}
if (userInfo.MD5Password != model.Password)
{
return await Task.FromResult(DataResult<string>.Failed("密码错误!"));

Loading…
Cancel
Save