AppController.cs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. using Attribute;
  2. using Common;
  3. using Dto;
  4. using Vo;
  5. using Enums;
  6. using Filters;
  7. using Infrastructure;
  8. using Infrastructure.Model;
  9. using Mapster;
  10. using Microsoft.AspNetCore.Mvc;
  11. using Middleware;
  12. using Model;
  13. using Services.Client;
  14. using Model.Base;
  15. namespace Controllers
  16. {
  17. /// <summary>
  18. /// App)Controller
  19. /// </summary>
  20. // [Route("app")]
  21. // [ApiExplorerSettings(GroupName = "App")]
  22. public class AppController : BaseController
  23. {
  24. /// <summary>
  25. /// api分组接口
  26. /// </summary>
  27. private readonly IAppBottomNavsService _AppBottomNavsService;
  28. private readonly IFileUpdateInfoService _FileUpdateInfoService;
  29. private readonly IPageUpdateInfoService _PageUpdateInfoService;
  30. public AppController(IAppBottomNavsService AppBottomNavsService,IFileUpdateInfoService FileUpdateInfoService,IPageUpdateInfoService PageUpdateInfoService)
  31. {
  32. _AppBottomNavsService = AppBottomNavsService;
  33. _FileUpdateInfoService = FileUpdateInfoService;
  34. _PageUpdateInfoService = PageUpdateInfoService;
  35. }
  36. /// <summary>
  37. /// APP底部导航列表
  38. /// </summary>
  39. /// <param name="parm">请求参数</param>
  40. /// <returns>APP底部导航列表</returns>
  41. [HttpGet]
  42. [Route("/v1/kxsconfig/app/appBottomNavs")]
  43. public IActionResult AppBottomNavs([FromQuery] AppAppBottomNavsDto parm)
  44. {
  45. var response = _AppBottomNavsService.AppBottomNavs(parm);
  46. return SUCCESS(response);
  47. }
  48. /// <summary>
  49. /// APP静态资源
  50. /// </summary>
  51. /// <param name="parm">请求参数</param>
  52. /// <returns>APP静态资源</returns>
  53. [HttpGet]
  54. [Route("/v1/kxsconfig/app/staticFiles")]
  55. public IActionResult StaticFiles([FromQuery] AppStaticFilesDto parm)
  56. {
  57. var response = _FileUpdateInfoService.StaticFiles(parm);
  58. return SUCCESS(response);
  59. }
  60. /// <summary>
  61. /// APP页面数据检查
  62. /// </summary>
  63. /// <param name="parm">请求参数</param>
  64. /// <returns>APP页面数据检查</returns>
  65. [HttpGet]
  66. [Route("/v1/kxsconfig/app/pageInfo")]
  67. public IActionResult PageInfo([FromQuery] AppPageInfoDto parm)
  68. {
  69. var response = _PageUpdateInfoService.Queryable()
  70. .First(x => x.moduleVersion == parm.moduleVersion)
  71. .Adapt<AppPageInfoVo>() ?? new AppPageInfoVo();
  72. return SUCCESS(response);
  73. }
  74. }
  75. }