mybatis-puls 模糊查询 大于小于 查询
1、模糊查询
contains('%',#{参数},'%')
2、大于小于
<if test="queryVo.minRent != null and queryVo.maxRent"> and (ri.rent >= #{queryVo.minRent} and ri.rent <= #{queryVo.maxRent}) </if>
3、排序
@Schema(description = "价格排序方式", allowableValues = {"desc", "asc"})
private String orderType;
<if test="queryVo.orderType == 'desc' or queryVo.orderType == 'asc'"> order by ri.rent ${queryVo.orderType} </if>

浙公网安备 33010602011771号