mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 01:28:24 +08:00
feat: QueryWrapper.groupBy 支持 Lambda 表达式。
This commit is contained in:
parent
1b77bcc1f9
commit
25c2415cf5
@ -579,6 +579,18 @@ public class QueryWrapper extends BaseQueryWrapper<QueryWrapper> {
|
||||
return this;
|
||||
}
|
||||
|
||||
public <T> QueryWrapper groupBy(LambdaGetter<T> column) {
|
||||
addGroupByColumns(LambdaUtil.getQueryColumn(column));
|
||||
return this;
|
||||
}
|
||||
|
||||
public <T> QueryWrapper groupBy(LambdaGetter<T>... columns) {
|
||||
for (LambdaGetter<T> column : columns) {
|
||||
groupBy(LambdaUtil.getQueryColumn(column));
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public QueryWrapper having(QueryCondition queryCondition) {
|
||||
addHavingQueryCondition(queryCondition, SqlConnector.AND);
|
||||
return this;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user