chore: 修改代码生成模板

This commit is contained in:
xlsea 2024-09-07 19:07:00 +08:00
parent ad73adaa36
commit 2e0b16d0b3
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<script setup lang="tsx">
import { NButton, NPopconfirm } from 'naive-ui';
import { fetchGet${BusinessName}List, fetchDelete${BusinessName}, fetchBatchDelete${BusinessName} } from '@/service/api';
import { fetchGet${BusinessName}List, fetchDelete${BusinessName}, fetchBatchDelete${BusinessName} } from '@/service/api/${moduleName}/${businessName}';
import { $t } from '@/locales';
import { useAppStore } from '@/store/modules/app';
import { useTable, useTableOperate } from '@/hooks/common/table';

View File

@ -6,7 +6,7 @@
*/
namespace ${ModuleName} {
/** ${businessName} */
type ${BusinessName} = Common.CommonRecord<{
type ${BusinessName} = Api.Common.CommonRecord<{
#foreach($column in $columns)#if($column.insert || $column.edit)
/** $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
@ -14,7 +14,7 @@ namespace ${ModuleName} {
}>;
/** ${businessName} search params */
type ${BusinessName}SearchParams = CommonType.RecordNullable<
type ${BusinessName}SearchParams = Api.CommonType.RecordNullable<
Pick<
Api.${ModuleName}.${BusinessName},
#foreach($column in $columns)
@ -31,9 +31,9 @@ namespace ${ModuleName} {
#end
#end
> &
Common.CommonSearchParams
Api.Common.CommonSearchParams
>;
/** ${businessName} list */
type ${BusinessName}List = Common.PaginatingQueryRecord<${BusinessName}>;
type ${BusinessName}List = Api.Common.PaginatingQueryRecord<${BusinessName}>;
}