From c31085dfa5d7aec5fbda7dd64db77bbf451f5691 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 5 Jun 2024 11:20:59 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E8=80=83=E8=AF=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=EF=BC=8C=E5=9F=B9=E8=AE=AD=5F=E8=80=83=E8=AF=95=5F=E6=88=90?= =?UTF-8?q?=E7=BB=A9=E3=80=81=E5=A4=8D=E5=88=B6=E3=80=81=E5=BD=92=E6=A1=A3?= =?UTF-8?q?=E3=80=81=E5=8F=96=E6=B6=88=E5=8F=91=E5=B8=83=E3=80=81=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E3=80=81=E8=80=83=E8=AF=95=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs b/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs index ac6afa31..53a55a43 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs @@ -1018,6 +1018,16 @@ public class Ghre_ExamServices : BaseServices UpdateStatus(long[] ids, string status) { + string sql = $@"SELECT A.RoleId, B.RoleNo, B.RoleName + FROM Ghrs_UserRole A LEFT JOIN Ghrs_Role B ON A.RoleId = B.RoleId + WHERE A.UserID = {App.User.ID} + AND A.IsEnable = 1 + AND B.IsEnable = 1 + AND B.RoleNo ='TrainingExamCancelRelease'"; + var toolbarRoles = DbAccess.QueryList(sql); + if (!toolbarRoles.Any()) + return ServiceResult.OprateFailed("暂无取消发布权限!"); + if (status != "Released" && status != "Disabled" && status != "Draft") throw new Exception("无效的状态");