diff --git a/langguanApi/Service/RoleService.cs b/langguanApi/Service/RoleService.cs
index b305d67..fbb7924 100644
--- a/langguanApi/Service/RoleService.cs
+++ b/langguanApi/Service/RoleService.cs
@@ -4,7 +4,6 @@ using langguanApi.Model.Dto.SystemConfigurationDto;
using langguanApi.Model;
using langguanApi.Model.Entity;
using langguanApi.Model.SystemConfigurationEntity;
-using StackExchange.Redis;
using Mapster;
using NPOI.SS.Formula.Functions;
using System.Linq.Expressions;
@@ -14,6 +13,9 @@ using System.Collections.Generic;
namespace langguanApi.Service
{
+ ///
+ /// 校色服务
+ ///
[ServiceInjection(InjectionType.Transient)]
public class RoleService : BaseService
{
@@ -105,8 +107,8 @@ namespace langguanApi.Service
///
public async Task Exist(RoleDto input)
{
- var entity = input.Adapt();
- Expression> exp = filter => filter.RoleName == entity.RoleName;
+ var entity = input.Adapt();
+ Expression> exp = filter => filter.RoleName == entity.RoleName;
return await base.Exist(exp);
}
///
@@ -120,7 +122,7 @@ namespace langguanApi.Service
{
return new ApiResult { code = 1, msg = $"{input.RoleName}的角色已存在" };
}
- var entity = input.Adapt();
+ var entity = input.Adapt();
if (entity != null)
{
await base.CreateAsync(entity);
@@ -133,9 +135,9 @@ namespace langguanApi.Service
///
///
///
- public async Task> GetRoleListByIds(IEnumerable ids)
+ public async Task> GetRoleListByIds(IEnumerable ids)
{
- Expression> exp = filter => ids.Contains(filter.Id) && filter.IsDelete == false;
+ Expression> exp = filter => ids.Contains(filter.Id) && filter.IsDelete == false;
var list = (await base.GetListWithExp(exp)).ToList();
return list;
}
diff --git a/langguanApi/Service/UserService.cs b/langguanApi/Service/UserService.cs
index 2f72644..c13a2c5 100644
--- a/langguanApi/Service/UserService.cs
+++ b/langguanApi/Service/UserService.cs
@@ -186,18 +186,6 @@ namespace langguanApi.Service
{
exp = filter => filter.Username.Contains(input.Username);
}
- if (!string.IsNullOrEmpty(input.Tel))
- {
- exp = filter => filter.Tel.Contains(input.Tel);
- }
- if (!string.IsNullOrEmpty(input.HiredateStart))
- {
- exp = filter => filter.Hiredate.Value >= DateTime.Parse(input.HiredateStart);
- }
- if (!string.IsNullOrEmpty(input.HiredateEnd))
- {
- exp = filter => filter.Hiredate.Value <= DateTime.Parse(input.HiredateEnd);
- }
#endregion
#region 获取数据
@@ -211,17 +199,8 @@ namespace langguanApi.Service
list.Add(new UserListDto
{
Username = item.Username,
- Education = item.Education,
- Tel = item.Tel,
Email = item.Email,
roleName = roleList.FirstOrDefault(s => s.Id == item.roleId)?.RoleName,
- Sex = item.Sex == 0 ? "男" : "女",
- Address = item.Address,
- IsAdmin = item.IsAdmin == 0 ? "否" : "是",
- Native = item.Native,
- University = item.University,
- Hiredate = item.Hiredate.HasValue == true ? item.Hiredate.Value.ToString("yyyy-MM-dd") : "",
- Brithday = item.Brithday.HasValue == true ? item.Brithday.Value.ToString("yyyy-MM-dd") : "",
});
}
#endregion