From da70ee8b828a2db0496aabc9fef9c20f7b7fee5c Mon Sep 17 00:00:00 2001
From: liaoxujun@qq.com <liaoxujun@qq.com>
Date: 星期一, 28 八月 2023 11:17:40 +0800
Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/DocumentService
---
DocumentServiceAPI.Application/UserAndLogin/LogInController.cs | 51 ++++++++++++++++++++++++++-------------------------
1 files changed, 26 insertions(+), 25 deletions(-)
diff --git a/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs b/DocumentServiceAPI.Application/UserAndLogin/LogInController.cs
index fa1f9fa..b9c52fd 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;
@@ -58,7 +60,7 @@
throw Oops.Oh("鐧诲綍淇℃伅鍑洪敊");
if(Parma.ITCode!= itcode)
throw Oops.Oh("鐢ㄦ埛鍚嶉敊璇�");
-
+ IsTokenPass=true;
}
@@ -74,7 +76,7 @@
case 0:
throw Oops.Oh($"璐︽埛鎴栬�呭瘑鐮侀敊璇�");
case 1:
- if (!needtoken)
+ if (!IsTokenPass)
{
needtoken = await _userService.CheckPsw(Tender[0].TenderId, Tender[0].EmployeeID, Parma.PassWord);
@@ -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