|
@@ -60,6 +60,16 @@ namespace ZhonTai.Admin.Services.DiTuiAPI
|
|
[NoOprationLog]
|
|
[NoOprationLog]
|
|
public async Task<dynamic> LoginAsync(LoginInput input)
|
|
public async Task<dynamic> LoginAsync(LoginInput input)
|
|
{
|
|
{
|
|
|
|
+ var platform = _httpContextAccessor.HttpContext.Request.Headers["platform"];
|
|
|
|
+
|
|
|
|
+ if (string.IsNullOrEmpty(platform))
|
|
|
|
+ {
|
|
|
|
+ throw ResultOutput.Exception($"平台编码不可为空");
|
|
|
|
+ }
|
|
|
|
+ var org = await _orgRepository.Select.Where(a => a.Code == platform).DisableGlobalFilter()
|
|
|
|
+ .FirstAsync(a => new { a.Name, a.TenantId });
|
|
|
|
+
|
|
|
|
+
|
|
using (_platformUserRepository.DataFilter.DisableAll())
|
|
using (_platformUserRepository.DataFilter.DisableAll())
|
|
{
|
|
{
|
|
var sw = new Stopwatch();
|
|
var sw = new Stopwatch();
|
|
@@ -107,7 +117,7 @@ namespace ZhonTai.Admin.Services.DiTuiAPI
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
#region 登录
|
|
#region 登录
|
|
- var user = await _platformUserRepository.Select.Where(a => a.Phone == input.mobile).ToOneAsync();
|
|
|
|
|
|
+ var user = await _platformUserRepository.Select.Where(a => a.Phone == input.mobile && a.TenantId == org.TenantId).ToOneAsync();
|
|
var valid = user?.Id > 0;
|
|
var valid = user?.Id > 0;
|
|
if (valid)
|
|
if (valid)
|
|
{
|
|
{
|