feat 换卡操作
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
using Dlhis.Basic.Organization.Request;
|
||||
using Dlhis.Basic.Organization.Response;
|
||||
using Dlhis.Basic.Organization.Services;
|
||||
using Dlhis.Basic.Packs;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Dlhis.Basic.Organization.Controllers;
|
||||
|
||||
/// <summary>
|
||||
/// 档案卡记录
|
||||
/// </summary>
|
||||
[Authorize]
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class GainfoCardsController : ControllerBase
|
||||
{
|
||||
private readonly IGainfoCardService _gainfoCardService;
|
||||
|
||||
public GainfoCardsController(IGainfoCardService gainfoCardService)
|
||||
{
|
||||
_gainfoCardService = gainfoCardService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 换卡
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("change")]
|
||||
[Transactional]
|
||||
public async Task ChangeCardAsync(ChangeCardRequest request)
|
||||
{
|
||||
await _gainfoCardService.ChangeCardAsync(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 换卡记录
|
||||
/// </summary>
|
||||
/// <param name="userNo"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("records")]
|
||||
public async Task<List<ChangeCardResponse>> GetChangeRecordsAsync(string userNo)
|
||||
{
|
||||
return await _gainfoCardService.GetChangeRecordsAsync(userNo);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user