订单查询 bug

This commit is contained in:
gong
2025-12-23 13:35:42 +08:00
parent 56ab4d0403
commit 81e102ff41

View File

@@ -19,9 +19,15 @@
<if test="shopId != null"> <if test="shopId != null">
and o.shop_id = #{shopId} and o.shop_id = #{shopId}
</if> </if>
<if test="userId != null"> <choose>
and o.user_id = #{userId} and o.status != 'ing' <!-- userId为空时拼接 and o.status != 'ing' -->
</if> <when test="userId == null or userId == ''">
and o.status != 'ing'
</when>
<otherwise>
and o.user_id = #{userId}
</otherwise>
</choose>
<if test="param.orderNo != null"> <if test="param.orderNo != null">
and o.order_no = #{param.orderNo} and o.order_no = #{param.orderNo}
</if> </if>