|
@@ -5,6 +5,7 @@ using GxPress.EnumConst;
|
|
|
using GxPress.Repository.Interface.AppChannel;
|
|
|
using GxPress.Request.AppChannel;
|
|
|
using GxPress.Result.AppChannel;
|
|
|
+using GxPress.Service.Interface.AppChannel;
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
@@ -21,12 +22,13 @@ namespace GxPress.Api.AdminControllers
|
|
|
private readonly IChannelCategoryMediaRepository channelCategoryMediaRepository;
|
|
|
private readonly IChannelCategoryRepository channelCategoryRepository;
|
|
|
private readonly IAppChannelRepository appChannelRepository;
|
|
|
-
|
|
|
- public AdminAppChannelController(IChannelCategoryMediaRepository channelCategoryMediaRepository, IChannelCategoryRepository channelCategoryRepository, IAppChannelRepository appChannelRepository)
|
|
|
+ private readonly IAppChannelService appChannelService;
|
|
|
+ public AdminAppChannelController(IChannelCategoryMediaRepository channelCategoryMediaRepository, IChannelCategoryRepository channelCategoryRepository, IAppChannelRepository appChannelRepository, IAppChannelService appChannelService)
|
|
|
{
|
|
|
this.channelCategoryMediaRepository = channelCategoryMediaRepository;
|
|
|
this.channelCategoryRepository = channelCategoryRepository;
|
|
|
this.appChannelRepository = appChannelRepository;
|
|
|
+ this.appChannelService = appChannelService;
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 获取导航详情
|
|
@@ -77,6 +79,7 @@ namespace GxPress.Api.AdminControllers
|
|
|
{
|
|
|
return await appChannelRepository.InsertAsync(model);
|
|
|
}
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 获取导航分类详情
|
|
|
/// </summary>
|
|
@@ -88,13 +91,23 @@ namespace GxPress.Api.AdminControllers
|
|
|
return await channelCategoryRepository.GetAsync(id);
|
|
|
}
|
|
|
/// <summary>
|
|
|
+ ///修改导航分类
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="request"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPut("channel-category")]
|
|
|
+ public async Task<bool> ChannelCategoryUpdateAsync(ChannelCategory request)
|
|
|
+ {
|
|
|
+ return await channelCategoryRepository.UpdateAsync(request);
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
/// 查询导航分类
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("channel-category/list/{appChannelId}")]
|
|
|
public async Task<IEnumerable<ChannelCategoryResult>> ChannelCategoryGetAllAsync(int appChannelId)
|
|
|
{
|
|
|
- return await channelCategoryRepository.GetAllAsync(appChannelId);
|
|
|
+ return await appChannelService.GetAllAsync(appChannelId);
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 删除导航分类
|