Browse Source

generate-proxy multiple angular model fix

pull/4701/head
Erol Arkat 6 years ago
parent
commit
75aa35f959
  1. 13
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs

13
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)) if (firstType == "List" && !File.Exists(secondTypeModelPath))
{ {
secondType = "any"; secondType = "any";
} }
serviceFileText.AppendLine( serviceFileText.AppendLine(
firstType == "List" firstType == "List"
@ -322,13 +322,15 @@ namespace Volo.Abp.Cli.Commands
"String" => "string", "String" => "string",
"IActionResult" => "void", "IActionResult" => "void",
"ActionResult" => "void", "ActionResult" => "void",
"Int64" => "number",
"Int32" => "number",
_ => type _ => type
}; };
serviceFileText.AppendLine( serviceFileText.AppendLine(
$" {actionName}({parametersText}): Observable<{type}> {{"); $" {actionName}({parametersText}): Observable<{type}> {{");
if (type != "void" && type != "string") if (type != "void" && type != "string" && type != "number")
{ {
secondTypeList.Add(type); secondTypeList.Add(type);
} }
@ -503,6 +505,11 @@ namespace Volo.Abp.Cli.Commands
var path = output + $"{outputPrefix}/{rootPath}/{controllerPathName}/models/{typeModelName}"; var path = output + $"{outputPrefix}/{rootPath}/{controllerPathName}/models/{typeModelName}";
if (File.Exists(path))
{
return null;
}
var modelFileText = new StringBuilder(); var modelFileText = new StringBuilder();
var baseType = (string)type["baseType"]; var baseType = (string)type["baseType"];

Loading…
Cancel
Save