152 lines
4.9 KiB
C#
152 lines
4.9 KiB
C#
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
|
||
{
|
||
/// <summary>
|
||
///自定义套餐 相关
|
||
/// </summary>
|
||
public class CustomServiceSetController : BaseWechatController
|
||
{
|
||
private ICustomServiceSetService _customServiceSetService;
|
||
private IShopActionLogService _shopActionLogService;
|
||
|
||
/// <summary>
|
||
/// 初始化一个<see cref="CustomServiceSetController"/>类型的实例
|
||
/// </summary>
|
||
public CustomServiceSetController(ICustomServiceSetService customServiceSetService
|
||
, IShopActionLogService shopActionLogService)
|
||
{
|
||
_customServiceSetService = customServiceSetService;
|
||
_shopActionLogService = shopActionLogService;
|
||
}
|
||
|
||
#region GetAllService 获取所有的服务
|
||
/// <summary>
|
||
/// 获取所有的服务列表
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
public PageResult<ServiceResp> GetAllService(PagedSearch<KeyWordsSearch> search)
|
||
{
|
||
return _customServiceSetService.GetAllService(search);
|
||
}
|
||
|
||
#endregion
|
||
|
||
#region GetAllServiceSet 获取加盟商所有自定义套餐
|
||
/// <summary>
|
||
/// 获取加盟商所有自定义套餐
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
public PageResult<ServiceSetResp> GetAllServiceSet(PagedSearch search)
|
||
{
|
||
return _customServiceSetService.GetAllServiceSet(search,this.CurrentLogin);
|
||
}
|
||
|
||
#endregion
|
||
|
||
#region GetServiceSetByID 获取自定义套餐详情
|
||
/// <summary>
|
||
/// 获取自定义套餐详情
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
public ServiceSetDetailResp GetServiceSetByID(Guid ID)
|
||
{
|
||
return _customServiceSetService.GetServiceSetByID(ID);
|
||
}
|
||
|
||
#endregion
|
||
|
||
#region SetServiceSet 新增或编辑套餐保存
|
||
/// <summary>
|
||
/// 新增或编辑服务保存
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
public void SetServiceSet(ServiceSetDetailReq requst)
|
||
{
|
||
_customServiceSetService.SetServiceSet(requst,this.CurrentLogin);
|
||
}
|
||
|
||
#endregion
|
||
|
||
#region SetServiceStatus 修改套餐状态
|
||
/// <summary>
|
||
/// 修改套餐状态
|
||
/// </summary>
|
||
/// <param name="ID">主键ID</param>
|
||
/// <param name="Status">套餐状态 1=上架;0=保存不上架。 </param>
|
||
[HttpGet]
|
||
public void SetServiceStatus(Guid ID, int Status)
|
||
{
|
||
_customServiceSetService.SetServiceStatus(ID, Status, this.CurrentLogin);
|
||
}
|
||
|
||
#endregion
|
||
|
||
#region GetGoodsPageList(获取自定义套餐的商品分页列表)
|
||
/// <summary>
|
||
/// 获取自定义套餐的商品分页列表
|
||
/// </summary>
|
||
/// <param name="search"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
public PageResult<ServiceResp> GetGoodsPageList(PagedSearch<KeyWordsSearch> search)
|
||
{
|
||
return _customServiceSetService.GetGoodsPageList(search);
|
||
}
|
||
#endregion
|
||
|
||
|
||
#region GetServiceSetList(获取服务手工费列表)
|
||
/// <summary>
|
||
/// 获取服务手工费列表
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
public List<ServiceShouGongFeiResp> GetShouGongFeiList()
|
||
{
|
||
return _customServiceSetService.GetShouGongFeiList(this.CurrentLogin.CustomerId.Value);
|
||
}
|
||
#endregion
|
||
|
||
#region SaveShouGongFei(保存服务的手工费)
|
||
/// <summary>
|
||
/// 保存服务的手工费
|
||
/// </summary>
|
||
/// <param name="act"></param>
|
||
[HttpPost]
|
||
public void SaveShouGongFei(List<ServiceShouGongFeiResp> act )
|
||
{
|
||
_customServiceSetService.SaveShouGongFei(act, this.CurrentLogin);
|
||
}
|
||
#endregion
|
||
|
||
|
||
#region GetServiceDeptFirstLevelList(获取服务分类的一级分类)
|
||
/// <summary>
|
||
/// 获取服务分类的一级分类
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpGet]
|
||
public List<ServiceDeptList> GetServiceDeptFirstLevelList()
|
||
{
|
||
return _customServiceSetService.GetServiceDeptFirstLevelList();
|
||
}
|
||
#endregion
|
||
}
|
||
}
|