Mybatis-Plus查询时排除某列 - 示例
内容纲要

最近碰到的一个问题,方便直接使用entity实体返回,减少干扰字段返回到前端

主要方式为 .select 这个方法的入参就是通过遍历,判断布尔值来确定当前下标列是否继续使用

List<UcodePageLayoutEntity> layoutList = layoutService.list(new LambdaQueryWrapper<UcodePageLayoutEntity>()
                .eq(UcodePageLayoutEntity::getPageId, pageId)
                .orderByAsc(UcodePageLayoutEntity::getSortIndex)
                .select(UcodePageLayoutEntity.class, info ->
                        !"create_by".equals(info.getColumn()) &&
                                !"create_time".equals(info.getColumn()) &&
                                !"update_by".equals(info.getColumn()) &&
                                !"update_time".equals(info.getColumn())));
hi,我是秋田猫,很高兴认识你,或许我们可以相互分享各自领域的”宝藏“,祝你天天开心~
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇