- xml使用querywapper 自动拼装查询条件sql,(${queryWrapper.customSqlSegment})
mapper:传入querywapper
/**
* 导出数据
*
* @param queryWrapper
* @return
*/
List<StudentExcel> exportStudentList(@Param("ew") Wrapper<Student> queryWrapper);
xml:使用 ${ew.customSqlSegment}
<select id="exportStudentList" resultType="com.xxxxx.StudentExcel">
SELECT * FROM student ${ew.customSqlSegment}
</select>