基础服务api
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

81 líneas
2.6 KiB

  1. using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsType;
  2. using BPA.SAAS.Manage.Application.DataBase.Interface;
  3. using BPA.SAAS.Manage.Core.Base;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace BPA.SAAS.Manage.Application.DataBase
  10. {
  11. [ApiDescriptionSettings("Goods", Tag = "商品类型管理")]
  12. public class GoodsTypeServices: IDynamicApiController, ITransient
  13. {
  14. IGoodsTypeService _goodsTypeService;
  15. public GoodsTypeServices(IGoodsTypeService goodsTypeService)
  16. {
  17. _goodsTypeService = goodsTypeService;
  18. }
  19. /// <summary>
  20. /// 分页查询
  21. /// </summary>
  22. /// <param name="dto"></param>
  23. /// <returns></returns>
  24. [HttpPost("/api/goodstype/page")]
  25. public async Task<PageUtil> GetGoodsTypePage(GoodsTypeQueryDto dto)
  26. {
  27. return await _goodsTypeService.GetGoodsTypePage(dto);
  28. }
  29. /// <summary>
  30. /// 查询类型列表(外部调用)
  31. /// </summary>
  32. /// <returns></returns>
  33. [HttpGet("/api/goodstype/getgoodstypelist_alm")]
  34. [AllowAnonymous]
  35. public async Task<List<dynamic>> GetGoodsTypeList_alm()
  36. {
  37. return await _goodsTypeService.GetGoodsTypeList_alm();
  38. }
  39. /// <summary>
  40. /// 添加商品类型
  41. /// </summary>
  42. /// <param name="dto"></param>
  43. /// <returns></returns>
  44. [HttpPost("/api/goodstype/add")]
  45. public async Task<bool> AddGoodsType(GoodsTypeDto dto)
  46. {
  47. return await _goodsTypeService.AddGoodsType(dto);
  48. }
  49. /// <summary>
  50. /// 更新商品类型
  51. /// </summary>
  52. /// <param name="dto"></param>
  53. /// <returns></returns>
  54. [HttpPost("/api/goodstype/update")]
  55. public async Task<bool> UpdateGoodsType(GoodsTypeDto dto)
  56. {
  57. return await _goodsTypeService.UpdateGoodsType(dto);
  58. }
  59. /// <summary>
  60. /// 删除商品类型
  61. /// </summary>
  62. /// <param name="Id"></param>
  63. /// <returns></returns>
  64. [HttpGet("/api/goodstype/delete")]
  65. public async Task<bool> DelGoodsType(string Id)
  66. {
  67. return await _goodsTypeService.DelGoodsType(Id);
  68. }
  69. /// <summary>
  70. /// 查询商品类型树结构
  71. /// </summary>
  72. /// <returns></returns>
  73. [HttpGet("/api/goodstype/tree")]
  74. public async Task<dynamic> GetGoodsTypeTree()
  75. {
  76. return await _goodsTypeService.GetGoodsTypeTree();
  77. }
  78. }
  79. }