原文网址:MyBatis-Plus--在xml中使用wrapper的方法_IT利刃出鞘的博客-CSDN博客
简介
本文介绍MyBatis-Plus如何在xml中使用wrapper。
分享Java技术星球(自学精灵):https://learn.skyofit.com
Service
QueryWrapper<T> wrapper = new QueryWrapper<T>();
wrapper.eq("r.room_id", vo.getRoomId());
wrapper.in("r.meet_date", dates);
List<ReserveRoom> list = reserveRoomService.query(wrapper);
Mapper
IPage<ReserveRoom> query(Page page, @Param("ew) Wrapper<T> wrapper);
XML
<select id="query" resultType="com.abc.purchase.entity.ReserveRoom">
SELECT r.*
FROM reserve_room r
LEFT JOIN person_info p
ON r.person_id = p.id
<if test="ew != null">
${ew.customSqlSegment}
</if>
</select>
标签:xml,--,wrapper,Plus,MyBatis,id From: https://www.cnblogs.com/knifeblade/p/18016906