Skip to content

Commit

Permalink
fix(generate-code): action_method_void.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
iohao committed Dec 11, 2024
1 parent 3ef7eb3 commit 13cc3d7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
* const ${bizDataName}: ${bizDataType} = ...;
* ${actionSimpleName}.of${actionMethodName}(${bizDataName});
*/
static of${actionMethodName}(${bizDataName}: ${bizDataType}): RequestCommand {
static of${actionMethodName}(${bizDataName}: ${protoPrefix}${bizDataType}): RequestCommand {
<% if (internalBizDataType) { %>
return RequestCommand.of${sdkMethodName!}(this.${memberCmdName}, ${bizDataName}).execute();
<% } else if (bizDataTypeIsList) { %>
const dataList = ${bizDataName}.map(o => {
return toBinary(${actualTypeName}Schema, o);
return toBinary(${protoPrefix}${actualTypeName}Schema, o);
});

return RequestCommand.of${sdkMethodName}(this.${memberCmdName}, dataList).execute();
<% } else { %>
const data = toBinary(${bizDataType}Schema, ${bizDataName});
const data = toBinary(${protoPrefix}${bizDataType}Schema, ${bizDataName});
const requestCommand = RequestCommand.of(this.${memberCmdName}, data);
requestCommand.dataSource = ${bizDataName};
return requestCommand.execute();
Expand Down

0 comments on commit 13cc3d7

Please sign in to comment.