Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么不加个 同表两列判断的方法呢,感觉可以有 #6052

Open
awn-coder opened this issue Apr 11, 2024 · 1 comment
Open

Comments

@awn-coder
Copy link

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

3.5.6

例如:

public CustomQueryWrapper<T> eq(SFunction<T, ?> column1, SFunction<T, ?> column2) {
        return this.maybeDo(true, () -> {
            this.appendSqlSegments(this.columnToSqlSegment(column1), SqlKeyword.EQ, this.columnToSqlSegment(column2));
        });
    }
@liaozan
Copy link

liaozan commented May 14, 2024

其实针对这类的问题,我也尝试改成 CustomQueryWrapper 这种形式。

public class LambdaQueryChainWrapper<T> extends AbstractChainWrapper<T, SFunction<T, ?>, LambdaQueryChainWrapper<T>, LambdaQueryWrapper<T>>

但是由于这个继承的限制,导致LambdaQueryWrapper里所有链式方法的返回值都是typedThis

设想,如果这个 typedThis 可以更灵活一点,那么完全可以在

这里继承一下,返回自定义的CustomQueryWrapper,这样mp只需要提供常用的方法即可,剩下的部分可以自由扩展。
但是苦于技术太菜,所以一直没想到什么方式,不知道mp团队有没有这方面的想法?
@nieqiurong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants