Commit 27c1db9e authored by 黄奎's avatar 黄奎

代码优化

parent c3e7bfa8
......@@ -33,8 +33,6 @@ namespace Edu.Repository.System
{
builder.Append($" AND {nameof(RB_Msg_Base.StoreType)}={(int)query.StoreType}");
}
}
return Get<RB_Msg_Base_Function_ViewModel>(builder.ToString()).ToList();
}
......@@ -59,7 +57,6 @@ namespace Edu.Repository.System
{
builder.Append($" AND {nameof(RB_Msg_Base.StoreType)}={(int)query.StoreType}");
}
}
return GetPage<RB_Msg_Base_Function_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
}
......
......@@ -90,6 +90,5 @@ WHERE 1=1
}
return GetPage<RB_Role_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
}
}
}
\ No newline at end of file
......@@ -12,40 +12,6 @@ namespace Edu.Repository.System
/// </summary>
public class RB_Role_FunctionPermissionRepository : BaseRepository<RB_Role_FunctionPermission>
{
/// <summary>
/// 获取角色功能菜单分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Role_FunctionPermission_ViewModel> GetRoleFunctionPermissionPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Role_FunctionPermission_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Role_FunctionPermission
WHERE 1=1
");
if (query != null)
{
if (query.ID > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_FunctionPermission_ViewModel.ID), query.ID);
}
if (query.Action_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_FunctionPermission_ViewModel.Action_Id), query.Action_Id);
}
if (query.Role_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_FunctionPermission_ViewModel.Role_Id), query.Role_Id);
}
}
return GetPage<RB_Role_FunctionPermission_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
}
/// <summary>
/// 获取角色功能菜单列表
/// </summary>
......
......@@ -7,6 +7,9 @@ using Edu.Model.ViewModel.System;
namespace Edu.Repository.System
{
/// <summary>
/// 系统消息记录仓储层
/// </summary>
public class RB_System_LogRepository : BaseRepository<RB_System_Log>
{
/// <summary>
......
......@@ -41,7 +41,7 @@ namespace Edu.WebApi.Controllers.User
/// <summary>
/// 考勤记录处理类
/// </summary>
public AttendanceRecodModule attendRecodeModule = new AttendanceRecodModule();
public readonly AttendanceRecodModule attendRecodeModule = new AttendanceRecodModule();
#region 字典管理
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment