|
|
|
@ -466,13 +466,16 @@
|
|
|
|
|
</if>
|
|
|
|
|
FROM pmt_orders o
|
|
|
|
|
INNER JOIN sys_clients p ON p.client_id=o.client_id and p.is_valid=1
|
|
|
|
|
<if test="client_ids!=null">
|
|
|
|
|
<if test="!hide_sub_mch and client_ids!=null">
|
|
|
|
|
AND p.client_id IN
|
|
|
|
|
<foreach collection="client_ids" open="(" close=")" separator="," item="client_id">
|
|
|
|
|
#{client_id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="client_ids==null and client_id !=null">
|
|
|
|
|
<if test="!hide_sub_mch and client_ids==null and client_id !=null">
|
|
|
|
|
and p.client_id=#{client_id}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="hide_sub_mch">
|
|
|
|
|
and (p.client_id=#{client_id} or p.parent_client_id=#{client_id})
|
|
|
|
|
</if>
|
|
|
|
|
<if test="customer_id!=null">
|
|
|
|
@ -608,13 +611,16 @@
|
|
|
|
|
<include refid="tradelog_list_keys"/>
|
|
|
|
|
FROM pmt_orders o
|
|
|
|
|
INNER JOIN sys_clients p ON p.client_id=o.client_id AND p.is_valid=1
|
|
|
|
|
<if test="client_ids!=null">
|
|
|
|
|
<if test="!hide_sub_mch and client_ids!=null">
|
|
|
|
|
AND p.client_id IN
|
|
|
|
|
<foreach collection="client_ids" open="(" close=")" separator="," item="client_id">
|
|
|
|
|
#{client_id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="client_ids==null and client_id !=null">
|
|
|
|
|
<if test="!hide_sub_mch and client_ids==null and client_id !=null">
|
|
|
|
|
and p.client_id=#{client_id}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="hide_sub_mch">
|
|
|
|
|
and (p.client_id=#{client_id} or p.parent_client_id=#{client_id})
|
|
|
|
|
</if>
|
|
|
|
|
INNER JOIN pmt_transactions t on t.order_id=o.order_id and (t.transaction_type='Credit' or t.refund_id is not
|
|
|
|
|