12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using System.Collections.Generic;
- using System.Threading.Tasks;
- using GxPress.Repository.Interface.AppStartPage;
- using Microsoft.AspNetCore.Authorization;
- using Microsoft.AspNetCore.Mvc;
- namespace GxPress.Api.AdminControllers
- {
- /// <summary>
- /// app启动页管理
- /// </summary>
- [Route("api/admin/app-start-page")]
- [ApiController]
- [Authorize]
- public class AdminAppStartPage : Controller
- {
- private readonly IAppStartPageRepository appStartPageRepository;
- public AdminAppStartPage(IAppStartPageRepository appStartPageRepository)
- {
- this.appStartPageRepository = appStartPageRepository;
- }
- /// <summary>
- /// 查询
- /// </summary>
- /// <returns></returns>
- [HttpGet("list")]
- public async Task<IEnumerable<Entity.tede2.AppStartPage.AppStartPage>> GetAllAsync()
- {
- return await appStartPageRepository.GetAllAsync();
- }
- /// <summary>
- /// 删除
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- [HttpDelete("{id}")]
- public async Task<bool> DeleteAsync(int id)
- {
- return await appStartPageRepository.DeleteAsync(id);
- }
- /// <summary>
- /// 修改
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- [HttpPut("")]
- public async Task<bool> UpdateAsync(Entity.tede2.AppStartPage.AppStartPage model)
- {
- return await appStartPageRepository.UpdateAsync(model);
- }
- }
- }
|