From 9912bb8a3d6eeb3242d254f0a71eeab8ee66d091 Mon Sep 17 00:00:00 2001 From: xiaocp2009 <39615122+xiaocp2009@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:02:00 +0800 Subject: [PATCH] =?UTF-8?q?TODO!!=20=E4=BF=AE=E5=A4=8Dbug=3F=3F=3F?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E6=B5=8B=E8=AF=95=E5=B9=B6=E6=B2=A1=E6=9C=89?= =?UTF-8?q?,=E5=85=88=E6=9B=B4=E6=96=B0=E8=AF=95=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/vm/soy/typings/api.d.ts.vm | 80 +++++++++++-------- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/cds-platform-2025.V1/ruoyi-modules/ruoyi-generator/src/main/resources/vm/soy/typings/api.d.ts.vm b/cds-platform-2025.V1/ruoyi-modules/ruoyi-generator/src/main/resources/vm/soy/typings/api.d.ts.vm index 5944542..eddab6d 100644 --- a/cds-platform-2025.V1/ruoyi-modules/ruoyi-generator/src/main/resources/vm/soy/typings/api.d.ts.vm +++ b/cds-platform-2025.V1/ruoyi-modules/ruoyi-generator/src/main/resources/vm/soy/typings/api.d.ts.vm @@ -1,44 +1,54 @@ #set($BaseEntity = ['createDept', 'createBy', 'createTime', 'updateBy', 'updateTime']) #set($ModuleName = $moduleName.substring(0, 1).toUpperCase() + $moduleName.substring(1)) + /** - * namespace ${ModuleName} + * Namespace Api * - * backend api module: "${ModuleName}" + * All backend api type */ -namespace ${ModuleName} { - /** ${businessname} */ - type ${BusinessName} = Common.CommonRecord<{ - #foreach($column in $columns)#if(!$BaseEntity.contains($column.javaField)) - /** $column.columnComment */ - $column.javaField:#if($column.javaField.indexOf("id") != -1 || $column.javaField.indexOf("Id") != -1) CommonType.IdType; #elseif($column.javaType == 'Long' || $column.javaType == 'Integer' || $column.javaType == 'Double' || $column.javaType == 'Float' || $column.javaType == 'BigDecimal') number; #elseif($column.javaType == 'Boolean') boolean; #else string; #end - #end#end - }>; +declare namespace Api { - /** ${businessname} search params */ - type ${BusinessName}SearchParams = CommonType.RecordNullable< - Pick< - Api.${ModuleName}.${BusinessName}, - #foreach($column in $columns) - #if($column.query && $column.queryType != 'BETWEEN') - | '${column.javaField}' - #end - #end - > & - Api.Common.CommonSearchParams - >; + /** + * namespace ${ModuleName} + * + * backend api module: "${ModuleName}" + */ + namespace ${ModuleName} { + /** ${businessname} */ + type ${BusinessName} = Common.CommonRecord<{ + #foreach($column in $columns)#if(!$BaseEntity.contains($column.javaField)) + /** $column.columnComment */ + $column.javaField:#if($column.javaField.indexOf("id") != -1 || $column.javaField.indexOf("Id") != -1) CommonType.IdType; #elseif($column.javaType == 'Long' || $column.javaType == 'Integer' || $column.javaType == + 'Double' || $column.javaType == 'Float' || $column.javaType == 'BigDecimal') number; #elseif($column.javaType == 'Boolean') boolean; #else string; #end + #end#end + }>; - /** ${businessname} operate params */ - type ${BusinessName}OperateParams = CommonType.RecordNullable< - Pick< - Api.${ModuleName}.${BusinessName}, - #foreach($column in $columns) - #if($column.insert || $column.edit) - | '${column.javaField}' - #end - #end - > - >; + /** ${businessname} search params */ + type ${BusinessName}SearchParams = CommonType.RecordNullable< + Pick< + Api.${ModuleName}.${BusinessName}, + #foreach($column in $columns) + #if($column.query && $column.queryType != 'BETWEEN') + | '${column.javaField}' + #end + #end + > & + Api.Common.CommonSearchParams + >; - /** ${businessname} list */ - type ${BusinessName}List = Api.Common.PaginatingQueryRecord<${BusinessName}>; + /** ${businessname} operate params */ + type ${BusinessName}OperateParams = CommonType.RecordNullable< + Pick< + Api.${ModuleName}.${BusinessName}, + #foreach($column in $columns) + #if($column.insert || $column.edit) + | '${column.javaField}' + #end + #end + > + >; + + /** ${businessname} list */ + type ${BusinessName}List = Api.Common.PaginatingQueryRecord<${BusinessName}>; + } }