Exemplo n.º 1
0
 /// <summary>
 /// 获取列表
 /// </summary>
 /// <param name="dto"></param>
 /// <returns></returns>
 public SqlSugarPagedList<SysRole> GetRoleList(RoleListRequestDto dto)
 {
     var query = dbClint.Queryable<SysRole>().Where(o => o.IsDeleted == false);
     query.WhereIF(!string.IsNullOrWhiteSpace(dto.RoleName), o => o.RoleName.Contains(dto.RoleName.Trim()));
     int total = 0;
     var list = query.ToPageList(dto.Page, dto.Limit, ref total);
     return new SqlSugarPagedList<SysRole>()
     {
         PageIndex = dto.Page,
         PageSize = dto.Limit,
         Items = list,
         TotalCount = total
     };
 }
Exemplo n.º 2
0
 public SqlSugarPagedList <SysRole> GetRoleList([FromBody] RoleListRequestDto dto)
 {
     return(_sysRoleService.GetRoleList(dto));
 }