update 将所有page接口更改为post请求

This commit is contained in:
2021-04-30 09:39:27 +08:00
parent 5955f212ae
commit 258bc632f6
31 changed files with 227 additions and 226 deletions

View File

@@ -17,12 +17,13 @@ namespace Ewide.Core.Extension
public static string OrderBuilder<T>(PageInputBase pageInput, bool descSort = true)
{
var type = typeof(T);
var hasId = type.GetProperty("Id") == null;
var hasId = type.GetProperty("Id") != null;
var hasSort = type.GetProperty("Sort") != null;
var defaultField = hasId ? "Sort" : "Id";
var defaultField = hasId ? "Id" : (hasSort ? "Sort" : "");
// 约定默认每张表都有Id排序
var orderStr = defaultField + (descSort ? " Desc" : " Asc");
var orderStr = string.IsNullOrEmpty(defaultField) ? "" : defaultField + (descSort ? " Desc" : " Asc");
// 排序是否可用-排序字段和排序顺序都为非空才启用排序
if (!string.IsNullOrEmpty(pageInput.SortField) && !string.IsNullOrEmpty(pageInput.SortOrder))