LambdaQueryWrapper 查distinct数据

 

 

QueryWrapper<MessageWebPage> query = new QueryWrapper<>();
        query.select(" DISTINCT customer_id ").lambda()
        .eq(MessageWebPage::getShopId, shopId)
        .ge(MessageWebPage::getSendDate, beginTime)
        .le(MessageWebPage::getSendDate, endTime)
        .isNotNull(MessageWebPage::getCustomerId);
        List<MessageWebPage> idListLo = messageWebPageService.list(query);

 

posted @ 2021-12-31 18:52  君子笑而不语  阅读(18169)  评论(0编辑  收藏  举报