From 4115c46ea22c90198d46eecbe33be1703fd0cf6f Mon Sep 17 00:00:00 2001
From: liaoxujun@qq.com <liaoxujun@qq.com>
Date: 星期五, 25 八月 2023 15:57:21 +0800
Subject: [PATCH] 修改支付授权建立租户
---
DocumentServiceAPI.Application/UserAndLogin/LogInController.cs | 47 ++++++++++++++++++++++++-----------------------
1 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs b/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs
index 2eed030..c7e2d91 100644
--- a/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs
+++ b/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs
@@ -1,5 +1,7 @@
锘縰sing DocumentServiceAPI.Application.UserAndLogin.Services;
using DocumentServiceAPI.Application.UserAndLogin.ViewMode;
+using DocumentServiceAPI.Model.cyDocumentModel;
+using DocumentServiceAPI.Model.UserInfoModel;
using DocumentServiceAPI.Utility;
using Furion.DynamicApiController;
using Furion.JsonSerialization;
@@ -193,34 +195,33 @@
}
-
-
-
-
-
-
-
/// <summary>
- /// 鑾峰彇鍏徃鍒楄〃
+ /// 鏄惁鏄敤鎴风鎴凤紝鎴栬�呮槸鍛樺伐
/// </summary>
- /// <returns>鐧诲綍淇℃伅</returns>
- public bool GetUnitList()
+ /// <param name="ITCode">璐﹀彿</param>
+ /// <returns> 杩斿洖true 浠h〃鏄紝 false浠h〃涓嶆槸</returns>
+ [HttpGet("IDIsEmployee")]
+ public async Task<bool> IDIsEmployee(string ITCode, [FromServices] ISqlSugarClient db)
{
+ var ad= ITCode.TryValidate(ValidationTypes.PhoneNumber);
+ if(!ad.IsValid)
+ {
+ throw Oops.Oh("璇疯緭鍏ユ纭殑璐﹀彿");
+ }
+
+ var count= await db.Queryable<TenantInfo>().Where(x=>x.ItCode==ITCode&&x.IsEn==true&&x.IsDel==false).WithCache(600).CountAsync();
+ if (count > 0)
+ return true;
+ count=await db.Queryable<Document_EmployeeInfo>().Where(x=>x.UserName==ITCode).WithCache(600).CountAsync();
+ if (count > 0)
+ return true;
+ return false;
- return true;
}
- /// <summary>
- /// 鑾峰彇鍏徃鍒楄〃
- /// </summary>
- /// <returns>鐧诲綍淇℃伅</returns>
- public bool GetTenantInfoList()
- {
- return true;
- }
- public string Get()
- {
- return $"Hello {nameof(Furion)}";
- }
+
+
+
+
}
}
--
Gitblit v1.9.1