代码生成工具支持MyBatisDynamicSql

This commit is contained in:
AlanScipio
2024-02-02 18:46:25 +08:00
parent 566227d699
commit 906a6d7467
32 changed files with 1678 additions and 790 deletions

View File

@@ -70,7 +70,7 @@ export function genCode(tableName) {
// 同步数据库
export function synchDb(tableName) {
return request({
url: '/code/gen/synchDb/' + tableName,
url: '/code/gen/syncDb/' + tableName,
method: 'get'
})
}

View File

@@ -1,3 +1,3 @@
<template>
<div> 表单构建 <svg-icon icon-class="build" /> </div>
<div> 表单构建 (此功能未开发) <svg-icon icon-class="build" /> </div>
</template>

View File

@@ -22,6 +22,16 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="tplWebType">
<template #label>后端类型</template>
<el-select v-model="info.tplBackendType">
<el-option label="常规模式" value="normal" />
<el-option label="MyBatis动态SQL支持" value="mybatis-dynamic" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="packageName">
<template #label>
@@ -293,5 +303,11 @@ watch(() => props.info.tplWebType, val => {
}
});
watch(() => props.info.tplBackendType, val => {
if (val === '') {
props.info.tplBackendType = "normal";
}
});
getMenuTreeselect();
</script>

View File

@@ -222,7 +222,7 @@ function handleGenTable(row) {
proxy.$modal.msgSuccess("成功生成到自定义路径:" + row.genPath);
});
} else {
proxy.$download.zip("/code/gen/batchGenCode?tables=" + tbNames, "ruoyi.zip");
proxy.$download.zip("/code/gen/batchGenCode?tables=" + tbNames, "generatedCodes.zip");
}
}
/** 同步数据库操作 */