From 48e5d51373c3c44b0ae2ae0ffc87d8c847ca7464 Mon Sep 17 00:00:00 2001 From: JNG <365252428@qq.com> Date: Mon, 2 Feb 2026 17:54:24 +0800 Subject: [PATCH] Update bundleExtend.go --- internal/dao/bundleExtend.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/dao/bundleExtend.go b/internal/dao/bundleExtend.go index d21f15e..313d8d3 100644 --- a/internal/dao/bundleExtend.go +++ b/internal/dao/bundleExtend.go @@ -158,8 +158,9 @@ func GetBundleBalanceByUserId(req *bundle.GetBundleBalanceByUserIdReq) (data mod Joins(`INNER JOIN ( SELECT customer_id, MAX(created_at) AS max_created_time FROM bundle_order_records + WHERE status = 2 AND deleted_at is NULL GROUP BY customer_id - ) bor2 ON bor1.customer_id = bor2.customer_id AND bor1.created_at = bor2.max_created_time`).Where("bor1.status = 2") + ) bor2 ON bor1.customer_id = bor2.customer_id AND bor1.created_at = bor2.max_created_time`) session := app.ModuleClients.BundleDB.Table("`micro-account`.`user` AS u").Unscoped(). Select(`bb.*, bor.bundle_name, bor.status,bor.amount AS payment_amount,bor.amount_type AS payment_type,bor.customer_num, bor.uuid as order_uuid, rn.name as user_name,bc.activate,bor.created_at as pay_time,