mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-14 11:05:06 +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'
|
||||
})
|
||||
}
|
||||
|
@ -1,43 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询db数据库列表
|
||||
export function listDbTable(query) {
|
||||
return request({
|
||||
url: '/tool/gen/db/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导入表
|
||||
export function importTable(data) {
|
||||
return request({
|
||||
url: '/tool/gen/importTable',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除表数据
|
||||
export function delTable(tableId) {
|
||||
return request({
|
||||
url: '/tool/gen/' + tableId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 生成代码(自定义路径)
|
||||
export function genCode(tableName) {
|
||||
return request({
|
||||
url: '/tool/gen/genCode/' + tableName,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 同步数据库
|
||||
export function synchDb(tableName) {
|
||||
return request({
|
||||
url: '/tool/gen/synchDb/' + tableName,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user