170 lines
5.3 KiB
C#
170 lines
5.3 KiB
C#
|
using MyCode.Project.Domain.Message.Common;
|
|||
|
using MyCode.Project.Domain.Message.Request.Member;
|
|||
|
using MyCode.Project.Domain.Message.Request.User;
|
|||
|
using MyCode.Project.Domain.Message.Response.Member;
|
|||
|
using MyCode.Project.Domain.Message.Response.ServiceOrder;
|
|||
|
using MyCode.Project.Domain.Message.Response.User;
|
|||
|
using MyCode.Project.Domain.Message.Response.Wechat;
|
|||
|
using MyCode.Project.Infrastructure.Common;
|
|||
|
using MyCode.Project.Services;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Web.Http;
|
|||
|
|
|||
|
namespace MyCode.Project.WebApi.Areas.Member.Controllers
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 会员信息相关
|
|||
|
/// </summary>
|
|||
|
public class MemberInfoController : BaseMemberController
|
|||
|
{
|
|||
|
|
|||
|
private IMemberInfoService _memberInfoService;
|
|||
|
private IMemberOrderService _MemberOrderService;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 初始化一个<see cref="MemberInfoController"/>类型的实例
|
|||
|
/// </summary>
|
|||
|
/// <param name="memberInfoService"></param>
|
|||
|
public MemberInfoController(IMemberInfoService memberInfoService
|
|||
|
,IMemberOrderService MemberOrderService)
|
|||
|
{
|
|||
|
_memberInfoService = memberInfoService;
|
|||
|
_MemberOrderService = MemberOrderService;
|
|||
|
}
|
|||
|
|
|||
|
#region 会员基本信息
|
|||
|
/// <summary>
|
|||
|
/// 会员基本信息
|
|||
|
/// </summary>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpGet]
|
|||
|
public MemberInfoResp GetMemberInfo(Guid shopID)
|
|||
|
{
|
|||
|
return _memberInfoService.GetMemberInfo(shopID,this.CurrentLogin.UserId);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region 会员绑定的店铺列表
|
|||
|
/// <summary>
|
|||
|
/// 会员绑定的店铺列表
|
|||
|
/// </summary>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpGet]
|
|||
|
[AllowAnonymous]
|
|||
|
public List<MemberShopResp> MemberShopList()
|
|||
|
{
|
|||
|
return _memberInfoService.MemberShopList(this.CurrentLogin);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region 获取会员余额明细列表
|
|||
|
/// <summary>
|
|||
|
/// 获取会员余额明细列表
|
|||
|
/// </summary>
|
|||
|
/// <param name="search"></param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpPost]
|
|||
|
public PageResult<BalanceDetail> GetMemberBalanceList(PagedSearch<MemberReq> search)
|
|||
|
{
|
|||
|
return _memberInfoService.GetMemberBalanceList(search,this.CurrentLogin);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region 余额适用的店铺列表
|
|||
|
/// <summary>
|
|||
|
/// 余额适用的店铺列表
|
|||
|
/// </summary>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpGet]
|
|||
|
public List<MemberShopResp> BalanceShopList(Guid shopId)
|
|||
|
{
|
|||
|
return _memberInfoService.BalanceShopList(shopId,this.CurrentLogin);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region 获取账户积分汇总信息
|
|||
|
/// <summary>
|
|||
|
/// 获取账户积分汇总信息
|
|||
|
/// </summary>
|
|||
|
/// <param name="shopId">个人中心选择店铺主键ID</param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpGet]
|
|||
|
public AccountIntegralInfoResp GetAccountIntegral(Guid shopId)
|
|||
|
{
|
|||
|
return _memberInfoService.GetAccountIntegral(shopId,this.CurrentLogin.UserId);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region 获取账户积分流水分页列表
|
|||
|
/// <summary>
|
|||
|
/// 获取账户积分流水分页列表
|
|||
|
/// </summary>
|
|||
|
/// <param name="search">查询条件</param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpPost]
|
|||
|
public PageResult<AcountIntegralBookListResp> GetAccountIntegralBookPageList(PagedSearch<MemberReq> search)
|
|||
|
{
|
|||
|
return _memberInfoService.GetAccountIntegralBookPageList(search, this.CurrentLogin.UserId);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region GetMemberOrderList 获取会员消费记录
|
|||
|
/// <summary>
|
|||
|
/// 获取会员消费记录
|
|||
|
/// </summary>
|
|||
|
/// <param name="request"></param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpPost]
|
|||
|
public MemberOrderListResp GetMemberOrderList(PagedSearch<MemberOrderRequst> search)
|
|||
|
{
|
|||
|
search.Condition.MemberID = this.CurrentLogin.UserId;
|
|||
|
return _MemberOrderService.GetMemberOrderList(search);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region GetMemberEquity 获取会员权益富文本
|
|||
|
/// <summary>
|
|||
|
/// 获取会员权益富文本
|
|||
|
/// </summary>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpGet]
|
|||
|
[AllowAnonymous]
|
|||
|
public string GetMemberEquity()
|
|||
|
{
|
|||
|
return _memberInfoService.GetMemberEquity();
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region GetCustomPage 获取自定义页面信息
|
|||
|
/// <summary>
|
|||
|
/// 获取自定义页面信息
|
|||
|
/// </summary>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpGet]
|
|||
|
[AllowAnonymous]
|
|||
|
public CustomPage GetCustomPage(Guid id)
|
|||
|
{
|
|||
|
return _memberInfoService.GetCustomPage(id);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
#region GetOrderShopInfo(获取会员的开卡店铺和加盟商信息)
|
|||
|
/// <summary>
|
|||
|
/// 获取会员的开卡店铺和加盟商信息
|
|||
|
/// </summary>
|
|||
|
/// <param name="userId"></param>
|
|||
|
/// <returns></returns>
|
|||
|
[HttpGet]
|
|||
|
[AllowAnonymous]
|
|||
|
public OrderShopInfo GetOrderShopInfo(Guid userId)
|
|||
|
{
|
|||
|
return _MemberOrderService.GetOrderShopInfo(userId);
|
|||
|
}
|
|||
|
#endregion
|
|||
|
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|