2022-09-06 19:32:32 +08:00
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Threading.Tasks;
|
2022-09-10 20:25:39 +08:00
|
|
|
|
using Yi.Framework.Common.Helper;
|
2022-09-06 19:32:32 +08:00
|
|
|
|
using Yi.Framework.Common.Models;
|
|
|
|
|
|
using Yi.Framework.Interface;
|
|
|
|
|
|
using Yi.Framework.Model.Models;
|
|
|
|
|
|
using Yi.Framework.Repository;
|
2022-09-10 14:02:41 +08:00
|
|
|
|
using Yi.Framework.Service;
|
2022-09-06 19:32:32 +08:00
|
|
|
|
using Yi.Framework.WebCore;
|
|
|
|
|
|
using Yi.Framework.WebCore.AttributeExtend;
|
|
|
|
|
|
using Yi.Framework.WebCore.AuthorizationPolicy;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Yi.Framework.ApiMicroservice.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
[ApiController]
|
|
|
|
|
|
[Route("api/[controller]/[action]")]
|
2022-09-10 20:49:46 +08:00
|
|
|
|
public class DictionaryController :BaseSimpleCrudController<DictionaryEntity>
|
2022-09-06 19:32:32 +08:00
|
|
|
|
{
|
|
|
|
|
|
private IDictionaryService _iDictionaryService;
|
2022-09-10 20:49:46 +08:00
|
|
|
|
public DictionaryController(ILogger<DictionaryEntity> logger, IDictionaryService iDictionaryService):base(logger, iDictionaryService)
|
2022-09-06 19:32:32 +08:00
|
|
|
|
{
|
|
|
|
|
|
_iDictionaryService = iDictionaryService;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-09-10 20:05:45 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 动态条件分页查询
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="dic"></param>
|
|
|
|
|
|
/// <param name="page"></param>
|
|
|
|
|
|
/// <returns></returns>
|
2022-09-09 19:34:20 +08:00
|
|
|
|
[HttpGet]
|
|
|
|
|
|
public async Task<Result> PageList([FromQuery] DictionaryEntity dic, [FromQuery] PageParModel page)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Result.Success().SetData(await _iDictionaryService.SelctPageList(dic, page));
|
|
|
|
|
|
}
|
2022-09-06 19:32:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|