108 lines
3.7 KiB
C#
108 lines
3.7 KiB
C#
|
|
using Microsoft.AspNetCore.Mvc;
|
|||
|
|
using DOAN.Model.Dto;
|
|||
|
|
using DOAN.Model.Business;
|
|||
|
|
using DOAN.Service.Business.IBusinessService;
|
|||
|
|
using DOAN.Admin.WebApi.Filters;
|
|||
|
|
|
|||
|
|
//创建时间:2025-03-21
|
|||
|
|
namespace DOAN.Admin.WebApi.Controllers
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// mm_line_transaction_log
|
|||
|
|
/// </summary>
|
|||
|
|
[Verify]
|
|||
|
|
[Route("business/MmLineTransactionLog")]
|
|||
|
|
public class MmLineTransactionLogController : BaseController
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// mm_line_transaction_log接口
|
|||
|
|
/// </summary>
|
|||
|
|
private readonly IMmLineTransactionLogService _MmLineTransactionLogService;
|
|||
|
|
|
|||
|
|
public MmLineTransactionLogController(IMmLineTransactionLogService MmLineTransactionLogService)
|
|||
|
|
{
|
|||
|
|
_MmLineTransactionLogService = MmLineTransactionLogService;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 查询mm_line_transaction_log列表
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="parm"></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
[HttpGet("list")]
|
|||
|
|
[ActionPermissionFilter(Permission = "business:mmlinetransactionlog:list")]
|
|||
|
|
public IActionResult QueryMmLineTransactionLog([FromQuery] MmLineTransactionLogQueryDto parm)
|
|||
|
|
{
|
|||
|
|
var response = _MmLineTransactionLogService.GetList(parm);
|
|||
|
|
return SUCCESS(response);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 查询mm_line_transaction_log详情
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="Id"></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
[HttpGet("{Id}")]
|
|||
|
|
[ActionPermissionFilter(Permission = "business:mmlinetransactionlog:query")]
|
|||
|
|
public IActionResult GetMmLineTransactionLog(string Id)
|
|||
|
|
{
|
|||
|
|
var response = _MmLineTransactionLogService.GetInfo(Id);
|
|||
|
|
|
|||
|
|
var info = response.Adapt<MmLineTransactionLog>();
|
|||
|
|
return SUCCESS(info);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 添加mm_line_transaction_log
|
|||
|
|
/// </summary>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
[HttpPost]
|
|||
|
|
[ActionPermissionFilter(Permission = "business:mmlinetransactionlog:add")]
|
|||
|
|
[Log(Title = "mm_line_transaction_log", BusinessType = BusinessType.INSERT)]
|
|||
|
|
public IActionResult AddMmLineTransactionLog([FromBody] MmLineTransactionLogDto parm)
|
|||
|
|
{
|
|||
|
|
var modal = parm.Adapt<MmLineTransactionLog>().ToCreate(HttpContext);
|
|||
|
|
|
|||
|
|
var response = _MmLineTransactionLogService.AddMmLineTransactionLog(modal);
|
|||
|
|
|
|||
|
|
return SUCCESS(response);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 更新mm_line_transaction_log
|
|||
|
|
/// </summary>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
[HttpPut]
|
|||
|
|
[ActionPermissionFilter(Permission = "business:mmlinetransactionlog:edit")]
|
|||
|
|
[Log(Title = "mm_line_transaction_log", BusinessType = BusinessType.UPDATE)]
|
|||
|
|
public IActionResult UpdateMmLineTransactionLog([FromBody] MmLineTransactionLogDto parm)
|
|||
|
|
{
|
|||
|
|
var modal = parm.Adapt<MmLineTransactionLog>().ToUpdate(HttpContext);
|
|||
|
|
var response = _MmLineTransactionLogService.UpdateMmLineTransactionLog(modal);
|
|||
|
|
|
|||
|
|
return ToResponse(response);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 删除mm_line_transaction_log
|
|||
|
|
/// </summary>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
[HttpDelete("{ids}")]
|
|||
|
|
[ActionPermissionFilter(Permission = "business:mmlinetransactionlog:delete")]
|
|||
|
|
[Log(Title = "mm_line_transaction_log", BusinessType = BusinessType.DELETE)]
|
|||
|
|
public IActionResult DeleteMmLineTransactionLog(string ids)
|
|||
|
|
{
|
|||
|
|
int[] idsArr = Tools.SpitIntArrary(ids);
|
|||
|
|
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
|||
|
|
|
|||
|
|
var response = _MmLineTransactionLogService.Delete(idsArr);
|
|||
|
|
|
|||
|
|
return ToResponse(response);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|