提交 | 用户 | 时间
|
e7c126
|
1 |
import request from '@/config/axios' |
H |
2 |
#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}") |
|
3 |
|
|
4 |
export interface ${simpleClassName}VO { |
|
5 |
#foreach ($column in $columns) |
|
6 |
#if ($column.createOperation || $column.updateOperation) |
|
7 |
#if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer" || ${column.javaType.toLowerCase()} == "double" || ${column.javaType.toLowerCase()} == "bigdecimal") |
|
8 |
${column.javaField}: number |
|
9 |
#elseif(${column.javaType.toLowerCase()} == "date" || ${column.javaType.toLowerCase()} == "localdatetime") |
|
10 |
${column.javaField}: Date |
|
11 |
#else |
|
12 |
${column.javaField}: ${column.javaType.toLowerCase()} |
|
13 |
#end |
|
14 |
#end |
|
15 |
#end |
|
16 |
} |
|
17 |
|
|
18 |
// 查询${table.classComment}列表 |
|
19 |
export const get${simpleClassName}Page = async (params) => { |
|
20 |
return await request.get({ url: '${baseURL}/page', params }) |
|
21 |
} |
|
22 |
|
|
23 |
// 查询${table.classComment}详情 |
|
24 |
export const get${simpleClassName} = async (id: number) => { |
|
25 |
return await request.get({ url: '${baseURL}/get?id=' + id }) |
|
26 |
} |
|
27 |
|
|
28 |
// 新增${table.classComment} |
|
29 |
export const create${simpleClassName} = async (data: ${simpleClassName}VO) => { |
|
30 |
return await request.post({ url: '${baseURL}/create', data }) |
|
31 |
} |
|
32 |
|
|
33 |
// 修改${table.classComment} |
|
34 |
export const update${simpleClassName} = async (data: ${simpleClassName}VO) => { |
|
35 |
return await request.put({ url: '${baseURL}/update', data }) |
|
36 |
} |
|
37 |
|
|
38 |
// 删除${table.classComment} |
|
39 |
export const delete${simpleClassName} = async (id: number) => { |
|
40 |
return await request.delete({ url: '${baseURL}/delete?id=' + id }) |
|
41 |
} |
|
42 |
|
|
43 |
// 导出${table.classComment} Excel |
|
44 |
export const export${simpleClassName}Api = async (params) => { |
|
45 |
return await request.download({ url: '${baseURL}/export-excel', params }) |
|
46 |
} |