使用$
代码中如下
if (StrUtil.isEmpty(orderQueryReq.getSort()) || !"desc".equals(orderQueryReq.getSort())){ orderQueryReq.setSort("asc"); }
// xml里面写的如下:
SELECT a.*,c.product_name,c.product_id FROM work_order a LEFT JOIN product c ON a.product_code = c.product_code AND c.del_flag = 0 where a.del_flag = 0 ORDER BY a.start_time ${orderQueryReq.sort}
浙公网安备 33010602011771号