From 75aa35f9590094f4534aad3d0aee41d285213b26 Mon Sep 17 00:00:00 2001 From: Erol Arkat Date: Tue, 7 Jul 2020 16:09:22 +0300 Subject: [PATCH] generate-proxy multiple angular model fix --- .../Volo/Abp/Cli/Commands/GenerateProxyCommand.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs index 788ffb4436..f2941c9ce8 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs @@ -294,7 +294,7 @@ namespace Volo.Abp.Cli.Commands if (firstType == "List" && !File.Exists(secondTypeModelPath)) { secondType = "any"; - } + } serviceFileText.AppendLine( firstType == "List" @@ -322,13 +322,15 @@ namespace Volo.Abp.Cli.Commands "String" => "string", "IActionResult" => "void", "ActionResult" => "void", + "Int64" => "number", + "Int32" => "number", _ => type - }; + }; serviceFileText.AppendLine( $" {actionName}({parametersText}): Observable<{type}> {{"); - if (type != "void" && type != "string") + if (type != "void" && type != "string" && type != "number") { secondTypeList.Add(type); } @@ -503,6 +505,11 @@ namespace Volo.Abp.Cli.Commands var path = output + $"{outputPrefix}/{rootPath}/{controllerPathName}/models/{typeModelName}"; + if (File.Exists(path)) + { + return null; + } + var modelFileText = new StringBuilder(); var baseType = (string)type["baseType"];