Commit a28195f3 authored by 黄奎's avatar 黄奎

页面修改

parent 27c1db9e
......@@ -11,40 +11,6 @@ namespace Edu.Repository.System
/// </summary>
public class RB_Post_RoleRepository : BaseRepository<RB_Post_Role>
{
/// <summary>
/// 获取岗位角色分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Post_Role_ViewModel> GetPostRolePageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Post_Role_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Post_Role
WHERE 1=1
");
if (query != null)
{
if (query.Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Post_Role_ViewModel.Id), query.Id);
}
if (query.PostId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Post_Role_ViewModel.PostId), query.PostId);
}
if (query.RoleId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Post_Role_ViewModel.RoleId), query.RoleId);
}
}
return GetPage<RB_Post_Role_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
}
/// <summary>
/// 获取岗位角色列表
/// </summary>
......
......@@ -11,40 +11,6 @@ namespace Edu.Repository.System
/// </summary>
public class RB_Role_PermissionRepository : BaseRepository<RB_Role_Permission>
{
/// <summary>
/// 获取角色菜单权限分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Role_Permission_ViewModel> GetRolePermissionPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Role_Permission_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Role_Permission
WHERE 1=1
");
if (query != null)
{
if (query.ID > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_Permission_ViewModel.ID), query.ID);
}
if (query.Role_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_Permission_ViewModel.Role_Id), query.Role_Id);
}
if (query.Menu_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_Permission_ViewModel.Menu_Id), query.Menu_Id);
}
}
return GetPage<RB_Role_Permission_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
}
/// <summary>
/// 获取角色菜单权限列表
/// </summary>
......
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Edu.Model.Entity.System;
......
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