add data export

This commit is contained in:
Timi
2026-10-25 01:17:24 +08:00
parent c20f0b6f45
commit f3eddc69af
34 changed files with 1890 additions and 76 deletions
@@ -120,11 +120,14 @@
COALESCE(SUM(o.`sale_amount`), 0) AS `saleAmount`,
COALESCE(SUM(o.`paid_amount`), 0) AS `paidAmount`,
COALESCE(SUM(o.`pending_paid_amount`), 0) AS `pendingPaidAmount`,
COALESCE(SUM(o.`sale_amount` - o.`paid_amount`), 0) AS `unpaidAmount`,
COALESCE(SUM(GREATEST(o.`sale_amount` - o.`paid_amount`, 0)), 0) AS `unpaidAmount`,
COALESCE(SUM(o.`refunded_amount`), 0) AS `refundedAmount`,
COALESCE(SUM(o.`paid_amount` - o.`refunded_amount`), 0) AS `netPaidAmount`
FROM `gao_sales_order` o LEFT JOIN `gao_customer` c ON c.`id` = o.`customer_id`
WHERE <include refid="queryWhere"/>
<if test="(statusList == null or statusList.size() == 0) and status == null">
AND o.`status` &lt;&gt; 'CANCELLED'
</if>
</select>
<sql id="customerProductWhere">
i.`deleted_at` IS NULL