|
|
|
@@ -283,7 +283,7 @@ |
|
|
|
order by payAmount desc; |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="aliRefundList" parameterType="com.iformall.domain.po.AliBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> |
|
|
|
<select id="wxRefundList" parameterType="com.iformall.domain.po.AliBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> |
|
|
|
SELECT merchant_id as 'merchantId', |
|
|
|
IFNULL(SUM(`refund_amount`),0) as 'refundAmount', |
|
|
|
IFNULL(SUM(`increased_points`),0) as 'refundPoints' |
|
|
|
@@ -304,4 +304,44 @@ |
|
|
|
GROUP BY merchant_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="wxPayStatistics" parameterType="com.iformall.domain.po.AliBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> |
|
|
|
SELECT |
|
|
|
IFNULL(SUM(`pay_amount`),0) as 'payAmount', |
|
|
|
IFNULL(SUM(`increased_points`),0) as 'payPoints' |
|
|
|
FROM ali_business_circle_order |
|
|
|
where is_refund = 0 |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and `parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != merchantIds and merchantIds.size > 0 "> |
|
|
|
and merchant_id in |
|
|
|
<foreach collection="merchantIds" index="index" item="id" open="(" separator="," close=")"> |
|
|
|
#{id} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="wxRefundStatistics" parameterType="com.iformall.domain.po.AliBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> |
|
|
|
SELECT |
|
|
|
IFNULL(SUM(`refund_amount`),0) as 'refundAmount', |
|
|
|
IFNULL(SUM(`increased_points`),0) as 'refundPoints' |
|
|
|
FROM ali_business_circle_order |
|
|
|
where is_refund = 1 |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and `parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != merchantIds and merchantIds.size > 0 "> |
|
|
|
and merchant_id in |
|
|
|
<foreach collection="merchantIds" index="index" item="id" open="(" separator="," close=")"> |
|
|
|
#{id} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |