using Attribute; using Common; using Dto; using Vo; using Enums; using Filters; using Infrastructure; using Infrastructure.Model; using Mapster; using Microsoft.AspNetCore.Mvc; using Middleware; using Model; using Services.Client; using Model.Base; namespace Controllers { /// /// App)Controller /// // [Route("app")] // [ApiExplorerSettings(GroupName = "App")] public class AppController : BaseController { /// /// api分组接口 /// private readonly IAppBottomNavsService _AppBottomNavsService; private readonly IFileUpdateInfoService _FileUpdateInfoService; private readonly IPageUpdateInfoService _PageUpdateInfoService; public AppController(IAppBottomNavsService AppBottomNavsService,IFileUpdateInfoService FileUpdateInfoService,IPageUpdateInfoService PageUpdateInfoService) { _AppBottomNavsService = AppBottomNavsService; _FileUpdateInfoService = FileUpdateInfoService; _PageUpdateInfoService = PageUpdateInfoService; } /// /// APP底部导航列表 /// /// 请求参数 /// APP底部导航列表 [HttpGet] [Route("/v1/kxsconfig/app/appBottomNavs")] public IActionResult AppBottomNavs([FromQuery] AppAppBottomNavsDto parm) { var response = _AppBottomNavsService.AppBottomNavs(parm); return SUCCESS(response); } /// /// APP静态资源 /// /// 请求参数 /// APP静态资源 [HttpGet] [Route("/v1/kxsconfig/app/staticFiles")] public IActionResult StaticFiles([FromQuery] AppStaticFilesDto parm) { var response = _FileUpdateInfoService.StaticFiles(parm); return SUCCESS(response); } /// /// APP页面数据检查 /// /// 请求参数 /// APP页面数据检查 [HttpGet] [Route("/v1/kxsconfig/app/pageInfo")] public IActionResult PageInfo([FromQuery] AppPageInfoDto parm) { var response = _PageUpdateInfoService.Queryable() .First(x => x.moduleVersion == parm.moduleVersion) .Adapt() ?? new AppPageInfoVo(); return SUCCESS(response); } } }