using MyCode.Project.Domain.Message.Request.Clerk;
using MyCode.Project.Domain.Message.Request.Million;
using MyCode.Project.Domain.Message.Request.Target;
using MyCode.Project.Domain.Message.Response.CardCover;
using MyCode.Project.Domain.Message.Response.MillionPolicy;
using MyCode.Project.Domain.Message.Response.Shop;
using MyCode.Project.Domain.Message.Response.Target;
using MyCode.Project.Domain.Message.Response.User;
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 MillionInfoController : BaseWechatController
{
private IMillionInfoService _millionInfoService;
private IMessageTaskService _messageTaskService;
private IShopActionLogService _shopActionLogService;
///
/// 初始化一个类型的实例
///
public MillionInfoController(IMillionInfoService millionInfoService
, IMessageTaskService messageTaskService
, IShopActionLogService shopActionLogService
)
{
_millionInfoService = millionInfoService;
_messageTaskService = messageTaskService;
_shopActionLogService = shopActionLogService;
}
//#region SendManagerAudit(调度发送消息给店长:当天业绩审核提醒)
/////
///// 调度发送消息给店长:当天业绩审核提醒
/////
///// 店铺ID
//[HttpGet]
//[AllowAnonymous]
//public void SendManagerAudit(Guid ShopID)
//{
// _messageTaskService.SendManagerAudit(ShopID);
//}
//#endregion
#region GetBaseInfo 获取基本情况
///
/// 获取基本情况
///
/// 基本情况ID
///
[HttpGet]
public MillionBaseInfo GetBaseInfo(Guid BaseID)
{
return _millionInfoService.GetBaseInfo(BaseID, this.CurrentLogin);
}
#endregion
#region SetBaseInfo 保存基本情况
///
/// 保存基本情况
///
///
[HttpPost]
public Guid SetBaseInfo(MillionBaseInfoReq requst)
{
var result = _millionInfoService.SetBaseInfo(requst, this.CurrentLogin);
//记录小程序操作
if (this.CurrentLogin.RoleType == LoginRoleType.CustomerID)
_shopActionLogService.SetShopActionLog(requst.ShopID.SafeValue(), this.CurrentLogin.CustomerId.SafeValue(), 1, 16);
else
_shopActionLogService.SetShopActionLog(requst.ShopID.SafeValue(), this.CurrentLogin.ClerkId.SafeValue(), 2, 16);
return result;
}
#endregion
#region GetBaseInfoList 获取加盟商所有百万店铺
///
/// 获取加盟商所有百万店铺
///
///
[HttpGet]
public List GetBaseInfoList()
{
return _millionInfoService.GetBaseInfoList(this.CurrentLogin);
}
#endregion
#region GetTeacherOrManager 获取T100老师或百万店经理
///
/// 获取T100老师或百万店经理
///
/// 店铺主键
///
[HttpGet]
public List GetTeacherOrManager(Guid shopID)
{
return _millionInfoService.GetTeacherOrManager(shopID);
}
#endregion
#region GetTradingArea 获取店铺类型
///
/// 获取店铺类型
///
///
[HttpGet]
public List GetTradingArea()
{
return _millionInfoService.GetTradingArea();
}
#endregion
#region GetShopList 获取店铺列表
///
/// 获取店铺列表
///
///
[HttpGet]
public List GetShopList()
{
return _millionInfoService.GetShopList(this.CurrentLogin);
}
#endregion
#region GetMillionPolicySchedule(获取打造百万店铺的进度条)
///
/// 获取打造百万店铺的进度条
///
///
///
[HttpGet]
public List GetMillionPolicySchedule(Guid? ShopID)
{
return _millionInfoService.GetMillionPolicySchedule(ShopID,CurrentLogin);
}
#endregion
#region MeetingResult 店长的一天各个节点未明确目标、加盟商审核状态
///
/// 店长的一天各个节点未明确目标、加盟商审核状态
///
///
/// 节点ID
///
[HttpGet]
public MeetingResultResp MeetingResult(int templateId)
{
return _millionInfoService.MeetingResult(this.CurrentLogin,templateId);
}
#endregion
}
}