From e03cb26174f7632ecf2992680b18ae39fbcb5209 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Thu, 11 Jan 2024 16:37:17 +0800 Subject: [PATCH] fix userId --> userNo --- Dlis.Jinko.Yikatong.sln | 2 +- Src/Dlhis.Basic/MealUser/Services/IMealUserService.cs | 2 -- .../MealUser/Services/Implements/MealUserService.cs | 8 -------- .../Setting/Controllers/SettingController.cs | 6 +++--- .../Setting/Services/ICanteenSettingService.cs | 4 ++-- .../Setting/Services/Implements/CanteenSettingService.cs | 4 ++-- 6 files changed, 8 insertions(+), 18 deletions(-) diff --git a/Dlis.Jinko.Yikatong.sln b/Dlis.Jinko.Yikatong.sln index 8818e9f3..e0c233c7 100644 --- a/Dlis.Jinko.Yikatong.sln +++ b/Dlis.Jinko.Yikatong.sln @@ -27,7 +27,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dlhis.Sys", "Src\Dlhis.Sys\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dlhis.Canteen", "Src\Dlhis.Canteen\Dlhis.Canteen.csproj", "{8317C526-3523-4195-9B19-2F17CFD71927}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dlhis.User.Api", "Src\Dlhis.User.Api\Dlhis.User.Api.csproj", "{F294CD7D-0412-48AD-A7E9-E72B9BA0E48E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dlhis.User.Api", "Src\Dlhis.User.Api\Dlhis.User.Api.csproj", "{F294CD7D-0412-48AD-A7E9-E72B9BA0E48E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Src/Dlhis.Basic/MealUser/Services/IMealUserService.cs b/Src/Dlhis.Basic/MealUser/Services/IMealUserService.cs index c444ed33..990a8e98 100644 --- a/Src/Dlhis.Basic/MealUser/Services/IMealUserService.cs +++ b/Src/Dlhis.Basic/MealUser/Services/IMealUserService.cs @@ -9,6 +9,4 @@ public interface IMealUserService : IScopeDependency Task> GetPageAsync(MealUserPageRequest request); Task AddAsync(MealUserAddRequest request); - - Task GetMealUserAsync(string uniqueId); } diff --git a/Src/Dlhis.Basic/MealUser/Services/Implements/MealUserService.cs b/Src/Dlhis.Basic/MealUser/Services/Implements/MealUserService.cs index f87d7dba..7c6d1b27 100644 --- a/Src/Dlhis.Basic/MealUser/Services/Implements/MealUserService.cs +++ b/Src/Dlhis.Basic/MealUser/Services/Implements/MealUserService.cs @@ -53,12 +53,4 @@ public class MealUserService : IMealUserService }; await _dbContext.InsertAsync(entity); } - - public async Task GetMealUserAsync(string userId) - { - return await _dbContext.Queryable() - .Where(x => x.UserNo == userId) - .Select() - .FirstAsync(); - } } diff --git a/Src/Dlhis.Canteen/Setting/Controllers/SettingController.cs b/Src/Dlhis.Canteen/Setting/Controllers/SettingController.cs index c107d4ef..b7e1772e 100644 --- a/Src/Dlhis.Canteen/Setting/Controllers/SettingController.cs +++ b/Src/Dlhis.Canteen/Setting/Controllers/SettingController.cs @@ -59,11 +59,11 @@ public class SettingController : ControllerBase /// /// 获取用户配置 /// - /// + /// /// [HttpGet("user")] - public async Task> GetUserSettingAsync(string userId) + public async Task> GetUserSettingAsync(string userNo) { - return await _settingService.GetUserSettingAsync(userId); + return await _settingService.GetUserSettingAsync(userNo); } } diff --git a/Src/Dlhis.Canteen/Setting/Services/ICanteenSettingService.cs b/Src/Dlhis.Canteen/Setting/Services/ICanteenSettingService.cs index 27fabb1e..dcf34bac 100644 --- a/Src/Dlhis.Canteen/Setting/Services/ICanteenSettingService.cs +++ b/Src/Dlhis.Canteen/Setting/Services/ICanteenSettingService.cs @@ -16,8 +16,8 @@ public interface ICanteenSettingService : IScopeDependency /// /// 获取人员的就餐配置信息 /// - /// 就餐人员档案号 + /// 就餐人员档案号 /// - Task> GetUserSettingAsync(string userId); + Task> GetUserSettingAsync(string userNo); } diff --git a/Src/Dlhis.Canteen/Setting/Services/Implements/CanteenSettingService.cs b/Src/Dlhis.Canteen/Setting/Services/Implements/CanteenSettingService.cs index af5cc8c2..c8f9d5cc 100644 --- a/Src/Dlhis.Canteen/Setting/Services/Implements/CanteenSettingService.cs +++ b/Src/Dlhis.Canteen/Setting/Services/Implements/CanteenSettingService.cs @@ -72,10 +72,10 @@ public class CanteenSettingService : ICanteenSettingService } - public async Task> GetUserSettingAsync(string userId) + public async Task> GetUserSettingAsync(string userNo) { var setting = await _context.Queryable() - .Where(x => x.UniqueType == CanteenSettingUnqiueEnumType.Person && (x.UniqueValue == userId) || x.UniqueType == CanteenSettingUnqiueEnumType.Tenant) + .Where(x => x.UniqueType == CanteenSettingUnqiueEnumType.Person && (x.UniqueValue == userNo) || x.UniqueType == CanteenSettingUnqiueEnumType.Tenant) .ToListAsync(); //从基地 -> 个人,确保下面循环做到覆盖,并且以个人配置为主