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

82 lines
2.5 KiB

  1. using BPA.SAAS.Manage.Application.Org.Dtos.Company;
  2. using BPA.SAAS.Manage.Application.Org.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.Org
  10. {
  11. [ApiDescriptionSettings("Org", Tag = "加盟商信息")]
  12. public class CompanyServices: IDynamicApiController
  13. {
  14. ICompanyService _companyService;
  15. public CompanyServices(ICompanyService companyService)
  16. {
  17. _companyService=companyService;
  18. }
  19. /// <summary>
  20. /// 查询企业信息
  21. /// </summary>
  22. /// <param name="input"></param>
  23. /// <returns></returns>
  24. [HttpPost("/api/company/companypage")]
  25. public async Task<PageUtil> CompanyPage(CompanyDtoPageInput input)
  26. {
  27. return await _companyService.CompanyPage(input);
  28. }
  29. /// <summary>
  30. /// 添加企业信息
  31. /// </summary>
  32. /// <param name="input"></param>
  33. /// <returns></returns>
  34. [HttpPost("/api/company/add")]
  35. public async Task<bool> AddCompany(CompanyDtoInput input)
  36. {
  37. return await _companyService.AddCompany(input);
  38. }
  39. /// <summary>
  40. /// 修改企业信息
  41. /// </summary>
  42. /// <param name="input"></param>
  43. /// <returns></returns>
  44. [HttpPost("/api/company/update")]
  45. public async Task<bool> UpdateCompany(CompanyDtoInput input)
  46. {
  47. return await _companyService.UpdateCompany(input);
  48. }
  49. /// <summary>
  50. /// 删除企业信息
  51. /// </summary>
  52. /// <param name="inputList"></param>
  53. /// <returns></returns>
  54. [HttpPost("/api/company/delete")]
  55. public async Task<bool> BatchDelCompany(List<string> inputList)
  56. {
  57. return await _companyService.BatchDelCompany(inputList);
  58. }
  59. /// <summary>
  60. /// 启用
  61. /// </summary>
  62. /// <param name="Id"></param>
  63. /// <returns></returns>
  64. [HttpGet("/api/company/enable")]
  65. public async Task<bool> Enable(string Id)
  66. {
  67. return await _companyService.Enable(Id);
  68. }
  69. /// <summary>
  70. /// 禁用
  71. /// </summary>
  72. /// <param name="Id"></param>
  73. /// <returns></returns>
  74. [HttpGet("/api/company/disable")]
  75. public async Task<bool> Disable(string Id)
  76. {
  77. return await _companyService.Disable(Id);
  78. }
  79. }
  80. }