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