diff --git a/bd-business/bd-business-sale/src/main/resources/mapper/sale/order/SaOrderMapper.xml b/bd-business/bd-business-sale/src/main/resources/mapper/sale/order/SaOrderMapper.xml index 46b698b9..27397161 100644 --- a/bd-business/bd-business-sale/src/main/resources/mapper/sale/order/SaOrderMapper.xml +++ b/bd-business/bd-business-sale/src/main/resources/mapper/sale/order/SaOrderMapper.xml @@ -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 #{item} ) - 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 - - #{item} - - ) )