优化代码生成
This commit is contained in:
@@ -221,13 +221,15 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
/// 预览代码
|
||||
/// </summary>
|
||||
/// <param name="tableId"></param>
|
||||
/// <param name="VueVersion"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("preview/{tableId}")]
|
||||
[ActionPermissionFilter(Permission = "tool:gen:preview")]
|
||||
public IActionResult Preview(long tableId = 0)
|
||||
public IActionResult Preview(long tableId = 0, int VueVersion = 0)
|
||||
{
|
||||
GenerateDto dto = new();
|
||||
dto.TableId = tableId;
|
||||
dto.VueVersion = VueVersion;
|
||||
if (dto == null || dto.TableId <= 0)
|
||||
{
|
||||
throw new CustomException(ResultCode.CUSTOM_ERROR, "请求参数为空");
|
||||
|
||||
@@ -172,13 +172,19 @@ namespace ZR.Admin.WebApi.Controllers.System
|
||||
/// <summary>
|
||||
/// 保存排序
|
||||
/// </summary>
|
||||
/// <param name="MenuDto"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[ActionPermissionFilter(Permission = "system:menu:update")]
|
||||
[HttpPost("ChangeSort")]
|
||||
[HttpGet("ChangeSort")]
|
||||
[Log(Title = "保存排序", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult ChangeSort([FromBody] MenuDto MenuDto)
|
||||
public IActionResult ChangeSort(int id = 0, int value = 0)
|
||||
{
|
||||
MenuDto MenuDto = new()
|
||||
{
|
||||
MenuId = id,
|
||||
orderNum = value
|
||||
};
|
||||
if (MenuDto == null) { return ToResponse(ApiResult.Error(101, "请求参数错误")); }
|
||||
|
||||
int result = sysMenuService.ChangeSortMenu(MenuDto);
|
||||
|
||||
Reference in New Issue
Block a user