48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
using Dlhis.Basic.MealUser.Request;
|
|
using Dlhis.Basic.MealUser.Response;
|
|
using Dlhis.Basic.MealUser.Services;
|
|
using Kurisu.Core.DataAccess.Dto;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Dlhis.Basic.MealUser.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 订餐地址
|
|
/// </summary>
|
|
[Authorize]
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public class BookingAddresController : ControllerBase
|
|
{
|
|
private readonly IBookingAddresService _bookingAddresService;
|
|
|
|
public BookingAddresController(IBookingAddresService bookingAddresService)
|
|
{
|
|
_bookingAddresService = bookingAddresService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 地址分页
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("pageAddres")]
|
|
public async Task<Pagination<GetAddresPageResponse>> GetAddresPageAsync([FromQuery] GetAddresPageRequest request)
|
|
{
|
|
return await _bookingAddresService.GetAddresPageRequest(request);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 地址保存
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("saveAddres")]
|
|
public async Task SaveAddresAsync(SaveAddresRequest request)
|
|
{
|
|
await _bookingAddresService.SaveAddresAsync(request);
|
|
}
|
|
}
|
|
}
|