0
点赞
收藏
分享

微信扫一扫

简单使用mybatis-plus的${ew.sqlSegment},${ew.sqlSelect},${ew.customSqlSegment}

${ew.customSqlSegment} 会直接在前面添加 where

 @Select(select * from a ${ew.customSqlSegment}List<a> getA(@Param(Constants.WRAPPER)QueryWrapper queryWrapper)

${ew.sqlSegment} 就只有条件语句

 @Select(select * from a where ${ew.sqlSegment}List<a> getA(@Param(Constants.WRAPPER)QueryWrapper queryWrapper)

${ew.sqlSelect} 就是 queryWrapper.select(****) 你所定义需要查询的字段

 @Select(select ${ew.sqlSelect} from a )
 List<a> getA(@Param(Constants.WRAPPER)QueryWrapper queryWrapper)
举报

相关推荐

0 条评论