修复最新简化集合方式的报错
This commit is contained in:
@@ -21,7 +21,7 @@ namespace Tnb.Vengine.AppService;
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = ModuleConst.Tag, Area = ModuleConst.Area, KeepVerb = true, Order = 1102)]
|
||||
[Route("api/[area]/[controller]/[action]")]
|
||||
public class VmodelAppService : VengineAppService<Vmodel>, IVmodelAppService
|
||||
public class VmodelAppService : VengineAppService<Vmodel, VmodelGetInput, Vmodel>, IVmodelAppService
|
||||
{
|
||||
private readonly IViewEngine _viewEngine;
|
||||
private readonly ICacheManager _cache;
|
||||
@@ -38,34 +38,34 @@ public class VmodelAppService : VengineAppService<Vmodel>, IVmodelAppService
|
||||
/// <summary>
|
||||
/// 获取一条 数据信息
|
||||
/// </summary>
|
||||
public override async Task<dynamic> GetAsync(VmGetInput input)
|
||||
public override async Task<Vmodel> GetAsync(VmodelGetInput input)
|
||||
{
|
||||
VmodelGetInput para = new VmodelGetInput();
|
||||
if (!string.IsNullOrEmpty(input.q))
|
||||
{
|
||||
para = input.q.ToObject<VmodelGetInput>();
|
||||
}
|
||||
var query = _db.Queryable<Vmodel>().Where(a => a.deleted == 0);
|
||||
Vmodel? vm = null;
|
||||
if (!string.IsNullOrEmpty(input.id))
|
||||
{
|
||||
vm = await _dataAccess.GetVmodelAsync(input.id, para.drill);
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(para.areaCode) && !string.IsNullOrEmpty(para.vmCode))
|
||||
{
|
||||
vm = await _dataAccess.GetVmodelAsync(para.areaCode, para.vmCode, para.drill);
|
||||
}
|
||||
ThrowIf.IsNull(vm, "输入参数有误, id 和 areaCode,vmCode 不可同时为空");
|
||||
return vm;
|
||||
//VmodelGetInput para = new VmodelGetInput();
|
||||
//if (!string.IsNullOrEmpty(input.q))
|
||||
//{
|
||||
// para = input.q.ToObject<VmodelGetInput>();
|
||||
//}
|
||||
//var query = _db.Queryable<Vmodel>().Where(a => a.deleted == 0);
|
||||
//Vmodel? vm = null;
|
||||
//if (!string.IsNullOrEmpty(input.id))
|
||||
//{
|
||||
// vm = await _dataAccess.GetVmodelAsync(input.id, para.drill);
|
||||
//}
|
||||
//else if (!string.IsNullOrEmpty(para.areaCode) && !string.IsNullOrEmpty(para.vmCode))
|
||||
//{
|
||||
// vm = await _dataAccess.GetVmodelAsync(para.areaCode, para.vmCode, para.drill);
|
||||
//}
|
||||
//ThrowIf.IsNull(vm, "输入参数有误, id 和 areaCode,vmCode 不可同时为空");
|
||||
return await base.GetAsync(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取多条 数据列表
|
||||
/// </summary>
|
||||
public override async Task<PagedOutput<dynamic>> GetListAsync(VmGetListInput input)
|
||||
{
|
||||
return await ListAsync(input.ToQueryInput());
|
||||
}
|
||||
///// <summary>
|
||||
///// 获取多条 数据列表
|
||||
///// </summary>
|
||||
//public override async Task<PagedOutput<dynamic>> GetListAsync(VmGetListInput input)
|
||||
//{
|
||||
// return await ListAsync(input.ToQueryInput());
|
||||
//}
|
||||
|
||||
[NonAction]
|
||||
public override async Task<PagedOutput<dynamic>> ListAsync(VmQueryInput input)
|
||||
|
||||
Reference in New Issue
Block a user