From f66bb641b292201db695bcc4f27763d70bec88bf Mon Sep 17 00:00:00 2001 From: lingyang <369845068@qq.com> Date: Fri, 30 Jun 2023 09:46:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A6=E5=8F=B7=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 24Hour/24Hour.csproj.user | 14 +++---- 24Hour/Controllers/LoginController.cs | 41 +++++++++++-------- .../PublishProfiles/FolderProfile.pubxml | 36 ++++++++-------- .../PublishProfiles/FolderProfile.pubxml.user | 16 ++++---- 4 files changed, 57 insertions(+), 50 deletions(-) diff --git a/24Hour/24Hour.csproj.user b/24Hour/24Hour.csproj.user index 044b8de..7e26453 100644 --- a/24Hour/24Hour.csproj.user +++ b/24Hour/24Hour.csproj.user @@ -1,8 +1,8 @@ - - - - MvcControllerEmptyScaffolder - root/Common/MVC/Controller - E:\Code\24Hour.Service\24Hour\Properties\PublishProfiles\FolderProfile.pubxml - + + + + MvcControllerEmptyScaffolder + root/Common/MVC/Controller + E:\24Hour.Service\24Hour\Properties\PublishProfiles\FolderProfile.pubxml + \ No newline at end of file diff --git a/24Hour/Controllers/LoginController.cs b/24Hour/Controllers/LoginController.cs index 6a27c86..e9a08a1 100644 --- a/24Hour/Controllers/LoginController.cs +++ b/24Hour/Controllers/LoginController.cs @@ -142,6 +142,13 @@ namespace _24Hour.Controllers try { var Passmd5 = Md5.Encrypt32(login.Password).ToLower(); + var model = await _db.Queryable().Where(x => x.phone== login.phone && x.IsDeleted==0).FirstAsync(); + if (model == null) + { + ret.IsSucceed = false; + ret.Message = "˺Ųڣעᣡ"; + return ret; + } var date = await _db.Queryable().Where(q => q.IsDeleted == 0 && q.isdeactivate == 0 && q.phone == login.phone && q.Password == Passmd5).FirstAsync(); if (date != null) { @@ -197,7 +204,7 @@ namespace _24Hour.Controllers phone = date.phone, photo = date.photo, duties = date.duties, - identity=date.identity, + identity = date.identity, usertype = date.usertype, unitCode = date.unitCode, department = "", @@ -371,25 +378,25 @@ namespace _24Hour.Controllers [HttpGet] [Route("cardIdLogin")] - public async Task cardIdLogin(string cardId,string name) + public async Task cardIdLogin(string cardId, string name) { var date = await _db.Queryable().Where(q => q.IsDeleted == 0 && q.isdeactivate == 0 && q.cardId == cardId).FirstAsync(); if (date != null) - { - //if (date.usertype == 1 && date.audit == null) - // { - // ret.IsSucceed = false; - // ret.Message = "ûУ"; - // return ret; - // } - // else if (date.usertype == 1 && date.audit == 1) - // { - // ret.IsSucceed = false; - // ret.Message = $"ûδͨԭ{date.describe}"; - // return ret; - // } - // else - if (date.usertype == 0 && date.becurrent == 1) + { + //if (date.usertype == 1 && date.audit == null) + // { + // ret.IsSucceed = false; + // ret.Message = "ûУ"; + // return ret; + // } + // else if (date.usertype == 1 && date.audit == 1) + // { + // ret.IsSucceed = false; + // ret.Message = $"ûδͨԭ{date.describe}"; + // return ret; + // } + // else + if (date.usertype == 0 && date.becurrent == 1) { ret.IsSucceed = false; ret.Message = $"ûδȨ޷¼ϵԱ"; diff --git a/24Hour/Properties/PublishProfiles/FolderProfile.pubxml b/24Hour/Properties/PublishProfiles/FolderProfile.pubxml index 927df5d..6fdc1cf 100644 --- a/24Hour/Properties/PublishProfiles/FolderProfile.pubxml +++ b/24Hour/Properties/PublishProfiles/FolderProfile.pubxml @@ -1,21 +1,21 @@ - + - - - true - false - true - Release - Any CPU - FileSystem - C:\Users\Administrator\Desktop\新建文件夹 (4) - FileSystem - <_TargetId>Folder - - net6.0 - 9cc60d58-cc75-4bf7-a854-3220e725cd8c - false - +--> + + + true + false + true + Release + Any CPU + FileSystem + D:\24小时发布 + FileSystem + <_TargetId>Folder + + net6.0 + 9cc60d58-cc75-4bf7-a854-3220e725cd8c + false + \ No newline at end of file diff --git a/24Hour/Properties/PublishProfiles/FolderProfile.pubxml.user b/24Hour/Properties/PublishProfiles/FolderProfile.pubxml.user index c455b3d..d2fb2c6 100644 --- a/24Hour/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/24Hour/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -1,11 +1,11 @@ - + - - - <_PublishTargetUrl>C:\Users\Administrator\Desktop\新建文件夹 (4) - True|2023-06-27T10:06:12.3724487Z;True|2023-06-27T17:22:11.4211972+08:00;True|2023-06-27T15:48:34.1728433+08:00;True|2023-06-13T18:05:11.2568840+08:00;False|2023-06-13T18:04:56.9546003+08:00; - - +--> + + + <_PublishTargetUrl>D:\24小时发布 + True|2023-06-29T08:07:09.3334291Z;True|2023-06-29T15:56:52.9510718+08:00;True|2023-06-29T15:49:16.8161173+08:00;True|2023-06-27T18:06:12.3724487+08:00;True|2023-06-27T17:22:11.4211972+08:00;True|2023-06-27T15:48:34.1728433+08:00;True|2023-06-13T18:05:11.2568840+08:00;False|2023-06-13T18:04:56.9546003+08:00; + + \ No newline at end of file