fix: 增加字典表排序默认值

This commit is contained in:
Argo Zhang 2019-11-02 12:09:05 +08:00 committed by Argo Windows
parent d5479dee5d
commit 7a4892d868
1 changed files with 5 additions and 2 deletions

View File

@ -6,7 +6,7 @@ using System.Linq;
namespace Bootstrap.Admin.Query namespace Bootstrap.Admin.Query
{ {
/// <summary> /// <summary>
/// /// 字典表查询类
/// </summary> /// </summary>
public class QueryDictOption : PaginationOption public class QueryDictOption : PaginationOption
{ {
@ -28,6 +28,9 @@ namespace Bootstrap.Admin.Query
/// <returns></returns> /// <returns></returns>
public QueryData<BootstrapDict> RetrieveData() public QueryData<BootstrapDict> RetrieveData()
{ {
if (string.IsNullOrEmpty(Order)) Order = "asc";
if (string.IsNullOrEmpty(Sort)) Sort = "Category";
var data = DictHelper.RetrieveDicts(); var data = DictHelper.RetrieveDicts();
if (!string.IsNullOrEmpty(Category)) if (!string.IsNullOrEmpty(Category))
{ {
@ -63,4 +66,4 @@ namespace Bootstrap.Admin.Query
return ret; return ret;
} }
} }
} }