This commit is contained in:
mxd
2021-10-14 22:33:03 +08:00
parent aec4809452
commit 1d98835d24
3 changed files with 5 additions and 2 deletions

View File

@@ -389,6 +389,7 @@ public class MagicAPIAutoConfiguration implements WebMvcConfigurer, WebSocketCon
* 注入API调用Service
*/
@Bean
@ConditionalOnMissingBean
public MagicAPIService magicAPIService(MappingHandlerMapping mappingHandlerMapping,
ApiServiceProvider apiServiceProvider,
FunctionServiceProvider functionServiceProvider,

View File

@@ -523,7 +523,7 @@ public class SQLModule extends HashMap<String, SQLModule> implements MagicModule
@Comment("指定table进行单表操作")
public NamedTable table(String tableName) {
return new NamedTable(tableName, this, rowMapColumnMapper);
return new NamedTable(tableName, this, rowMapColumnMapper, namedTableInterceptors);
}
private BoundSql buildPageBoundSql(Dialect dialect, BoundSql boundSql, long offset, long limit) {

View File

@@ -58,10 +58,11 @@ public class NamedTable extends Attributes<Object> {
Where where = new Where(this);
public NamedTable(String tableName, SQLModule sqlModule, Function<String, String> rowMapColumnMapper) {
public NamedTable(String tableName, SQLModule sqlModule, Function<String, String> rowMapColumnMapper, List<NamedTableInterceptor> namedTableInterceptors) {
this.tableName = tableName;
this.sqlModule = sqlModule;
this.rowMapColumnMapper = rowMapColumnMapper;
this.namedTableInterceptors = namedTableInterceptors;
this.logicDeleteColumn = sqlModule.getLogicDeleteColumn();
String deleteValue = sqlModule.getLogicDeleteValue();
this.logicDeleteValue = deleteValue;
@@ -102,6 +103,7 @@ public class NamedTable extends Attributes<Object> {
namedTable.withBlank = this.withBlank;
namedTable.where = this.where == null ? null : this.where.clone();
namedTable.namedTableInterceptors = this.namedTableInterceptors;
namedTable.properties = this.properties;
return namedTable;
}