From 86ee45f4e374b2515023af0f3be297677a02163f 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: Sun, 17 Oct 2021 17:36:25 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9service=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ZR.Service/Business/GendemoService.cs | 1 -
ZR.Service/System/GenTableService.cs | 4 ++--
ZR.Service/System/SysDeptService.cs | 2 +-
ZR.Service/System/SysUserPostService.cs | 2 +-
4 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/ZR.Service/Business/GendemoService.cs b/ZR.Service/Business/GendemoService.cs
index e86a392..ecbeea2 100644
--- a/ZR.Service/Business/GendemoService.cs
+++ b/ZR.Service/Business/GendemoService.cs
@@ -27,7 +27,6 @@ namespace ZR.Service.Business
_repository = repository;
}
#region 业务逻辑代码
-
#endregion
}
}
\ No newline at end of file
diff --git a/ZR.Service/System/GenTableService.cs b/ZR.Service/System/GenTableService.cs
index f38f3cc..b9a5ddb 100644
--- a/ZR.Service/System/GenTableService.cs
+++ b/ZR.Service/System/GenTableService.cs
@@ -44,7 +44,7 @@ namespace ZR.Service.System
///
public int DeleteGenTableByTbName(string tableName)
{
- return GenTableRepository.Delete(f => f.TableName == tableName) ? 1 : 0;
+ return GenTableRepository.Delete(f => f.TableName == tableName);
}
///
@@ -54,7 +54,7 @@ namespace ZR.Service.System
///
public GenTable GetGenTableInfo(long tableId)
{
- return GenTableRepository.GetById(tableId);
+ return GenTableRepository.GetId(tableId);
}
///
diff --git a/ZR.Service/System/SysDeptService.cs b/ZR.Service/System/SysDeptService.cs
index c2b56aa..359e5ff 100644
--- a/ZR.Service/System/SysDeptService.cs
+++ b/ZR.Service/System/SysDeptService.cs
@@ -68,7 +68,7 @@ namespace ZR.Service.System
///
public int InsertDept(SysDept dept)
{
- SysDept info = DeptRepository.GetSingle(it => it.DeptId == dept.ParentId);
+ SysDept info = DeptRepository.GetFirst(it => it.DeptId == dept.ParentId);
//如果父节点不为正常状态,则不允许新增子节点
if (!UserConstants.DEPT_NORMAL.Equals(info.Status))
{
diff --git a/ZR.Service/System/SysUserPostService.cs b/ZR.Service/System/SysUserPostService.cs
index 78c4fa4..7476d48 100644
--- a/ZR.Service/System/SysUserPostService.cs
+++ b/ZR.Service/System/SysUserPostService.cs
@@ -61,7 +61,7 @@ namespace ZR.Service.System
public int Delete(long userId)
{
- return UserPostRepository.Delete(x => x.UserId == userId) ? 1: 0 ;
+ return UserPostRepository.Delete(x => x.UserId == userId);
}
}
}