mirror of
https://gitee.com/best_handsome/mybatis-plus-join
synced 2025-07-11 00:02:22 +08:00
fix: selectSub配置无效
This commit is contained in:
parent
86888633f6
commit
266d71293f
@ -65,11 +65,12 @@ public class MybatisPlusJoinAutoConfiguration {
|
|||||||
ObjectProvider<MybatisPlusJoinIfExistsConsumer> IfExistsConsumers) {
|
ObjectProvider<MybatisPlusJoinIfExistsConsumer> IfExistsConsumers) {
|
||||||
this.properties = Optional.ofNullable(propertiesConsumers.getIfAvailable()).map(c -> c.config(properties)).orElse(properties);
|
this.properties = Optional.ofNullable(propertiesConsumers.getIfAvailable()).map(c -> c.config(properties)).orElse(properties);
|
||||||
ConfigProperties.banner = this.properties.getBanner();
|
ConfigProperties.banner = this.properties.getBanner();
|
||||||
ConfigProperties.subTableLogic = this.properties.getSubTableLogic();
|
|
||||||
ConfigProperties.msCache = this.properties.isMsCache();
|
ConfigProperties.msCache = this.properties.isMsCache();
|
||||||
ConfigProperties.tableAlias = this.properties.getTableAlias();
|
ConfigProperties.tableAlias = this.properties.getTableAlias();
|
||||||
ConfigProperties.joinPrefix = this.properties.getJoinPrefix();
|
ConfigProperties.joinPrefix = this.properties.getJoinPrefix();
|
||||||
ConfigProperties.logicDelType = this.properties.getLogicDelType();
|
ConfigProperties.logicDelType = this.properties.getLogicDelType();
|
||||||
|
ConfigProperties.subQueryAlias = this.properties.getSubQueryAlias();
|
||||||
|
ConfigProperties.subTableLogic = this.properties.getSubTableLogic();
|
||||||
ConfigProperties.mappingMaxCount = this.properties.getMappingMaxCount();
|
ConfigProperties.mappingMaxCount = this.properties.getMappingMaxCount();
|
||||||
ConfigProperties.ifExists = Optional.ofNullable(IfExistsConsumers.getIfAvailable())
|
ConfigProperties.ifExists = Optional.ofNullable(IfExistsConsumers.getIfAvailable())
|
||||||
.map(m -> (BiPredicate<Object, IfExistsSqlKeyWordEnum>) m)
|
.map(m -> (BiPredicate<Object, IfExistsSqlKeyWordEnum>) m)
|
||||||
|
@ -51,13 +51,14 @@ public class XPluginImpl implements Plugin {
|
|||||||
// 读取配置
|
// 读取配置
|
||||||
Prop prop = new Prop(context.cfg());
|
Prop prop = new Prop(context.cfg());
|
||||||
ConfigProperties.banner = prop.get("banner", Boolean::parseBoolean);
|
ConfigProperties.banner = prop.get("banner", Boolean::parseBoolean);
|
||||||
ConfigProperties.subTableLogic = prop.get("subTableLogic", Boolean::parseBoolean);
|
|
||||||
ConfigProperties.msCache = prop.get("msCache", Boolean::parseBoolean);
|
ConfigProperties.msCache = prop.get("msCache", Boolean::parseBoolean);
|
||||||
ConfigProperties.tableAlias = prop.get("tableAlias", Function.identity());
|
ConfigProperties.tableAlias = prop.get("tableAlias", Function.identity());
|
||||||
ConfigProperties.joinPrefix = prop.get("joinPrefix", Function.identity());
|
ConfigProperties.joinPrefix = prop.get("joinPrefix", Function.identity());
|
||||||
ConfigProperties.logicDelType = prop.get("logicDelType", val ->
|
ConfigProperties.logicDelType = prop.get("logicDelType", val ->
|
||||||
// fix on/off yes/no 会转为Boolean
|
// fix on/off yes/no 会转为Boolean
|
||||||
LogicDelTypeEnum.WHERE.name().equalsIgnoreCase(val) ? LogicDelTypeEnum.WHERE : LogicDelTypeEnum.ON);
|
LogicDelTypeEnum.WHERE.name().equalsIgnoreCase(val) ? LogicDelTypeEnum.WHERE : LogicDelTypeEnum.ON);
|
||||||
|
ConfigProperties.subTableLogic = prop.get("subTableLogic", Boolean::parseBoolean);
|
||||||
|
ConfigProperties.subQueryAlias = prop.get("subQueryAlias", Function.identity());
|
||||||
ConfigProperties.mappingMaxCount = prop.get("mappingMaxCount", Integer::parseInt);
|
ConfigProperties.mappingMaxCount = prop.get("mappingMaxCount", Integer::parseInt);
|
||||||
ConfigProperties.ifExists = prop.get("ifExists", val ->
|
ConfigProperties.ifExists = prop.get("ifExists", val ->
|
||||||
Arrays.stream(IfExistsEnum.values()).filter(e -> e.name().equalsIgnoreCase(val)).findFirst()
|
Arrays.stream(IfExistsEnum.values()).filter(e -> e.name().equalsIgnoreCase(val)).findFirst()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user