From 3934088e430a16e9948cf33da49b9065aafde4c1 Mon Sep 17 00:00:00 2001 From: lq1405 <2769838458@qq.com> Date: Wed, 12 Feb 2025 12:19:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=90=8C=E6=AD=A5=E8=BD=AF?= =?UTF-8?q?=E4=BB=B6=E6=8E=A7=E5=88=B6=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E8=BD=AF=E4=BB=B6=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LMS.service/Controllers/SoftWareController.cs | 2 +- LMS.service/Service/SoftwareService/SoftwareControlService.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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;