基础服务api
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

64 lines
2.2 KiB

  1. using BPA.SAAS.Manage.Application.Device.Dtos.Device;
  2. using BPA.SAAS.Manage.Application.Device.Dtos.ProductTopics;
  3. using BPA.SAAS.Manage.Application.Device.Interface;
  4. using BPA.SAAS.Manage.Core.Base;
  5. using Microsoft.AspNetCore.Components.Forms;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. namespace BPA.SAAS.Manage.Application.Device
  12. {
  13. [ApiDescriptionSettings("Device", Tag = "产品Topics")]
  14. public class ProductTopicsServices: IDynamicApiController, ITransient
  15. {
  16. IProductTopicsService _productTopicsService;
  17. public ProductTopicsServices(IProductTopicsService productTopicsService)
  18. {
  19. _productTopicsService=productTopicsService;
  20. }
  21. /// <summary>
  22. /// 分页查询
  23. /// </summary>
  24. /// <param name="inputDto"></param>
  25. /// <returns></returns>
  26. [HttpPost("/api/producttopics/page")]
  27. public async Task<PageUtil> GetProductTopicsPage(ProductTopicsQueryInputDto inputDto)
  28. {
  29. return await _productTopicsService.GetProductTopicsPage(inputDto);
  30. }
  31. /// <summary>
  32. /// 添加
  33. /// </summary>
  34. /// <param name="inputDto"></param>
  35. /// <returns></returns>
  36. [HttpPost("/api/producttopics/add")]
  37. public async Task<bool> AddProductTopics(ProductTopicsBaseDto inputDto)
  38. {
  39. return await _productTopicsService.AddProductTopics(inputDto);
  40. }
  41. /// <summary>
  42. /// 更新
  43. /// </summary>
  44. /// <param name="inputDto"></param>
  45. /// <returns></returns>
  46. [HttpPost("/api/producttopics/update")]
  47. public async Task<bool> UpdateProductTopics(ProductTopicsBaseDto inputDto)
  48. {
  49. return await _productTopicsService.UpdateProductTopics(inputDto);
  50. }
  51. /// <summary>
  52. /// 删除
  53. /// </summary>
  54. /// <param name="inputList"></param>
  55. /// <returns></returns>
  56. [HttpPost("/api/producttopics/delete")]
  57. public async Task<bool> DelProductTopics(List<string> inputList)
  58. {
  59. return await _productTopicsService.DelProductTopics(inputList);
  60. }
  61. }
  62. }