修复排序错误
This commit is contained in:
@@ -11,10 +11,10 @@ namespace Tnb.Vengine.Domain;
|
||||
|
||||
public class VmBaseInput
|
||||
{
|
||||
///// <summary>
|
||||
///// 视图模型id
|
||||
///// </summary>
|
||||
//public string vmid { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 附加参数
|
||||
/// </summary>
|
||||
public object? extra { get; set; }
|
||||
}
|
||||
|
||||
public class VmGetInput : VmBaseInput
|
||||
@@ -33,6 +33,23 @@ public class VmGetInput : VmBaseInput
|
||||
/// 输出字段
|
||||
/// </summary>
|
||||
public string o { get; set; } = "*";
|
||||
|
||||
/// <summary>
|
||||
/// 转换为QueryInput
|
||||
/// </summary>
|
||||
/// <param name="primaryKey"></param>
|
||||
/// <returns></returns>
|
||||
public VmQueryInput ToQueryInput(string primaryKey)
|
||||
{
|
||||
VmQueryInput arg = this.Adapt<VmQueryInput>();
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
if (arg.q == null) arg.q = new DObject();
|
||||
arg.q.Add(primaryKey, id);
|
||||
}
|
||||
|
||||
return arg;
|
||||
}
|
||||
}
|
||||
|
||||
public class VmGetListInput : VmBaseInput
|
||||
@@ -67,7 +84,11 @@ public class VmGetListInput : VmBaseInput
|
||||
/// </summary>
|
||||
public string o { get; set; } = "*";
|
||||
|
||||
public VmQueryInput ToListInput()
|
||||
/// <summary>
|
||||
/// 转换为QueryInput
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public VmQueryInput ToQueryInput()
|
||||
{
|
||||
VmQueryInput arg = this.Adapt<VmQueryInput>();
|
||||
|
||||
@@ -89,11 +110,6 @@ public class VmQueryInput : VmGetListInput
|
||||
/// 查询条件
|
||||
/// </summary>
|
||||
public new DObject? q { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 高级查询
|
||||
/// </summary>
|
||||
public DObject? adv { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -139,14 +155,32 @@ public class VmDeleteInput : VmBaseInput
|
||||
public List<string>? ids { get; set; }
|
||||
}
|
||||
|
||||
public class PagedOutput
|
||||
{
|
||||
public int total { get; set; }
|
||||
public object? extra { get; set; }
|
||||
public static PagedOutput<T> Create<T>(int totalNum, List<T> ls)
|
||||
{
|
||||
return new PagedOutput<T>(totalNum, ls);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页列表输出对象
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public class PagedOutput<T>
|
||||
public class PagedOutput<T> : PagedOutput
|
||||
{
|
||||
public int total { get; set; }
|
||||
public List<T> items { get; set; } = new List<T>();
|
||||
|
||||
public PagedOutput()
|
||||
{
|
||||
}
|
||||
public PagedOutput(int totalNum, List<T> ls)
|
||||
{
|
||||
total = totalNum;
|
||||
items = ls;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -154,18 +188,12 @@ public class PagedOutput<T>
|
||||
/// </summary>
|
||||
public class VmPagedOutput : PagedOutput<DObject>
|
||||
{
|
||||
public PagedOutput<T> ToPagedOutput<T>()
|
||||
{
|
||||
return new PagedOutput<T>()
|
||||
{
|
||||
total = total,
|
||||
items = items.Adapt<List<T>>()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 查询属性信息
|
||||
///// </summary>
|
||||
//public class VmSelectProp
|
||||
//{
|
||||
// public const string MAIN_ALIES = "m";
|
||||
// public string code { get; set; } = string.Empty;
|
||||
// public string field { get; set; } = string.Empty;
|
||||
// public List<string> navPath { get; set; } = new List<string>();
|
||||
// public string navCode { get; set; } = MAIN_ALIES;
|
||||
// public ePropType propType { get; set; }
|
||||
// public eNavigateType navType { get; set; }
|
||||
//}
|
||||
Reference in New Issue
Block a user