logging
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using DOAN.Model.PBL.Dto;
|
||||
using DOAN.Model.PBL;
|
||||
using DOAN.Service.PBL.IPBLService;
|
||||
using DOAN.Admin.WebApi.Filters;
|
||||
|
||||
//创建时间:2024-11-01
|
||||
namespace DOAN.Admin.WebApi.Controllers.PBL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("PBL/MesInterationLog")]
|
||||
public class MesInterationLogController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 接口
|
||||
/// </summary>
|
||||
private readonly IMesInterationLogService _MesInterationLogService;
|
||||
|
||||
public MesInterationLogController(IMesInterationLogService MesInterationLogService)
|
||||
{
|
||||
_MesInterationLogService = MesInterationLogService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "mesinterationlog:list")]
|
||||
public IActionResult QueryMesInterationLog([FromQuery] MesInterationLogQueryDto parm)
|
||||
{
|
||||
var response = _MesInterationLogService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "mesinterationlog:query")]
|
||||
public IActionResult GetMesInterationLog(string Id)
|
||||
{
|
||||
var response = _MesInterationLogService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<MesInterationLogDto>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "mesinterationlog:add")]
|
||||
[Log(Title = "", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddMesInterationLog([FromBody] MesInterationLogDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<MesInterationLog>().ToCreate(HttpContext);
|
||||
|
||||
var response = _MesInterationLogService.AddMesInterationLog(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "mesinterationlog:edit")]
|
||||
[Log(Title = "", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateMesInterationLog([FromBody] MesInterationLogDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<MesInterationLog>().ToUpdate(HttpContext);
|
||||
var response = _MesInterationLogService.UpdateMesInterationLog(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("delete/{ids}")]
|
||||
[ActionPermissionFilter(Permission = "mesinterationlog:delete")]
|
||||
[Log(Title = "", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteMesInterationLog([FromRoute]string ids)
|
||||
{
|
||||
var idArr = Tools.SplitAndConvert<string>(ids);
|
||||
|
||||
return ToResponse(_MesInterationLogService.Delete(idArr));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user