## 会员订单只查询产品ID不为0的;
This commit is contained in:
parent
9fe54c65b5
commit
36968317b8
|
@ -683,26 +683,12 @@
|
|||
from sa_order_items soi
|
||||
where soi.pk_order = so.pk_id
|
||||
and soi.del_flag = 0
|
||||
and soi.pk_product != 0
|
||||
and soi.order_status in
|
||||
<foreach collection="statusList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue