using MyCode.Project.Domain.Message.Common; using MyCode.Project.Domain.Message.Request.Activity; using MyCode.Project.Domain.Message.Request.Member; using MyCode.Project.Domain.Message.Request.User; using MyCode.Project.Domain.Message.Response.CardCover; using MyCode.Project.Domain.Message.Response.Goods; using MyCode.Project.Domain.Message.Response.LuckyDraw; using MyCode.Project.Domain.Message.Response.Member; 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 { /// /// 抽奖活动相关 /// public class LuckyDrawController : BaseMemberController { private ILuckyDrawService _luckyDrawService; /// /// 初始化一个类型的实例 /// /// public LuckyDrawController(ILuckyDrawService luckyDrawService) { _luckyDrawService = luckyDrawService; } #region IfJoin(门店是否开通抽奖活动) /// /// 门店是否开通抽奖活动 /// /// 店铺ID /// [HttpGet] public int IfJoin(Guid shopId) { return _luckyDrawService.IfJoin(shopId); } #endregion #region GetDetail(获取抽奖背景图等详情) /// /// 获取抽奖背景图等详情 /// /// 店铺ID /// [HttpGet] public LuckyDrawDetailResp GetDetail(Guid shopId) { return _luckyDrawService.GetDetail(shopId); } #endregion #region GetLuckyDrawLog(获取中奖记录和剩余抽奖次数) /// /// 获取中奖记录和剩余抽奖次数 /// /// 店铺ID /// [HttpGet] public LuckyDrawLogResp GetLuckyDrawLog(Guid shopId) { return _luckyDrawService.GetLuckyDrawLog(shopId,this.CurrentLogin); } #endregion #region LuckyDrawRun(抽奖) /// /// 抽奖 /// /// 店铺ID /// [HttpPost] public LuckyDrawRunResp LuckyDrawRun(IdAct idAct) { return _luckyDrawService.LuckyDrawRun(idAct, this.CurrentLogin); } #endregion } }