Implement API security baseline (sys_user, JWT, audit fields, transactions, unique constraints) and Web real login with 401 handling. Document setup and development workflows in root, WmsLite.Api, and WmsLite.Web README files. Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
889 B
C#
26 lines
889 B
C#
using Microsoft.AspNetCore.Mvc;
|
||
|
||
using WmsLite.Api.Common;
|
||
|
||
using WmsLite.Api.Dtos.Dictionary;
|
||
|
||
using WmsLite.Api.Infrastructure.Auth;
|
||
|
||
using WmsLite.Api.Services.Interfaces;
|
||
|
||
|
||
|
||
namespace WmsLite.Api.Controllers;
|
||
|
||
|
||
|
||
[ApiController]
|
||
|
||
[Route("api/[controller]")]
|
||
|
||
public class SysDictionaryController : WmsLiteControllerBase
|
||
|
||
{
|
||
|
||
private readonly ISysDictService _service;
|
||
|
||
|
||
|
||
public SysDictionaryController(ISysDictService service, ICurrentUserContext currentUser)
|
||
|
||
: base(currentUser)
|
||
|
||
{
|
||
|
||
_service = service;
|
||
|
||
}
|
||
|
||
|
||
|
||
/// <summary>category → code → Chinese label(租户条目覆盖 platform system 条目)。</summary>
|
||
|
||
[HttpPost("map")]
|
||
|
||
public async Task<ActionResult<BusinessResult>> Map([FromBody] SysDictionaryMapRequest request)
|
||
|
||
=> Ok(BusinessResult.Ok(await _service.GetMergedMapAsync(request)));
|
||
|
||
}
|
||
|