完善模型通用接口的无限层级一对一和单层级一对多
This commit is contained in:
@@ -43,7 +43,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
public async Task<dynamic?> GetAsync(string vmid, [FromQuery] VmGetInput input)
|
||||
{
|
||||
var vm = await _dataAccess.GetVmodelAsync(vmid, true);
|
||||
VmListInput arg = input.Adapt<VmListInput>();
|
||||
VmQueryInput arg = input.Adapt<VmQueryInput>();
|
||||
if (input.id != null)
|
||||
{
|
||||
if (arg.q == null) arg.q = new DObject();
|
||||
@@ -60,7 +60,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
public async Task<VmPagedOutput> GetListAsync(string vmid, [FromQuery] VmGetListInput input)
|
||||
{
|
||||
var vm = await _dataAccess.GetVmodelAsync(vmid, true);
|
||||
VmListInput arg = input.Adapt<VmListInput>();
|
||||
VmQueryInput arg = input.Adapt<VmQueryInput>();
|
||||
if (!string.IsNullOrEmpty(input.q))
|
||||
{
|
||||
arg.q = input.q.ToObject<DObject>();
|
||||
@@ -73,7 +73,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
/// 获取多条 数据列表
|
||||
/// </summary>
|
||||
[HttpPost("api/[area]/[controller]/{vmid}/list")]
|
||||
public async Task<VmPagedOutput> ListAsync(string vmid, [FromBody] VmListInput input)
|
||||
public async Task<VmPagedOutput> ListAsync(string vmid, [FromBody] VmQueryInput input)
|
||||
{
|
||||
var vm = await _dataAccess.GetVmodelAsync(vmid, true);
|
||||
var ls = await _dataAccess.QueryDataAsync(vm, input);
|
||||
@@ -119,7 +119,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
|
||||
private async Task<Vmodel> GetVmodelAsync(string areaCode, string vmCode)
|
||||
{
|
||||
var vm = await _dataAccess.GetVmodelAsync(areaCode, vmCode, true);
|
||||
var vm = await _dataAccess.GetVmodelAsync(areaCode, vmCode, false);
|
||||
return vm;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
public async Task<dynamic?> GetAsync(string areaCode, string vmCode, [FromQuery] VmGetInput input)
|
||||
{
|
||||
var vm = await GetVmodelAsync(areaCode, vmCode);
|
||||
VmListInput arg = input.Adapt<VmListInput>();
|
||||
VmQueryInput arg = input.Adapt<VmQueryInput>();
|
||||
if (input.id != null)
|
||||
{
|
||||
if (arg.q == null) arg.q = new DObject();
|
||||
@@ -147,7 +147,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
public async Task<VmPagedOutput> GetListAsync(string areaCode, string vmCode, [FromQuery] VmGetListInput input)
|
||||
{
|
||||
var vm = await GetVmodelAsync(areaCode, vmCode);
|
||||
VmListInput arg = input.Adapt<VmListInput>();
|
||||
VmQueryInput arg = input.Adapt<VmQueryInput>();
|
||||
if (!string.IsNullOrEmpty(input.q))
|
||||
{
|
||||
arg.q = input.q.ToObject<DObject>();
|
||||
@@ -160,7 +160,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
/// 获取多条 数据列表
|
||||
/// </summary>
|
||||
[HttpPost("api/{areaCode}/{vmCode}/list")]
|
||||
public async Task<VmPagedOutput> ListAsync(string areaCode, string vmCode, [FromBody] VmListInput input)
|
||||
public async Task<VmPagedOutput> ListAsync(string areaCode, string vmCode, [FromBody] VmQueryInput input)
|
||||
{
|
||||
var vm = await GetVmodelAsync(areaCode, vmCode);
|
||||
var ls = await _dataAccess.QueryDataAsync(vm, input);
|
||||
|
||||
Reference in New Issue
Block a user