Own.BLL/Sys/Sys_Role_BLL.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using Own.IBLL.Sys;
using Own.IDAL.Sys;
using Own.Models;
using Own.Models.Filter.SysFilter;
using Own.Models.Sys_Extend;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Unity.Attributes;
namespace Own.BLL.Sys
{
public partial class Sys_Role_BLL
{
[Dependency]
public ISys_Auth_Dal sys_auth { get; set; } //获取角色和权限相关信息(菜单)
/// <summary>
/// 默认每页20
/// </summary>
int pageSize = 20;
/// <summary>
/// 当前选择的页数
/// </summary>
int currentSize = 1;
/// <summary>
/// 获取角色数量
/// </summary>
/// <returns></returns>
#region
public int GetSysRoleCount(SysFilter filter, Sys_User_Role_Extend role)
{
//查看当前用户是否是后台角色
int count = GetListCount(a => "是".Equals(a.HTJS) && a.Id == role.Rid);
if (count > 0)
{
if (!string.IsNullOrWhiteSpace(filter.Title)) return GetListCount(a => a.Title.Contains(filter.Title) && a.JSJB >= role.MINJSJB);
else return GetListCount(a => a.JSJB >= role.MINJSJB);
}else
{
if (!string.IsNullOrWhiteSpace(filter.Title)) return GetListCount(a => a.Title.Contains(filter.Title) && a.JSJB > role.MINJSJB);
else return GetListCount(a => a.JSJB > role.MINJSJB);
}
}
#endregion
/// <summary>
/// 获取角色分页信息
/// </summary>
/// <returns></returns>
#region
public List<Sys_Role> GetSysRole(SysFilter filter, Sys_User_Role_Extend role)
{
//获取每页数量
if (!string.IsNullOrWhiteSpace(filter.PageSize)) pageSize = int.Parse(filter.PageSize);
//当前页
if (!string.IsNullOrWhiteSpace(filter.currentSize)) currentSize = int.Parse(filter.currentSize);
后面还有 58 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
