333
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 开营仪式相关接口
|
||||
/// </summary>
|
||||
public class OpeningCeremonyController : BaseWechatController
|
||||
{
|
||||
private IOpeningCeremonyTemplateService _openingCeremonyTemplateService;
|
||||
private IShopActionLogService _shopActionLogService;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化一个<see cref="GoodsController"/>类型的实例
|
||||
/// </summary>
|
||||
public OpeningCeremonyController(IOpeningCeremonyTemplateService openingCeremonyTemplateService
|
||||
, IShopActionLogService shopActionLogService)
|
||||
{
|
||||
_openingCeremonyTemplateService = openingCeremonyTemplateService;
|
||||
_shopActionLogService = shopActionLogService;
|
||||
}
|
||||
|
||||
#region GetList(获取开营仪式的节点列表)
|
||||
/// <summary>
|
||||
/// 获取开营仪式的节点列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public List<OpeningCeremonyResp> GetList(Guid shopId)
|
||||
{
|
||||
return _openingCeremonyTemplateService.GetList(shopId, this.CurrentLogin);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region GetConfirmNames(获取节点已确认参加的名字)
|
||||
/// <summary>
|
||||
/// 获取节点已确认参加的名字
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public string GetConfirmNames(ConfirmNameRequest request)
|
||||
{
|
||||
return _openingCeremonyTemplateService.GetConfirmNames(request.Id, request.ShopId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Confirm(确认参加某个开营节点)
|
||||
/// <summary>
|
||||
/// 确认参加某个开营节点
|
||||
/// </summary>
|
||||
/// <param name="act"></param>
|
||||
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
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user