订单查询 bug
This commit is contained in:
@@ -19,9 +19,15 @@
|
||||
<if test="shopId != null">
|
||||
and o.shop_id = #{shopId}
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
and o.user_id = #{userId} and o.status != 'ing'
|
||||
</if>
|
||||
<choose>
|
||||
<!-- userId为空时:拼接 and o.status != 'ing' -->
|
||||
<when test="userId == null or userId == ''">
|
||||
and o.status != 'ing'
|
||||
</when>
|
||||
<otherwise>
|
||||
and o.user_id = #{userId}
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="param.orderNo != null">
|
||||
and o.order_no = #{param.orderNo}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user