mybatisPlus -> LambdaQueryWrapper ->update

创建实体 

TourAlbumDownload tourAlbumDownload = new TourAlbumDownload();
        String orderSn = OrderSn.getOrderSn();

更新其中的字段 

baseMapper.update(tourAlbumDownload, new LambdaQueryWrapper<TourAlbumDownload>()
                .eq(TourAlbumDownload::getDownloadOpenid, tourAlbumDownloadDTO.getDownloadOpenid())
                .eq(TourAlbumDownload::getTournamentId, tourAlbumDownloadDTO.getTournamentId())
                .in(TourAlbumDownload::getAlbumItemId, tourAlbumDownloadDTO.getIds())
            );
tourAlbumDownload实体中字段有值的更新 其他不更新
LambdaQueryWrapper是更新条件

  

posted @ 2020-05-12 15:23  ±小马哥  阅读(8520)  评论(0编辑  收藏  举报