90 lines
2.5 KiB
C#
90 lines
2.5 KiB
C#
using MyCode.Project.Domain.Message.Common;
|
|
using MyCode.Project.Domain.Message.Request.Clerk;
|
|
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 ClerkController : BaseWechatController
|
|
{
|
|
private IClerkService _clerkService;
|
|
|
|
/// <summary>
|
|
/// 初始化一个<see cref="ClerkController"/>类型的实例
|
|
/// </summary>
|
|
public ClerkController(IClerkService clerkService)
|
|
{
|
|
_clerkService = clerkService;
|
|
}
|
|
|
|
#region GetClerkList 获取店员列表
|
|
/// <summary>
|
|
/// 获取店员列表
|
|
/// </summary>
|
|
/// <param name="ShopID">详细档案接口返回的店铺主键ShopID</param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public List<ClerkListResp> GetClerkList(Guid ShopID)
|
|
{
|
|
return _clerkService.GetClerkList(ShopID);
|
|
}
|
|
#endregion
|
|
|
|
#region GetAllClerkList 获取员工列表
|
|
/// <summary>
|
|
/// 获取店员列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public PageResult<AllClerkListResp> GetAllClerkList(PagedSearch<ClerkRequst> search)
|
|
{
|
|
return _clerkService.GetAllClerkList(search,this.CurrentLogin);
|
|
}
|
|
#endregion
|
|
|
|
#region GetClerkDetail 获取员工详细信息
|
|
/// <summary>
|
|
/// 获取员工详细信息
|
|
/// </summary>
|
|
/// <param name="ID"></param>
|
|
[HttpGet]
|
|
public ClerkResp GetClerkDetail(Guid ID)
|
|
{
|
|
return _clerkService.GetClerkDetail(ID);
|
|
}
|
|
#endregion
|
|
|
|
#region SetClerkDetail 修改或新增员工信息
|
|
/// <summary>
|
|
/// 修改或新增员工信息
|
|
/// </summary>
|
|
[HttpPost]
|
|
public void SetClerkDetail(EditClerkRequst requst)
|
|
{
|
|
_clerkService.SetClerkDetail(requst,this.CurrentLogin);
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region DeleteClerk (删除员工)
|
|
/// <summary>
|
|
/// 删除员工
|
|
/// </summary>
|
|
[HttpPost]
|
|
public void DeleteClerk(IdAct idAct)
|
|
{
|
|
_clerkService.DeleteClerk(idAct.Id, this.CurrentLogin);
|
|
}
|
|
#endregion
|
|
|
|
}
|
|
}
|