mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-12 05:39:00 +08:00
⬆️ Upgrading dependencies. close #3547 up mybatis-plus 升级到3.5.1
⬆️ Upgrading dependencies. close #3547 up mybatis-plus 升级到3.5.1
This commit is contained in:
1 parent
847e739fc9
commit
57ec2a5e1e
5 files changed
+16
-3
No files matched your search
+6
@@ -18,6 +18,7 @@
|
||||
package com.pig4cloud.pigx.codegen.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.pig4cloud.pigx.codegen.entity.ColumnEntity;
|
||||
@@ -41,6 +42,7 @@ public interface GeneratorMapper extends PigxBaseMapper<ColumnEntity> {
|
||||
* @param tableName 表名称
|
||||
* @return
|
||||
*/
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
IPage<Map<String, Object>> queryTable(Page page, @Param("tableName") String tableName);
|
||||
|
||||
/**
|
||||
@@ -50,6 +52,7 @@ public interface GeneratorMapper extends PigxBaseMapper<ColumnEntity> {
|
||||
* @return
|
||||
*/
|
||||
@DS("#last")
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
Map<String, String> queryTable(@Param("tableName") String tableName, String dsName);
|
||||
|
||||
/**
|
||||
@@ -60,6 +63,7 @@ public interface GeneratorMapper extends PigxBaseMapper<ColumnEntity> {
|
||||
* @return
|
||||
*/
|
||||
@DS("#last")
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
IPage<ColumnEntity> selectTableColumn(Page page, @Param("tableName") String tableName,
|
||||
@Param("dsName") String dsName);
|
||||
|
||||
@@ -70,6 +74,7 @@ public interface GeneratorMapper extends PigxBaseMapper<ColumnEntity> {
|
||||
* @return
|
||||
*/
|
||||
@DS("#last")
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<ColumnEntity> selectTableColumn(@Param("tableName") String tableName, @Param("dsName") String dsName);
|
||||
|
||||
/**
|
||||
@@ -79,6 +84,7 @@ public interface GeneratorMapper extends PigxBaseMapper<ColumnEntity> {
|
||||
* @return
|
||||
*/
|
||||
@DS("#last")
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
List<Map<String, String>> selectMapTableColumn(@Param("tableName") String tableName, String dsName);
|
||||
|
||||
}
|
||||
+3
@@ -26,6 +26,9 @@ public class GenTableColumnServiceImpl implements GenTableColumnService {
|
||||
@Override
|
||||
public IPage<ColumnEntity> listTable(Page page, GenConfig genConfig) {
|
||||
GeneratorMapper mapper = GenUtils.getMapper(genConfig.getDsName());
|
||||
|
||||
// 关闭sql 优化
|
||||
page.setOptimizeCountSql(false);
|
||||
IPage<ColumnEntity> columnPage = mapper.selectTableColumn(page, genConfig.getTableName(),
|
||||
genConfig.getDsName());
|
||||
|
||||
|
||||
+3
@@ -62,6 +62,9 @@ public class GeneratorServiceImpl implements GeneratorService {
|
||||
GeneratorMapper mapper = GenUtils.getMapper(dsName);
|
||||
// 手动切换数据源
|
||||
DynamicDataSourceContextHolder.push(dsName);
|
||||
|
||||
// 关闭SQL 优化
|
||||
page.setOptimizeCountSql(false);
|
||||
return mapper.queryTable(page, tableName);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user