fix userId --> userNo
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -9,6 +9,4 @@ public interface IMealUserService : IScopeDependency
|
||||
Task<Pagination<MealUserResponse>> GetPageAsync(MealUserPageRequest request);
|
||||
|
||||
Task AddAsync(MealUserAddRequest request);
|
||||
|
||||
Task<MealUserResponse> GetMealUserAsync(string uniqueId);
|
||||
}
|
||||
|
||||
@@ -53,12 +53,4 @@ public class MealUserService : IMealUserService
|
||||
};
|
||||
await _dbContext.InsertAsync(entity);
|
||||
}
|
||||
|
||||
public async Task<MealUserResponse> GetMealUserAsync(string userId)
|
||||
{
|
||||
return await _dbContext.Queryable<CanteenUserEntity>()
|
||||
.Where(x => x.UserNo == userId)
|
||||
.Select<MealUserResponse>()
|
||||
.FirstAsync();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,11 +59,11 @@ public class SettingController : ControllerBase
|
||||
/// <summary>
|
||||
/// 获取用户配置
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="userNo"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("user")]
|
||||
public async Task<Dictionary<CanteenSettingItemEnumType, string>> GetUserSettingAsync(string userId)
|
||||
public async Task<Dictionary<CanteenSettingItemEnumType, string>> GetUserSettingAsync(string userNo)
|
||||
{
|
||||
return await _settingService.GetUserSettingAsync(userId);
|
||||
return await _settingService.GetUserSettingAsync(userNo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ public interface ICanteenSettingService : IScopeDependency
|
||||
/// <summary>
|
||||
/// 获取人员的就餐配置信息
|
||||
/// </summary>
|
||||
/// <param name="userId">就餐人员档案号</param>
|
||||
/// <param name="userNo">就餐人员档案号</param>
|
||||
/// <returns></returns>
|
||||
Task<Dictionary<CanteenSettingItemEnumType, string>> GetUserSettingAsync(string userId);
|
||||
Task<Dictionary<CanteenSettingItemEnumType, string>> GetUserSettingAsync(string userNo);
|
||||
}
|
||||
|
||||
|
||||
@@ -72,10 +72,10 @@ public class CanteenSettingService : ICanteenSettingService
|
||||
}
|
||||
|
||||
|
||||
public async Task<Dictionary<CanteenSettingItemEnumType, string>> GetUserSettingAsync(string userId)
|
||||
public async Task<Dictionary<CanteenSettingItemEnumType, string>> GetUserSettingAsync(string userNo)
|
||||
{
|
||||
var setting = await _context.Queryable<CanteenSettingEntity>()
|
||||
.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();
|
||||
|
||||
//从基地 -> 个人,确保下面循环做到覆盖,并且以个人配置为主
|
||||
|
||||
Reference in New Issue
Block a user