|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using Entity.Dto.Req;
|
|
|
|
|
using Service.System.Dict;
|
|
|
|
|
using Entity.Base;
|
|
|
|
|
using Entity.DbModel.System;
|
|
|
|
|
using HybirdFrameworkCore.Entity;
|
|
|
|
|
|
|
|
|
|
namespace WebStarter.Controllers.System.Dict
|
|
|
|
|
{
|
|
|
|
|
[Produces("application/json")]
|
|
|
|
|
[ApiController]
|
|
|
|
|
public class SysDictDataController : ControllerBase
|
|
|
|
|
{
|
|
|
|
|
private readonly SysDictDataService _sysDictDataServices;
|
|
|
|
|
public SysDictDataController(SysDictDataService sysDictDataServices)
|
|
|
|
|
{
|
|
|
|
|
_sysDictDataServices = sysDictDataServices;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("/api/sysDictData/page")]
|
|
|
|
|
public async Task<PageResult<SysDictData>> DictDataPage([FromBody][Required] PageDictDataReq pageDictDataInput)
|
|
|
|
|
{
|
|
|
|
|
return await _sysDictDataServices.Page(pageDictDataInput);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("/api/sysDictData/list")]
|
|
|
|
|
public async Task<List<SysDictData>> DictDataGetList([FromBody] GetDataDictDataReq getDataDictDataInput)
|
|
|
|
|
{
|
|
|
|
|
return await _sysDictDataServices.GetList(getDataDictDataInput);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("/api/sysDictData/add")]
|
|
|
|
|
public async Task AddDictData([FromBody] AddDictDataReq addDictDataInput)
|
|
|
|
|
{
|
|
|
|
|
await _sysDictDataServices.AddDictData(addDictDataInput);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("/api/sysDictData/update")]
|
|
|
|
|
public async Task UpdateDictData([FromBody] UpdateDictDataReq input)
|
|
|
|
|
{
|
|
|
|
|
await _sysDictDataServices.UpdateDictData(input);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("/api/sysDictData/delete")]
|
|
|
|
|
public async Task DeleteDictData([FromBody] DeleteDictDataReq input)
|
|
|
|
|
{
|
|
|
|
|
await _sysDictDataServices.DeleteDictData(input);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("/api/sysDictData/setStatus")]
|
|
|
|
|
public async Task SetStatus([FromBody] DictDataReq input)
|
|
|
|
|
{
|
|
|
|
|
await _sysDictDataServices.SetStatus(input);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("/api/sysDictData/detail")]
|
|
|
|
|
public async Task<SysDictData> GetDetail([FromBody] DictDataReq input)
|
|
|
|
|
{
|
|
|
|
|
return await _sysDictDataServices.GetDetail(input);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("/api/sysDictData/dataList/{code}")]
|
|
|
|
|
public async Task<List<SysDictData>> GetDataListByStr(string code)
|
|
|
|
|
{
|
|
|
|
|
return await _sysDictDataServices.GetDataList(code);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("/api/sysDictData/dataList")]
|
|
|
|
|
public async Task<List<SysDictData>> GetDataListByObj([FromBody] QueryDictDataReq input)
|
|
|
|
|
{
|
|
|
|
|
return await _sysDictDataServices.GetDataList(input);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|