From 946f4a6de9cf645db308327d32cd336a56912b1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com>
Date: Mon, 31 Jul 2023 18:42:08 +0800
Subject: [PATCH] =?UTF-8?q?:bug:fix=E9=83=A8=E9=97=A8=E8=A1=A8=E5=AD=97?=
=?UTF-8?q?=E6=AE=B5=E5=B1=9E=E6=80=A7=E6=9B=B4=E6=94=B9=E5=AF=BC=E8=87=B4?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=B1=E8=B4=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ZR.Model/System/UserConstants.cs | 2 +-
ZR.Service/System/SysDeptService.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ZR.Model/System/UserConstants.cs b/ZR.Model/System/UserConstants.cs
index a944b6e..e023591 100644
--- a/ZR.Model/System/UserConstants.cs
+++ b/ZR.Model/System/UserConstants.cs
@@ -30,7 +30,7 @@
///
/// 部门正常状态
///
- public static string DEPT_NORMAL = "0";
+ public static int DEPT_NORMAL = 0;
///
/// 部门停用状态
diff --git a/ZR.Service/System/SysDeptService.cs b/ZR.Service/System/SysDeptService.cs
index 78bb0ba..3669322 100644
--- a/ZR.Service/System/SysDeptService.cs
+++ b/ZR.Service/System/SysDeptService.cs
@@ -67,7 +67,7 @@ namespace ZR.Service.System
{
SysDept info = GetFirst(it => it.DeptId == dept.ParentId);
//如果父节点不为正常状态,则不允许新增子节点
- if (info != null && !UserConstants.DEPT_NORMAL.Equals(info?.Status))
+ if (info != null && UserConstants.DEPT_NORMAL != info?.Status)
{
throw new CustomException("部门停用,不允许新增");
}