You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
113 lines
2.8 KiB
C#
113 lines
2.8 KiB
C#
using DS.Module.Core;
|
|
using DS.WMS.Core.WxModule.Dtos;
|
|
using DS.WMS.Core.WxModule.Entity;
|
|
using DS.WMS.Core.WxModule.Interface;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace DS.WMS.WebApi.Controllers;
|
|
|
|
/// <summary>
|
|
/// 公众号用户
|
|
/// </summary>
|
|
public class WxUserController : ApiController
|
|
{
|
|
private readonly IWxUserService _invokeService;
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public WxUserController(IWxUserService invokeService)
|
|
{
|
|
_invokeService = invokeService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetWxUserList")]
|
|
public DataResult<List<WxUserViewModel>> GetWxUserList([FromBody] PageRequest request)
|
|
{
|
|
var res = _invokeService.GetListByPage(request);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 编辑
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("EditUser")]
|
|
public DataResult EditUser([FromBody] WxUserInput model)
|
|
{
|
|
var res = _invokeService.EditUser(model);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 详情
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetUserInfo")]
|
|
public DataResult<WxUser> GetUserInfo([FromQuery] string id)
|
|
{
|
|
var res = _invokeService.GetUserInfo(id);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 审核用户
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("AuditUser")]
|
|
public DataResult AuditUser([FromQuery] string id)
|
|
{
|
|
var res = _invokeService.AuditUser(id);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 获取客户信息列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetInfoClientList")]
|
|
public DataResult<List<InfoClientListViewModel>> GetInfoClientList([FromBody] PageRequest request)
|
|
{
|
|
var res = _invokeService.GetInfoClientList(request);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 注册用户
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[AllowAnonymous]
|
|
[Route("RegisterUser")]
|
|
public DataResult RegisterUser([FromBody] RegisterUserInput model)
|
|
{
|
|
var res = _invokeService.RegisterUser(model);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 微信用户登录
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[AllowAnonymous]
|
|
[Route("WxUserLogin")]
|
|
public DataResult WxUserLogin([FromBody] WxUserLoginInput model)
|
|
{
|
|
var res = _invokeService.WxUserLogin(model);
|
|
return res;
|
|
}
|
|
|
|
} |