LambdaQueryWrapper 结合 QueryWrapper 实现 sum distinct
所属分类 mybatis
浏览量 77
LambdaQueryWrapper select 方法无法传入 字符串
QueryWrapper select 传入 字段列表 转成 LambdaQueryWrapper
new QueryWrapper< Detail >().select("DISTINCT `day`").lambda()
.eq(Detail::getUserId, userId).eq(Detail::getMonth, month)
SELECT DISTINCT `day` FROM detail WHERE user_id = ? AND month = ?
new QueryWrapper< Detail>().select("sum(skipping_duration) totalDuration", "count(1) totalTimes")
.lambda().eq(Detail::getUserId, userId)
SELECT sum(skipping_duration) totalDuration,count(1) totalTimes FROM detail WHERE user_id = ?
new QueryWrapper< OrderModel>()
.select(" SUM(fee_amt) AS fee_amt, SUM(arrival_amt) AS arrival_amt, mer_no ")
.lambda()
上一篇
下一篇
mybatis-plus LambdaQueryWrapper 使用limit
git 合并实例
西湖边的红色旅游景点
Mybatis-Plus update-strategy
雪花算法重复概率
雪花算法时钟回拨