|
@@ -229,24 +229,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
<if test="goodsSearchKey != null and goodsSearchKey != ''" >
|
|
|
and ( SELECT
|
|
|
- count(og.*)
|
|
|
+ count(og.order_goods_id)
|
|
|
FROM
|
|
|
`order` o
|
|
|
LEFT JOIN order_goods og on o.order_sn = og.order_sn
|
|
|
- where 1=1
|
|
|
- and og.`status` = 1
|
|
|
- and og.refund_status in (0,1,3)
|
|
|
- and og.pay_status in (2,3,4))
|
|
|
- and (g.goods_name like concat('%', #{goodsSearchKey}, '%') or g.code like concat('%', #{goodsSearchKey}, '%'))
|
|
|
- and o.user_id = u.user_id)>0
|
|
|
- </if>
|
|
|
- <if test="goodsSearchKey != null and goodsSearchKey != ''" >
|
|
|
- and ( SELECT
|
|
|
- count(*)
|
|
|
- FROM
|
|
|
- `order` o
|
|
|
- LEFT JOIN order_goods og on o.order_sn = og.order_sn
|
|
|
- LEFT JOIN goods g on og.goods_id = g.goods_id
|
|
|
+ LEFT JOIN goods g ON og.goods_id = g.goods_id
|
|
|
where 1=1
|
|
|
and og.`status` = 1
|
|
|
and og.refund_status in (0,1,3)
|
|
@@ -388,24 +375,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
<if test="goodsSearchKey != null and goodsSearchKey != ''" >
|
|
|
and ( SELECT
|
|
|
- count(og.*)
|
|
|
+ count(og.order_goods_id)
|
|
|
FROM
|
|
|
`order` o
|
|
|
LEFT JOIN order_goods og on o.order_sn = og.order_sn
|
|
|
- where 1=1
|
|
|
- and og.`status` = 1
|
|
|
- and og.refund_status in (0,1,3)
|
|
|
- and og.pay_status in (2,3,4))
|
|
|
- and (g.goods_name like concat('%', #{goodsSearchKey}, '%') or g.code like concat('%', #{goodsSearchKey}, '%'))
|
|
|
- and o.user_id = u.user_id)>0
|
|
|
- </if>
|
|
|
- <if test="goodsSearchKey != null and goodsSearchKey != ''" >
|
|
|
- and ( SELECT
|
|
|
- count(*)
|
|
|
- FROM
|
|
|
- `order` o
|
|
|
- LEFT JOIN order_goods og on o.order_sn = og.order_sn
|
|
|
- LEFT JOIN goods g on og.goods_id = g.goods_id
|
|
|
+ LEFT JOIN goods g ON og.goods_id = g.goods_id
|
|
|
where 1=1
|
|
|
and og.`status` = 1
|
|
|
and og.refund_status in (0,1,3)
|