2025-04-24 18:31:27 +08:00

51 lines
1.5 KiB
C#

using MyCode.Project.Domain.Message.Request.Shop;
using MyCode.Project.Domain.Message.Response.Shop;
using MyCode.Project.Infrastructure.Common;
using MyCode.Project.Services;
using System.Collections.Generic;
using System.Web.Http;
namespace MyCode.Project.WebApi.Areas.Wechat.Controllers
{
public class ShopController : BaseWechatController
{
private IShopService _shopService;
/// <summary>
/// 初始化一个<see cref="GoodsController"/>类型的实例
/// </summary>
public ShopController(IShopService shopService)
{
_shopService = shopService;
}
#region GetShopByCustomer
/// <summary>
/// 获取当前加盟商所有店铺
/// </summary>
/// <returns></returns>
[HttpGet]
public List<ShopListResp> GetShopByCustomer()
{
return _shopService.GetShopByCustomer(this.CurrentLogin);
}
#endregion
#region GetShopByKeyWordsPageList()
/// <summary>
/// 关键字查询店铺分页列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
public PageResult<ShopCustomerListResp> GetShopByKeyWordsPageList(PagedSearch<KeyWordsQuest> request)
{
return _shopService.GetShopByKeyWordsPageList(request);
}
#endregion
}
}