@@ -14,7 +14,7 @@ namespace BPA.SAAS.Manage.Application.Device.Interface | |||||
{ | { | ||||
Task<PageUtil> GetProductPage(ProductQueryInputDto inputDto); | Task<PageUtil> GetProductPage(ProductQueryInputDto inputDto); | ||||
Task<List<BPA_Product>> GetProductList(); | Task<List<BPA_Product>> GetProductList(); | ||||
Task<BPA_DeviceInfo> GetDevice(string productId); | |||||
Task<BPA_Product> GetProduct(string productId); | |||||
Task<bool> AddProduct(ProductBaseDto inputDto); | Task<bool> AddProduct(ProductBaseDto inputDto); | ||||
Task<bool> DeProduct(List<string> inputList); | Task<bool> DeProduct(List<string> inputList); | ||||
Task<bool> UpdateProduct(ProductBaseDto inputDto); | Task<bool> UpdateProduct(ProductBaseDto inputDto); | ||||
@@ -44,10 +44,10 @@ namespace BPA.SAAS.Manage.Application.Device | |||||
/// </summary> | /// </summary> | ||||
/// <param name="productId"></param> | /// <param name="productId"></param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpGet("/api/product/getdevice")] | |||||
public async Task<BPA_DeviceInfo> GetDevice(string productId) | |||||
[HttpGet("/api/product/getproduct")] | |||||
public async Task<BPA_Product> GetProduct(string productId) | |||||
{ | { | ||||
return await _productService.GetDevice(productId); | |||||
return await _productService.GetProduct(productId); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 添加 | /// 添加 | ||||
@@ -53,6 +53,11 @@ namespace BPA.SAAS.Manage.Application.Device.Services | |||||
var data = await _db.Queryable<BPA_Product>().Where(x=>x.Status==0) .ToListAsync(); | var data = await _db.Queryable<BPA_Product>().Where(x=>x.Status==0) .ToListAsync(); | ||||
return data; | return data; | ||||
} | } | ||||
public async Task<BPA_Product> GetProduct(string productId) | |||||
{ | |||||
var data = await _db.Queryable<BPA_Product>().Where(x => x.Id == productId).FirstAsync(); | |||||
return data; | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 新增 | /// 新增 | ||||
/// </summary> | /// </summary> | ||||