修复钻取一对多子表时条件使用了字段的错误
This commit is contained in:
@@ -3,8 +3,13 @@
|
||||
// https://git.tuotong-tech.com/tnb/tnb.server //
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using Aspose.Cells.Drawing;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Tnb.Core;
|
||||
using Tnb.Vengine.Domain;
|
||||
|
||||
namespace Tnb.Vengine.AppService;
|
||||
|
||||
@@ -13,4 +18,17 @@ namespace Tnb.Vengine.AppService;
|
||||
/// </summary>
|
||||
public class BaseAppService : IDynamicApiController, ITransient
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
//[ApiDescriptionSettings(Tag = ModuleConst.Tag, Area = ModuleConst.Area, Order = 100)]
|
||||
//public class VTestAppService : BaseAppService
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// 获取多条 数据列表
|
||||
// /// </summary>
|
||||
// public async Task<dynamic> ListAsync(string vmid, [FromQuery] VmGetListInput input)
|
||||
// {
|
||||
// return new List<string>();
|
||||
// }
|
||||
|
||||
//}
|
||||
@@ -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);
|
||||
VmQueryInput arg = input.Adapt<VmQueryInput>();
|
||||
VmListInput arg = input.Adapt<VmListInput>();
|
||||
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);
|
||||
VmQueryInput arg = input.Adapt<VmQueryInput>();
|
||||
VmListInput arg = input.Adapt<VmListInput>();
|
||||
if (!string.IsNullOrEmpty(input.q))
|
||||
{
|
||||
arg.q = input.q.ToObject<DObject>();
|
||||
@@ -72,8 +72,8 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
/// <summary>
|
||||
/// 获取多条 数据列表
|
||||
/// </summary>
|
||||
[HttpPost("api/[area]/[controller]/{vmid}/query")]
|
||||
public async Task<VmPagedOutput> QueryAsync(string vmid, [FromBody] VmQueryInput input)
|
||||
[HttpPost("api/[area]/[controller]/{vmid}/list")]
|
||||
public async Task<VmPagedOutput> ListAsync(string vmid, [FromBody] VmListInput input)
|
||||
{
|
||||
var vm = await _dataAccess.GetVmodelAsync(vmid, true);
|
||||
var ls = await _dataAccess.QueryDataAsync(vm, input);
|
||||
@@ -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);
|
||||
VmQueryInput arg = input.Adapt<VmQueryInput>();
|
||||
VmListInput arg = input.Adapt<VmListInput>();
|
||||
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);
|
||||
VmQueryInput arg = input.Adapt<VmQueryInput>();
|
||||
VmListInput arg = input.Adapt<VmListInput>();
|
||||
if (!string.IsNullOrEmpty(input.q))
|
||||
{
|
||||
arg.q = input.q.ToObject<DObject>();
|
||||
@@ -159,8 +159,8 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
/// <summary>
|
||||
/// 获取多条 数据列表
|
||||
/// </summary>
|
||||
[HttpPost("api/{areaCode}/{vmCode}/query")]
|
||||
public async Task<VmPagedOutput> QueryAsync(string areaCode, string vmCode, [FromBody] VmQueryInput input)
|
||||
[HttpPost("api/{areaCode}/{vmCode}/list")]
|
||||
public async Task<VmPagedOutput> ListAsync(string areaCode, string vmCode, [FromBody] VmListInput input)
|
||||
{
|
||||
var vm = await GetVmodelAsync(areaCode, vmCode);
|
||||
var ls = await _dataAccess.QueryDataAsync(vm, input);
|
||||
|
||||
@@ -66,7 +66,7 @@ public class VengineAppService<TEntity> : BaseAppService where TEntity : Entity
|
||||
public virtual async Task<dynamic> GetAsync([FromQuery] VmGetInput input)
|
||||
{
|
||||
var vm = await GetVmodelAsync();
|
||||
VmQueryInput arg = input.Adapt<VmQueryInput>();
|
||||
VmListInput arg = input.Adapt<VmListInput>();
|
||||
if (input.id != null)
|
||||
{
|
||||
if (arg.q == null) arg.q = new DObject();
|
||||
@@ -83,12 +83,7 @@ public class VengineAppService<TEntity> : BaseAppService where TEntity : Entity
|
||||
public virtual async Task<VmPagedOutput> GetListAsync([FromQuery] VmGetListInput input)
|
||||
{
|
||||
var vm = await GetVmodelAsync();
|
||||
VmQueryInput arg = input.Adapt<VmQueryInput>();
|
||||
if (!string.IsNullOrEmpty(input.q))
|
||||
{
|
||||
arg.q = input.q.ToObject<DObject>();
|
||||
}
|
||||
var ls = await _dataAccess.QueryDataAsync(vm, arg);
|
||||
var ls = await _dataAccess.QueryDataAsync(vm, input.ToListInput());
|
||||
return ls;
|
||||
}
|
||||
|
||||
@@ -96,7 +91,7 @@ public class VengineAppService<TEntity> : BaseAppService where TEntity : Entity
|
||||
/// 获取多条 数据列表
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public virtual async Task<VmPagedOutput> QueryAsync([FromBody] VmQueryInput input)
|
||||
public virtual async Task<VmPagedOutput> ListAsync([FromBody] VmListInput input)
|
||||
{
|
||||
var vm = await GetVmodelAsync();
|
||||
var ls = await _dataAccess.QueryDataAsync(vm, input);
|
||||
|
||||
@@ -71,9 +71,9 @@ public class VmodelAppService : VengineAppService<Vmodel>, IVmodelAppService
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public override Task<VmPagedOutput> QueryAsync(VmQueryInput input)
|
||||
public override Task<VmPagedOutput> ListAsync(VmListInput input)
|
||||
{
|
||||
return base.QueryAsync(input);
|
||||
return base.ListAsync(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user