|
@@ -111,10 +111,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="userId != null and userId != ''">
|
|
|
AND oi.user_id = #{userId}
|
|
|
</if>
|
|
|
- <if test="orderSn != null and orderSn != ''">
|
|
|
- AND (SELECT COUNT(oio.id) FROM order_invoice_order oio
|
|
|
- LEFT JOIN order_goods og ON oio.order_goods_id = og.order_goods_id WHERE oio.invoice_id = oi.invoice_id AND og.order_sn = #{orderSn}) > 0
|
|
|
- </if>
|
|
|
<if test="applyStartTime != null and applyStartTime != ''">
|
|
|
AND oi.apply_time >= #{applyStartTime}
|
|
|
</if>
|
|
@@ -126,7 +122,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
u.realname like concat('%', #{searchKey}, '%')
|
|
|
or u.id_card like concat('%', #{searchKey}, '%')
|
|
|
or oi.invoice_code like concat('%', #{searchKey}, '%')
|
|
|
- or u.invoice_num like concat('%', #{searchKey}, '%'))
|
|
|
+ or (SELECT COUNT(oio.id) FROM order_invoice_order oio
|
|
|
+ LEFT JOIN order_goods og ON oio.order_goods_id = og.order_goods_id WHERE oio.invoice_id = oi.invoice_id AND og.order_sn = #{searchKey}) > 0
|
|
|
+ )
|
|
|
</if>
|
|
|
ORDER BY oi.invoice_id DESC
|
|
|
</select>
|