|
|
@@ -0,0 +1,124 @@
|
|
|
+using Vo;
|
|
|
+using Microsoft.AspNetCore.Mvc;
|
|
|
+using Model;
|
|
|
+using Services;
|
|
|
+using Model.Base;
|
|
|
+using Vo.Admin;
|
|
|
+using Mapster;
|
|
|
+using Infrastructure;
|
|
|
+
|
|
|
+
|
|
|
+namespace Controllers.Admin
|
|
|
+{
|
|
|
+ /// <summary>
|
|
|
+ /// LogicNodeKind)Controller
|
|
|
+ /// </summary>
|
|
|
+ // [Route("${Router}$")]
|
|
|
+ // [ApiExplorerSettings(GroupName = "LogicNodeKind")]
|
|
|
+ public class LogicNodeKindController : BaseController
|
|
|
+ {
|
|
|
+ /// <summary>
|
|
|
+ /// api分组接口
|
|
|
+ /// </summary>
|
|
|
+ private readonly ILogicNodeKindService _LogicNodeKindService;
|
|
|
+ private readonly ILogicNodeService _LogicNodeService;
|
|
|
+
|
|
|
+ public LogicNodeKindController(ILogicNodeKindService LogicNodeKindService, ILogicNodeService LogicNodeService)
|
|
|
+ {
|
|
|
+ _LogicNodeKindService = LogicNodeKindService;
|
|
|
+ _LogicNodeService = LogicNodeService;
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <param name="page">分页参数</param>
|
|
|
+ /// <summary>
|
|
|
+ /// 列表
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="page">分页对象</param>
|
|
|
+ /// <returns>列表</returns>
|
|
|
+ [HttpGet]
|
|
|
+ [Route("/v1/omega_logic/LogicNodeKind/getLogicNodeKindList")]
|
|
|
+ public IActionResult getLogicNodeKindList([FromQuery] PagerInfo page)
|
|
|
+ {
|
|
|
+ var response = _LogicNodeKindService.getLogicNodeKindList(page);
|
|
|
+ return SUCCESS(response);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 详情
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="param">参数请求体</param>
|
|
|
+ /// <returns>详情</returns>
|
|
|
+ [HttpGet]
|
|
|
+ [Route("/v1/omega_logic/LogicNodeKind/getLogicNodeKindQuery")]
|
|
|
+ public IActionResult getLogicNodeKindQuery([FromQuery] LogicNodeKind param)
|
|
|
+ {
|
|
|
+ var response = _LogicNodeKindService.GetFirst(m => m.id == param.id).Adapt<GetLogicNodeKindQueryVo>();
|
|
|
+ return SUCCESS(response);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 添加
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="param">参数请求体</param>
|
|
|
+ /// <returns>添加</returns>
|
|
|
+ [HttpPost]
|
|
|
+ [Route("/v1/omega_logic/LogicNodeKind/addLogicNodeKind")]
|
|
|
+ public IActionResult addLogicNodeKind([FromBody] LogicNodeKind param)
|
|
|
+ {
|
|
|
+ var modal = param.Adapt<LogicNodeKind>().ToCreate(HttpContext);
|
|
|
+ var response = _LogicNodeKindService.InsertReturnIdentity(modal);
|
|
|
+ return SUCCESS(response);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 修改
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="param">参数请求体</param>
|
|
|
+ /// <returns>修改</returns>
|
|
|
+ [HttpPut]
|
|
|
+ [Route("/v1/omega_logic/LogicNodeKind/updateLogicNodeKind")]
|
|
|
+ public IActionResult updateLogicNodeKind([FromBody] LogicNodeKind param)
|
|
|
+ {
|
|
|
+ var modal = param.Adapt<LogicNodeKind>().ToCreate(HttpContext);
|
|
|
+ var response = _LogicNodeKindService.Update(modal, true);
|
|
|
+ return SUCCESS(response);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 删除
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="id">ID</param>
|
|
|
+ /// <returns>删除</returns>
|
|
|
+ [HttpDelete]
|
|
|
+ [Route("/v1/omega_logic/LogicNodeKind/deleteLogicNodeKind/{id}")]
|
|
|
+ public IActionResult deleteLogicNodeKind(int id)
|
|
|
+ {
|
|
|
+ var response = _LogicNodeKindService.Delete(id);
|
|
|
+ return SUCCESS(response);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /// <param name="page">分页参数</param>
|
|
|
+ /// <summary>
|
|
|
+ /// 节点分类数据
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="page">分页对象</param>
|
|
|
+ /// <returns>节点分类数据</returns>
|
|
|
+ [HttpGet]
|
|
|
+ [Route("/v1/omega_logic/LogicNodeKind/getLogicNodeTree")]
|
|
|
+ public IActionResult getLogicNodeTree()
|
|
|
+ {
|
|
|
+ var nodes = _LogicNodeService.GetList();
|
|
|
+ var response = _LogicNodeKindService.getLogicNodeTree(nodes);
|
|
|
+ return SUCCESS(response);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+}
|