mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-17 12:35:07 +08:00
1. 同步数据表和字段定义
2. 删除数据库表
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获得表定义分页
|
||||
export function getCodeGenTablePage(query) {
|
||||
export function getCodegenTablePage(query) {
|
||||
return request({
|
||||
url: '/tool/codegen/table/page',
|
||||
method: 'get',
|
||||
@ -10,7 +10,7 @@ export function getCodeGenTablePage(query) {
|
||||
}
|
||||
|
||||
// 获得表和字段的明细
|
||||
export function getCodeGenDetail(tableId) {
|
||||
export function getCodegenDetail(tableId) {
|
||||
return request({
|
||||
url: '/tool/codegen/detail?tableId=' + tableId,
|
||||
method: 'get',
|
||||
@ -26,6 +26,14 @@ export function updateCodegen(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 基于数据库的表结构,同步数据库的表和字段定义
|
||||
export function syncCodegen(tableId) {
|
||||
return request({
|
||||
url: '/tool/codegen/sync?tableId=' + tableId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 预览生成代码
|
||||
export function previewCodegen(tableId) {
|
||||
return request({
|
||||
@ -42,3 +50,32 @@ export function downloadCodegen(tableId) {
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得表定义分页
|
||||
export function getSchemaTableList(query) {
|
||||
return request({
|
||||
url: '/tool/codegen/db/table/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 基于数据库的表结构,创建代码生成器的表定义
|
||||
export function createCodegenList(tableNames) {
|
||||
return request({
|
||||
url: '/tool/codegen/create-list',
|
||||
method: 'post',
|
||||
headers:{
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: 'tableNames=' + tableNames
|
||||
})
|
||||
}
|
||||
|
||||
// 删除数据库的表和字段定义
|
||||
export function deleteCodegen(tableId) {
|
||||
return request({
|
||||
url: '/tool/codegen/delete?tableId=' + tableId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user