订单查询 bug
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user