基础服务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.
 
 

75 lines
2.6 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 BPA.SAAS.Manage.Core.Product;
  6. using Microsoft.AspNetCore.Components.Forms;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. namespace BPA.SAAS.Manage.Application.Device
  13. {
  14. [ApiDescriptionSettings("Device", Tag = "产品Topics")]
  15. public class ProductTopicsServices: IDynamicApiController, ITransient
  16. {
  17. IProductTopicsService _productTopicsService;
  18. public ProductTopicsServices(IProductTopicsService productTopicsService)
  19. {
  20. _productTopicsService=productTopicsService;
  21. }
  22. /// <summary>
  23. /// 分页查询
  24. /// </summary>
  25. /// <param name="inputDto"></param>
  26. /// <returns></returns>
  27. [HttpPost("/api/producttopics/page")]
  28. public async Task<PageUtil> GetProductTopicsPage(ProductTopicsQueryInputDto inputDto)
  29. {
  30. return await _productTopicsService.GetProductTopicsPage(inputDto);
  31. }
  32. /// <summary>
  33. /// 查询topics列表
  34. /// </summary>
  35. /// <param name="inputDto"></param>
  36. /// <returns></returns>
  37. [HttpPost("/api/producttopics/list")]
  38. public async Task<List<BPA_ProductTopics>> GetProductTopicList(ProductTopicsQueryDto inputDto)
  39. {
  40. return await _productTopicsService.GetProductTopicList(inputDto);
  41. }
  42. /// <summary>
  43. /// 添加
  44. /// </summary>
  45. /// <param name="inputDto"></param>
  46. /// <returns></returns>
  47. [HttpPost("/api/producttopics/add")]
  48. public async Task<bool> AddProductTopics(ProductTopicsBaseDto inputDto)
  49. {
  50. return await _productTopicsService.AddProductTopics(inputDto);
  51. }
  52. /// <summary>
  53. /// 更新
  54. /// </summary>
  55. /// <param name="inputDto"></param>
  56. /// <returns></returns>
  57. [HttpPost("/api/producttopics/update")]
  58. public async Task<bool> UpdateProductTopics(ProductTopicsBaseDto inputDto)
  59. {
  60. return await _productTopicsService.UpdateProductTopics(inputDto);
  61. }
  62. /// <summary>
  63. /// 删除
  64. /// </summary>
  65. /// <param name="inputList"></param>
  66. /// <returns></returns>
  67. [HttpPost("/api/producttopics/delete")]
  68. public async Task<bool> DelProductTopics(List<string> inputList)
  69. {
  70. return await _productTopicsService.DelProductTopics(inputList);
  71. }
  72. }
  73. }