From 1885d2b8dcc857a58c89404278d9ad255d9df6c9 Mon Sep 17 00:00:00 2001 From: lzh <1625167628@qq.com> Date: Tue, 24 Jun 2025 17:08:36 +0800 Subject: [PATCH] =?UTF-8?q?"=E4=BC=98=E5=8C=96=E7=94=A8=E6=88=B7=E4=BD=99?= =?UTF-8?q?=E9=A2=9D=E6=9F=A5=E8=AF=A2=E7=9A=84JOIN=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E5=B9=B6=E6=B7=BB=E5=8A=A0=E5=88=86=E7=BB=84"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/dao/bundleExtend.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/dao/bundleExtend.go b/internal/dao/bundleExtend.go index e9cc192..4eca080 100644 --- a/internal/dao/bundleExtend.go +++ b/internal/dao/bundleExtend.go @@ -114,8 +114,8 @@ func GetBundleBalanceList(req *bundle.GetBundleBalanceListReq) (data []model.Bun Joins("LEFT JOIN fiee_bundle.bundle_balance AS bb on u.id = bb.user_id"). Joins("LEFT JOIN `micro-account`.`real_name` rn on u.real_name_id = rn.id"). Joins("LEFT JOIN bundle_order_records bor on bor.uuid = bb.order_uuid"). - Joins("INNER JOIN (?) AS t ON bor.customer_id = t.customer_id AND bor.created_at = t.max_created_time", subQuery). - Where("rn.name IS NOT NULL and u.deleted_at = 0") + Joins("LEFT JOIN (?) AS t ON bor.customer_id = t.customer_id AND bor.created_at = t.max_created_time", subQuery). + Where("rn.name IS NOT NULL and u.deleted_at = 0").Group("u.id") if req.UserName != "" { if utils.IsPhoneNumber(req.UserName) { session = session.Where("u.tel_num = ?", req.UserName)