using MyCode.Project.Domain.Message.Act.Common; using MyCode.Project.Domain.Message.Common; using MyCode.Project.Domain.Message.Request.Goods; using MyCode.Project.Domain.Message.Request.Million; using MyCode.Project.Domain.Message.Response.Goods; using MyCode.Project.Domain.Message.Response.OpeningCeremony; using MyCode.Project.Domain.Model; using MyCode.Project.Infrastructure.Common; using MyCode.Project.Infrastructure.Enumeration; using MyCode.Project.Infrastructure.Extensions; using MyCode.Project.Services; using System; using System.Collections.Generic; using System.Web.Http; namespace MyCode.Project.WebApi.Areas.Wechat.Controllers { /// /// 开营仪式相关接口 /// public class OpeningCeremonyController : BaseWechatController { private IOpeningCeremonyTemplateService _openingCeremonyTemplateService; private IShopActionLogService _shopActionLogService; /// /// 初始化一个类型的实例 /// public OpeningCeremonyController(IOpeningCeremonyTemplateService openingCeremonyTemplateService , IShopActionLogService shopActionLogService) { _openingCeremonyTemplateService = openingCeremonyTemplateService; _shopActionLogService = shopActionLogService; } #region GetList(获取开营仪式的节点列表) /// /// 获取开营仪式的节点列表 /// /// [HttpGet] public List GetList(Guid shopId) { return _openingCeremonyTemplateService.GetList(shopId, this.CurrentLogin); } #endregion #region GetConfirmNames(获取节点已确认参加的名字) /// /// 获取节点已确认参加的名字 /// /// /// [HttpPost] public string GetConfirmNames(ConfirmNameRequest request) { return _openingCeremonyTemplateService.GetConfirmNames(request.Id, request.ShopId); } #endregion #region Confirm(确认参加某个开营节点) /// /// 确认参加某个开营节点 /// /// public void Confirm(ConfirmNameRequest act) { _openingCeremonyTemplateService.Confirm(act,this.CurrentLogin); //记录小程序操作 if (this.CurrentLogin.RoleType == LoginRoleType.CustomerID) _shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.CustomerId.SafeValue(), 1, 16); else _shopActionLogService.SetShopActionLog(act.ShopId, this.CurrentLogin.ClerkId.SafeValue(), 2, 16); } #endregion } }