diff --git a/LMS.service/Controllers/SoftWareController.cs b/LMS.service/Controllers/SoftWareController.cs index b24da28..3b66eef 100644 --- a/LMS.service/Controllers/SoftWareController.cs +++ b/LMS.service/Controllers/SoftWareController.cs @@ -110,7 +110,7 @@ namespace LMS.service.Controllers #endregion - #region 软件控制-传入用户可以未申请权限数量 + #region 软件控制-传入用户可以获取未申请权限数量 [HttpGet("{userId}")] [Authorize] diff --git a/LMS.service/Service/SoftwareService/SoftwareControlService.cs b/LMS.service/Service/SoftwareService/SoftwareControlService.cs index 14f3781..aa0230a 100644 --- a/LMS.service/Service/SoftwareService/SoftwareControlService.cs +++ b/LMS.service/Service/SoftwareService/SoftwareControlService.cs @@ -48,7 +48,8 @@ namespace LMS.service.Service.SoftwareService } List softwareControl = await _dbContext.SoftwareControl.Where(x => x.UserId == id).ToListAsync(); - List software = await _dbContext.Software.ToListAsync(); + // 判断是不是可以使用 + List software = await _dbContext.Software.Where(x => x.IsUse).ToListAsync(); bool isAdd = false;