广丰卷烟厂数采质量分析系统
zhuguifei
2026-03-02 80ff784bf60637cd348ae665fc907f7b1e527dd8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#set($BaseEntity = ['createDept', 'createBy', 'createTime', 'updateBy', 'updateTime'])
#set($ModuleName = $moduleName.substring(0, 1).toUpperCase() + $moduleName.substring(1))
/**
 * Namespace Api
 *
 * All backend api type
 */
declare namespace Api {
    /**
     * 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} 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} 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}>;
    }
}