## 会员订单只查询产品ID不为0的;
This commit is contained in:
parent
841058b359
commit
863746a802
|
@ -683,26 +683,12 @@
|
||||||
from sa_order_items soi
|
from sa_order_items soi
|
||||||
where soi.pk_order = so.pk_id
|
where soi.pk_order = so.pk_id
|
||||||
and soi.del_flag = 0
|
and soi.del_flag = 0
|
||||||
|
and soi.pk_product != 0
|
||||||
and soi.order_status in
|
and soi.order_status in
|
||||||
<foreach collection="statusList" item="item" open="(" close=")" separator=",">
|
<foreach collection="statusList" item="item" open="(" close=")" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
union all
|
|
||||||
select count(sto.pk_id) pk_id
|
|
||||||
from sa_t_order sto
|
|
||||||
where sto.del_flag = 0
|
|
||||||
and sto.pk_country = #{pkCountry}
|
|
||||||
and (sto.pk_member = #{memberId} or sto.pk_creator = #{memberId})
|
|
||||||
and exists (select 1
|
|
||||||
from sa_t_order_items stoi
|
|
||||||
where stoi.pk_th_order = sto.pk_id
|
|
||||||
and stoi.del_flag = 0
|
|
||||||
and stoi.order_status in
|
|
||||||
<foreach collection="statusList" item="item" open="(" close=")" separator=",">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue