using MyCode.Project.Domain.Message.Request.Clerk;
using MyCode.Project.Domain.Message.Request.CustomServiceSet;
using MyCode.Project.Domain.Message.Request.Goods;
using MyCode.Project.Domain.Message.Response.Common;
using MyCode.Project.Domain.Message.Response.CustomSetService;
using MyCode.Project.Domain.Message.Response.Shop;
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 CustomServiceSetController : BaseWechatController
{
private ICustomServiceSetService _customServiceSetService;
private IShopActionLogService _shopActionLogService;
///
/// 初始化一个类型的实例
///
public CustomServiceSetController(ICustomServiceSetService customServiceSetService
, IShopActionLogService shopActionLogService)
{
_customServiceSetService = customServiceSetService;
_shopActionLogService = shopActionLogService;
}
#region GetAllService 获取所有的服务
///
/// 获取所有的服务列表
///
///
[HttpPost]
public PageResult GetAllService(PagedSearch search)
{
return _customServiceSetService.GetAllService(search);
}
#endregion
#region GetAllServiceSet 获取加盟商所有自定义套餐
///
/// 获取加盟商所有自定义套餐
///
///
[HttpPost]
public PageResult GetAllServiceSet(PagedSearch search)
{
return _customServiceSetService.GetAllServiceSet(search,this.CurrentLogin);
}
#endregion
#region GetServiceSetByID 获取自定义套餐详情
///
/// 获取自定义套餐详情
///
///
[HttpGet]
public ServiceSetDetailResp GetServiceSetByID(Guid ID)
{
return _customServiceSetService.GetServiceSetByID(ID);
}
#endregion
#region SetServiceSet 新增或编辑套餐保存
///
/// 新增或编辑服务保存
///
///
[HttpPost]
public void SetServiceSet(ServiceSetDetailReq requst)
{
_customServiceSetService.SetServiceSet(requst,this.CurrentLogin);
}
#endregion
#region SetServiceStatus 修改套餐状态
///
/// 修改套餐状态
///
/// 主键ID
/// 套餐状态 1=上架;0=保存不上架。
[HttpGet]
public void SetServiceStatus(Guid ID, int Status)
{
_customServiceSetService.SetServiceStatus(ID, Status, this.CurrentLogin);
}
#endregion
#region GetGoodsPageList(获取自定义套餐的商品分页列表)
///
/// 获取自定义套餐的商品分页列表
///
///
///
[HttpPost]
public PageResult GetGoodsPageList(PagedSearch search)
{
return _customServiceSetService.GetGoodsPageList(search);
}
#endregion
#region GetServiceSetList(获取服务手工费列表)
///
/// 获取服务手工费列表
///
///
[HttpGet]
public List GetShouGongFeiList()
{
return _customServiceSetService.GetShouGongFeiList(this.CurrentLogin.CustomerId.Value);
}
#endregion
#region SaveShouGongFei(保存服务的手工费)
///
/// 保存服务的手工费
///
///
[HttpPost]
public void SaveShouGongFei(List act )
{
_customServiceSetService.SaveShouGongFei(act, this.CurrentLogin);
}
#endregion
#region GetServiceDeptFirstLevelList(获取服务分类的一级分类)
///
/// 获取服务分类的一级分类
///
///
[HttpGet]
public List GetServiceDeptFirstLevelList()
{
return _customServiceSetService.GetServiceDeptFirstLevelList();
}
#endregion
}
}