yulichang / mybatis-plus-join

支持连表查询的mybatis-plus,mybatis-plus风格的连表操作提供wrapper.leftJoin(),wrapper.rightJoin()等操作
https://yulichang.github.io/mybatis-plus-join-doc/
Apache License 2.0
971 stars 113 forks source link

多个子查询报错 #96

Closed chrelyonly closed 5 months ago

chrelyonly commented 5 months ago

当前使用版本(必填,否则不予处理)

MP 3.5.3.1 MPJ 1.4.7.2

该问题是如何引起的?(确定最新版也有问题再提!!!)

image

想这样实现,统计子表的金额与数量 ec9fa7d321166931bcbabb936fa5fed 只写一组的话不报错sql且正常 596046f924c91bdceb8f82631c7e5f0

重现步骤(如果有就写完整)

主表查询多个子查询,通过主表id 查询子表的数量和费用

报错信息

com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Please do not call the method repeatedly! at com.baomidou.mybatisplus.core.toolkit.ExceptionUtils.mpe(ExceptionUtils.java:49) ~[mybatis-plus-core-3.5.3.1.jar:3.5.3.1] at com.baomidou.mybatisplus.core.toolkit.Assert.isTrue(Assert.java:38) ~[mybatis-plus-core-3.5.3.1.jar:3.5.3.1] at com.github.yulichang.wrapper.MPJAbstractWrapper.setParamAlias(MPJAbstractWrapper.java:704) ~[mybatis-plus-join-core-1.4.7.2.jar:na] at com.github.yulichang.wrapper.MPJLambdaWrapper.addCustomWrapper(MPJLambdaWrapper.java:275) ~[mybatis-plus-join-core-1.4.7.2.jar:na] at com.github.yulichang.wrapper.MPJLambdaWrapper.selectSub(MPJLambdaWrapper.java:220) ~[mybatis-plus-join-core-1.4.7.2.jar:na]

问题

测试发现判断重复用空判断,这个字段我看只用来空判断处理,,可以改进下? image

yulichang commented 5 months ago

1.4.8