162 lines
5.6 KiB
C#
162 lines
5.6 KiB
C#
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
|
|
{
|
|
/// <summary>
|
|
///百万店--基本情况 相关
|
|
/// </summary>
|
|
public class MillionInfoController : BaseWechatController
|
|
{
|
|
private IMillionInfoService _millionInfoService;
|
|
private IMessageTaskService _messageTaskService;
|
|
private IShopActionLogService _shopActionLogService;
|
|
|
|
/// <summary>
|
|
/// 初始化一个<see cref="MillionInfoController"/>类型的实例
|
|
/// </summary>
|
|
public MillionInfoController(IMillionInfoService millionInfoService
|
|
, IMessageTaskService messageTaskService
|
|
, IShopActionLogService shopActionLogService
|
|
)
|
|
{
|
|
_millionInfoService = millionInfoService;
|
|
_messageTaskService = messageTaskService;
|
|
_shopActionLogService = shopActionLogService;
|
|
}
|
|
|
|
//#region SendManagerAudit(调度发送消息给店长:当天业绩审核提醒)
|
|
///// <summary>
|
|
///// 调度发送消息给店长:当天业绩审核提醒
|
|
///// </summary>
|
|
///// <param name="ShopID">店铺ID</param>
|
|
//[HttpGet]
|
|
//[AllowAnonymous]
|
|
//public void SendManagerAudit(Guid ShopID)
|
|
//{
|
|
// _messageTaskService.SendManagerAudit(ShopID);
|
|
//}
|
|
//#endregion
|
|
|
|
#region GetBaseInfo 获取基本情况
|
|
/// <summary>
|
|
/// 获取基本情况
|
|
/// </summary>
|
|
/// <param name="BaseID">基本情况ID</param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public MillionBaseInfo GetBaseInfo(Guid BaseID)
|
|
{
|
|
return _millionInfoService.GetBaseInfo(BaseID, this.CurrentLogin);
|
|
}
|
|
#endregion
|
|
|
|
#region SetBaseInfo 保存基本情况
|
|
/// <summary>
|
|
/// 保存基本情况
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[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 获取加盟商所有百万店铺
|
|
/// <summary>
|
|
/// 获取加盟商所有百万店铺
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public List<MillionBaseInfo> GetBaseInfoList()
|
|
{
|
|
return _millionInfoService.GetBaseInfoList(this.CurrentLogin);
|
|
}
|
|
#endregion
|
|
|
|
#region GetTeacherOrManager 获取T100老师或百万店经理
|
|
/// <summary>
|
|
/// 获取T100老师或百万店经理
|
|
/// </summary>
|
|
/// <param name="shopID">店铺主键</param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public List<LoginResp> GetTeacherOrManager(Guid shopID)
|
|
{
|
|
return _millionInfoService.GetTeacherOrManager(shopID);
|
|
}
|
|
#endregion
|
|
|
|
#region GetTradingArea 获取店铺类型
|
|
/// <summary>
|
|
/// 获取店铺类型
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public List<AreaResp> GetTradingArea()
|
|
{
|
|
return _millionInfoService.GetTradingArea();
|
|
}
|
|
#endregion
|
|
|
|
#region GetShopList 获取店铺列表
|
|
/// <summary>
|
|
/// 获取店铺列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public List<ShopResp> GetShopList()
|
|
{
|
|
return _millionInfoService.GetShopList(this.CurrentLogin);
|
|
}
|
|
#endregion
|
|
|
|
#region GetMillionPolicySchedule(获取打造百万店铺的进度条)
|
|
/// <summary>
|
|
/// 获取打造百万店铺的进度条
|
|
/// </summary>
|
|
/// <param name="ShopID"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public List<MillionPolicyScheduleResp> GetMillionPolicySchedule(Guid? ShopID)
|
|
{
|
|
return _millionInfoService.GetMillionPolicySchedule(ShopID,CurrentLogin);
|
|
}
|
|
#endregion
|
|
|
|
#region MeetingResult 店长的一天各个节点未明确目标、加盟商审核状态
|
|
/// <summary>
|
|
/// 店长的一天各个节点未明确目标、加盟商审核状态
|
|
/// </summary>
|
|
/// <param name=""></param>
|
|
/// <param name="templateId">节点ID</param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public MeetingResultResp MeetingResult(int templateId)
|
|
{
|
|
return _millionInfoService.MeetingResult(this.CurrentLogin,templateId);
|
|
}
|
|
#endregion
|
|
}
|
|
}
|