解决字典管理分页bug

This commit is contained in:
izory
2021-09-06 12:14:52 +08:00
parent 777c8d2dd9
commit c328e0b4c2
4 changed files with 12 additions and 8 deletions

View File

@@ -17,13 +17,17 @@ namespace ZR.Repository.System
/// </summary>
/// <param name="dictType">实体模型</param>
/// <returns></returns>
public List<SysDictType> SelectDictTypeList(SysDictType dictType)
public List<SysDictType> SelectDictTypeList(SysDictType dictType, Model.PagerInfo pager)
{
return Db
var totalNum = 0;
var list = Db
.Queryable<SysDictType>()
.WhereIF(!string.IsNullOrEmpty(dictType.DictName), it => it.DictName.Contains(dictType.DictName))
.WhereIF(!string.IsNullOrEmpty(dictType.Status), it => it.Status == dictType.Status)
.WhereIF(!string.IsNullOrEmpty(dictType.DictType), it => it.DictType == dictType.DictType).ToList();
.WhereIF(!string.IsNullOrEmpty(dictType.DictType), it => it.DictType == dictType.DictType)
.ToPageList(pager.PageNum, pager.PageSize, ref totalNum);
pager.TotalNum = totalNum;
return list;
}
/// <summary>