多条件关联查询
程序员文章站
2024-03-02 00:02:34
...
select
<include refid="Detail_Refund"></include>
from order_detail as a
left join mj_refund as b
on a.orderNo=b.orderNo
where 1=1 and b.refundStatus=#{refundStatus}
<if test="orderno!=null and orderno!=''">
and a.orderNo=#{orderno}
</if>
上一篇: for循环里面的判断条件