修改泛型通用接口
This commit is contained in:
@@ -35,6 +35,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
_db = _dataAccess.GetSqlSugar();
|
||||
}
|
||||
|
||||
#region 按模型的id进行增删改查接口
|
||||
/// <summary>
|
||||
/// 获取Vmodel
|
||||
/// </summary>
|
||||
@@ -47,9 +48,6 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
return _models[id];
|
||||
}
|
||||
|
||||
|
||||
#region 按模型的id进行增删改查接口
|
||||
|
||||
/// <summary>
|
||||
/// 获取一条 数据信息
|
||||
/// </summary>
|
||||
@@ -68,7 +66,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
[HttpGet("api/[area]/[controller]/{vmid}/get-list")]
|
||||
public async Task<VmPagedOutput> GetListAsync(string vmid, [FromQuery] VmGetListInput input)
|
||||
{
|
||||
return await ListAsync(vmid, input.ToQueryInput());
|
||||
return await ListAsync(vmid, input.Adapt<VmQueryInput>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -86,7 +84,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
/// 新增 数据
|
||||
/// </summary>
|
||||
[HttpPost("api/[area]/[controller]/{vmid}/create")]
|
||||
public async Task<dynamic> CreateAsync(string vmid, [FromBody] VmCreateInput input)
|
||||
public async Task<dynamic> CreateAsync(string vmid, [FromBody] VmEditInput input)
|
||||
{
|
||||
var vm = await GetVmodelAsync(vmid);
|
||||
var ret = await _dataAccess.CreateDataAsync(vm, input);
|
||||
@@ -97,7 +95,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
/// 更新 数据
|
||||
/// </summary>
|
||||
[HttpPut("api/[area]/[controller]/{vmid}/update")]
|
||||
public async Task<dynamic> UpdateAsync(string vmid, [FromBody] VmUpdateInput input)
|
||||
public async Task<dynamic> UpdateAsync(string vmid, [FromBody] VmEditInput input)
|
||||
{
|
||||
var vm = await GetVmodelAsync(vmid);
|
||||
var ret = await _dataAccess.UpdateDataAsync(vm, input);
|
||||
@@ -147,7 +145,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
[HttpGet("api/{areaCode}/{vmCode}/get-list")]
|
||||
public async Task<VmPagedOutput> GetListAsync(string areaCode, string vmCode, [FromQuery] VmGetListInput input)
|
||||
{
|
||||
return await ListAsync(areaCode, vmCode, input.ToQueryInput());
|
||||
return await ListAsync(areaCode, vmCode, input.Adapt<VmQueryInput>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -165,7 +163,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
/// 新增 数据
|
||||
/// </summary>
|
||||
[HttpPost("api/{areaCode}/{vmCode}/create")]
|
||||
public async Task<dynamic> CreateAsync(string areaCode, string vmCode, [FromBody] VmCreateInput input)
|
||||
public async Task<dynamic> CreateAsync(string areaCode, string vmCode, [FromBody] VmEditInput input)
|
||||
{
|
||||
var vm = await GetVmodelAsync(areaCode, vmCode);
|
||||
var ret = await _dataAccess.CreateDataAsync(vm, input);
|
||||
@@ -176,7 +174,7 @@ public class VengineAppService : BaseAppService, IVengineAppService
|
||||
/// 更新 数据
|
||||
/// </summary>
|
||||
[HttpPut("api/{areaCode}/{vmCode}/update")]
|
||||
public async Task<dynamic> UpdateAsync(string areaCode, string vmCode, [FromBody] VmUpdateInput input)
|
||||
public async Task<dynamic> UpdateAsync(string areaCode, string vmCode, [FromBody] VmEditInput input)
|
||||
{
|
||||
var vm = await GetVmodelAsync(areaCode, vmCode);
|
||||
var ret = await _dataAccess.UpdateDataAsync(vm, input);
|
||||
|
||||
Reference in New Issue
Block a user