优化代码

This commit is contained in:
不做码农
2022-09-14 21:49:04 +08:00
parent c372c9a9e2
commit 875ebac95c
3 changed files with 7 additions and 6 deletions

View File

@@ -227,9 +227,11 @@ namespace ZR.Admin.WebApi.Controllers
[ActionPermissionFilter(Permission = "tool:gen:preview")]
public IActionResult Preview(long tableId = 0, int VueVersion = 0)
{
GenerateDto dto = new();
dto.TableId = tableId;
dto.VueVersion = VueVersion;
GenerateDto dto = new()
{
TableId = tableId,
VueVersion = VueVersion
};
if (dto == null || dto.TableId <= 0)
{
throw new CustomException(ResultCode.CUSTOM_ERROR, "请求参数为空");