using MyCode.Project.Domain.Message.Request.User;
using MyCode.Project.Domain.Message.Response.User;
using MyCode.Project.Infrastructure.Common;
using MyCode.Project.Infrastructure.Exceptions;
using MyCode.Project.Infrastructure.Extensions;
using MyCode.Project.Services;
using System.Web.Http;
namespace MyCode.Project.WebApi.Areas.Wechat.Controllers
{
///
///店长宝典 相关
///
public class BaoDianController : BaseWechatController
{
private IBaoDianService _baoDianService;
private IBillKeepingService _billKeepingService;
///
/// 初始化一个类型的实例
///
public BaoDianController(IBaoDianService baoDianService, IBillKeepingService billKeepingService)
{
_baoDianService = baoDianService;
_billKeepingService = billKeepingService;
}
#region GetMemberInfo 老客邀约计划的获取会员列表
///
/// 老客邀约计划的获取会员列表
///
/// 搜索条件
///
[HttpPost]
public PageResult GetMemberInfo(PagedSearch request)
{
if (!request.Condition.ShopID.HasValue)
{
throw new BaseException("请选择一个门店");
}
var shopIds = _billKeepingService.GetShopAssetRules(this.CurrentLogin.CustomerId, request.Condition.ShopID.SafeValue());
return _baoDianService.GetMemberInfo(request, this.CurrentLogin, shopIds);
}
#endregion
}
}