Browse Source

产品查询

master
zhaoy 11 months ago
parent
commit
151c288cdf
3 changed files with 9 additions and 4 deletions
  1. +1
    -1
      BPA.SAAS.Manage.Application/Device/Interface/IProductService.cs
  2. +3
    -3
      BPA.SAAS.Manage.Application/Device/ProductServices.cs
  3. +5
    -0
      BPA.SAAS.Manage.Application/Device/Services/ProductService.cs

+ 1
- 1
BPA.SAAS.Manage.Application/Device/Interface/IProductService.cs View File

@@ -14,7 +14,7 @@ namespace BPA.SAAS.Manage.Application.Device.Interface
{
Task<PageUtil> GetProductPage(ProductQueryInputDto inputDto);
Task<List<BPA_Product>> GetProductList();
Task<BPA_DeviceInfo> GetDevice(string productId);
Task<BPA_Product> GetProduct(string productId);
Task<bool> AddProduct(ProductBaseDto inputDto);
Task<bool> DeProduct(List<string> inputList);
Task<bool> UpdateProduct(ProductBaseDto inputDto);


+ 3
- 3
BPA.SAAS.Manage.Application/Device/ProductServices.cs View File

@@ -44,10 +44,10 @@ namespace BPA.SAAS.Manage.Application.Device
/// </summary>
/// <param name="productId"></param>
/// <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>
/// 添加


+ 5
- 0
BPA.SAAS.Manage.Application/Device/Services/ProductService.cs View File

@@ -53,6 +53,11 @@ namespace BPA.SAAS.Manage.Application.Device.Services
var data = await _db.Queryable<BPA_Product>().Where(x=>x.Status==0) .ToListAsync();
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>


Loading…
Cancel
Save