61 lines
1.9 KiB
C#
61 lines
1.9 KiB
C#
using Infrastructure;
|
|
using Infrastructure.Attribute;
|
|
using Infrastructure.Enums;
|
|
using Infrastructure.Model;
|
|
using Mapster;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using ARW.Admin.WebApi.Extensions;
|
|
using ARW.Admin.WebApi.Filters;
|
|
using ARW.Common;
|
|
using ARW.Admin.WebApi.Controllers;
|
|
using ARW.Model.Dto.Api.GoodsManager.Goodss;
|
|
using ARW.Service.Api.IBusinessService.GoodsManager.Goodss;
|
|
using ARW.Model.Models.Business.GoodsManager.Goodss;
|
|
using ARW.Model.Vo.Api.GoodsManager.Goodss;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Geocoding;
|
|
using ARW.Service.Api.IBusinessService.GoodsManager.GoodsCategorys;
|
|
using ARW.Model.Dto.Api.GoodsManager.GoodsCategorys;
|
|
using ARW.Model.Vo.Api.GoodsManager.GoodsCategorys;
|
|
|
|
namespace ARW.WebApi.Controllers.Api.GoodsManager.Home
|
|
{
|
|
/// <summary>
|
|
/// 首页控制器Api
|
|
///
|
|
/// @author lwh
|
|
/// @date 2023-07-09
|
|
/// </summary>
|
|
//[Verify]
|
|
[Route("api/[controller]")]
|
|
public class HomeApiController : BaseController
|
|
{
|
|
private readonly IGoodsServiceApi _GoodsServiceApi;
|
|
private readonly IGoodsCategoryServiceApi _GoodsCategoryServiceApi;
|
|
|
|
/// <summary>
|
|
/// 依赖注入
|
|
/// </summary>
|
|
/// <param name="GoodsServiceApi">商品商品Api服务</param>
|
|
public HomeApiController(IGoodsServiceApi GoodsServiceApi, IGoodsCategoryServiceApi goodsCategoryServiceApi)
|
|
{
|
|
_GoodsServiceApi = GoodsServiceApi;
|
|
_GoodsCategoryServiceApi = goodsCategoryServiceApi;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 获取首页推荐类目列表(Api)
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("getHomeCategoryListApi")]
|
|
public async Task<IActionResult> GetHomeCategoryListApi()
|
|
{
|
|
var res = await _GoodsCategoryServiceApi.GetHomeCategoryListApi();
|
|
return SUCCESS(res);
|
|
}
|
|
|
|
}
|
|
}
|