完善模型通用接口的无限层级一对一和单层级一对多
This commit is contained in:
@@ -34,7 +34,7 @@ public class VengineAppService<TEntity> : BaseAppService where TEntity : Entity
|
||||
_db = _dataAccess.GetSqlSugar();
|
||||
}
|
||||
|
||||
protected async Task<Vmodel> GetVmodelAsync()
|
||||
protected virtual async Task<Vmodel> GetVmodelAsync()
|
||||
{
|
||||
var tp = typeof(TEntity);
|
||||
string? area = null, code = null;
|
||||
@@ -53,7 +53,7 @@ public class VengineAppService<TEntity> : BaseAppService where TEntity : Entity
|
||||
{
|
||||
code = tp.Name.ToKebab();
|
||||
}
|
||||
var vm = await _dataAccess.GetVmodelAsync(area, code, true);
|
||||
var vm = await _dataAccess.GetVmodelAsync(area, code, false);
|
||||
|
||||
return vm;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class VengineAppService<TEntity> : BaseAppService where TEntity : Entity
|
||||
public virtual async Task<dynamic> GetAsync([FromQuery] VmGetInput input)
|
||||
{
|
||||
var vm = await GetVmodelAsync();
|
||||
VmListInput arg = input.Adapt<VmListInput>();
|
||||
VmQueryInput arg = input.Adapt<VmQueryInput>();
|
||||
if (input.id != null)
|
||||
{
|
||||
if (arg.q == null) arg.q = new DObject();
|
||||
@@ -90,7 +90,7 @@ public class VengineAppService<TEntity> : BaseAppService where TEntity : Entity
|
||||
/// 获取多条 数据列表
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public virtual async Task<VmPagedOutput> ListAsync([FromBody] VmListInput input)
|
||||
public virtual async Task<VmPagedOutput> ListAsync([FromBody] VmQueryInput input)
|
||||
{
|
||||
var vm = await GetVmodelAsync();
|
||||
var ls = await _dataAccess.QueryDataAsync(vm, input);
|
||||
|
||||
Reference in New Issue
Block a user