using BPA.SAAS.Manage.Application.Device.Dtos.Device;
using BPA.SAAS.Manage.Application.Device.Interface;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.Device;
using BPA.SAAS.Manage.Core.Product;
using Microsoft.AspNetCore.Components.Forms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BPA.SAAS.Manage.Application.Device
{
[ApiDescriptionSettings("Device", Tag = "产品管理")]
public class ProductServices: IDynamicApiController, ITransient
{
IProductService _productService;
public ProductServices(IProductService productService)
{
_productService=productService;
}
///
/// 分页查询
///
///
///
[HttpPost("/api/product/page")]
public async Task GetProductPage(ProductQueryInputDto inputDto)
{
return await _productService.GetProductPage(inputDto);
}
///
/// 查询列表
///
///
[HttpGet("/api/product/list")]
public async Task> GetProductList()
{
return await _productService.GetProductList();
}
///
/// 根据产品id查询产品信息
///
///
///
[HttpGet("/api/product/getproduct")]
public async Task GetProduct(string productId)
{
return await _productService.GetProduct(productId);
}
///
/// 添加
///
///
///
[HttpPost("/api/product/add")]
public async Task AddProduct(ProductBaseDto inputDto)
{
return await _productService.AddProduct(inputDto);
}
///
/// 删除
///
///
///
[HttpPost("/api/product/delete")]
public async Task DeProduct(List inputList)
{
return await _productService.DeProduct(inputList);
}
///
/// 更新
///
///
///
[HttpPost("/api/product/update")]
public async Task UpdateProduct(ProductBaseDto inputDto)
{
return await _productService.UpdateProduct(inputDto);
}
///
/// 更新状态
///
///
///
[HttpPost("/api/product/updatestatus")]
public async Task UpdateDeviceVesionSatatus(ProductSatatusDto inputDto)
{
return await _productService.UpdateDeviceVesionSatatus(inputDto);
}
}
}