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.Services; using System; using System.Collections.Generic; using System.Web.Http; namespace MyCode.Project.WebApi.Areas.Wechat.Controllers { /// ///百万店--业绩指标 相关 /// public class MillionShopKPIController : BaseWechatController { private IMillionShopKPIService _millionShopKPIService; /// /// 初始化一个类型的实例 /// public MillionShopKPIController(IMillionShopKPIService millionShopKPIService) { _millionShopKPIService = millionShopKPIService; } #region GetShopKPIModel 获取店铺的计算业绩方式列表 /// /// 获取该店铺的计算业绩方式 /// /// 店铺ID:加盟商查看时需传 /// [HttpGet] public List GetShopKPIModel(Guid? ShopID) { ShopID = ShopID.HasValue ? ShopID : this.CurrentLogin.ShopId; return _millionShopKPIService.GetShopKPIModel(ShopID.Value); } #endregion #region SetShopKPIModel 设置店铺的计算业绩方式 /// /// 设置店铺的计算业绩方式 /// /// [HttpPost] public void SetShopKPIModel(KPIModelReq request) { request.ShopID = request.ShopID.HasValue ? request.ShopID.Value : this.CurrentLogin.ShopId; _millionShopKPIService.SetShopKPIModel(request); } #endregion #region GetShopMonthKPI 获取店铺业绩月度与日指标 /// /// 获取店铺业绩月度与日指标 /// /// 店铺ID:加盟商查看时需传 /// 指标类型 0:月度 1:日指标 /// [HttpGet] public MonthKPIResp GetShopMonthKPI(Guid? ShopID,int TargetType) { ShopID = ShopID.HasValue ? ShopID : this.CurrentLogin.ShopId; return _millionShopKPIService.GetShopMonthKPI(ShopID.Value, TargetType); } #endregion #region SetMonthKPIDetail 设置店员业绩月度与日指标 /// /// 设置店员业绩月度与日指标 /// /// [HttpPost] public void SetMonthKPIDetail(MonthKPIReq request) { request.ShopID = request.ShopID.HasValue ? request.ShopID.Value : this.CurrentLogin.ShopId; _millionShopKPIService.SetMonthKPIDetail(request, this.CurrentLogin); } #endregion } }