From 883140d2cda402883bb40d9a9665222b1c8b9786 Mon Sep 17 00:00:00 2001 From: cjy Date: Wed, 7 Jan 2026 13:06:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=BF=87=E6=BB=A4user=E8=A1=A8=E5=92=8Crea?= =?UTF-8?q?l=5Fname=20=E8=A1=A8=E8=BD=AF=E5=88=A0=E9=99=A4=E7=9A=84?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/dao/taskDao.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/dao/taskDao.go b/internal/dao/taskDao.go index 1577c3c..2e5ff99 100644 --- a/internal/dao/taskDao.go +++ b/internal/dao/taskDao.go @@ -464,9 +464,9 @@ active_windows AS ( bb.manual_data_analysis_number, bb.manual_data_analysis_consumption_number, rn.name AS user_name FROM ` + "`micro-account`.`user`" + ` u - INNER JOIN ` + "`micro-account`.real_name" + ` rn ON rn.id = u.real_name_id AND rn.name IS NOT NULL + INNER JOIN ` + "`micro-account`.real_name" + ` rn ON rn.id = u.real_name_id AND rn.name IS NOT NULL AND rn.deleted_at = 0 INNER JOIN bundle_activate bc ON bc.user_id = u.id AND bc.activate = 2 - INNER JOIN latest_bor bor ON bor.customer_id = u.id + INNER JOIN latest_bor bor ON bor.customer_id = u.id AND u.deleted_at = 0 INNER JOIN newest_month nm ON nm.user_id = u.id INNER JOIN bundle_balance bb ON bb.user_id = u.id AND bb.order_uuid = bor.uuid AND bb.month = nm.month AND bb.deleted_at IS NULL WHERE u.deleted_at = 0 @@ -861,13 +861,13 @@ func GetPendingUploadBreakdownBySubNums(subNums []string, page int, pageSize int " (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) AS bor2\n" + " ON bor1.customer_id = bor2.customer_id AND bor1.created_at = bor2.max_created_time\n" + "JOIN `micro-account`.user u ON u.id = bor1.customer_id AND u.deleted_at = 0\n" + - "JOIN `micro-account`.real_name rn ON rn.id = u.real_name_id\n" + + "JOIN `micro-account`.real_name rn ON rn.id = u.real_name_id AND rn.deleted_at = 0\n" + "JOIN bundle_activate bc ON bc.user_id = u.id AND bc.activate = 2\n" + - "JOIN bundle_balance bb ON bb.order_uuid COLLATE utf8mb4_general_ci = bor1.uuid COLLATE utf8mb4_general_ci AND bb.user_id = u.id\n" + + "JOIN bundle_balance bb ON bb.order_uuid COLLATE utf8mb4_general_ci = bor1.uuid COLLATE utf8mb4_general_ci AND bb.user_id = u.id AND u.deleted_at = 0\n" + "JOIN\n" + " (SELECT user_id, MAX(month) AS month FROM bundle_balance WHERE deleted_at IS NULL GROUP BY user_id) AS newest_month\n" + " ON bb.user_id = newest_month.user_id AND CAST(bb.month AS CHAR) COLLATE utf8mb4_general_ci = CAST(newest_month.month AS CHAR) COLLATE utf8mb4_general_ci\n" + - "LEFT JOIN latest_bundle_balance lbb ON lbb.user_id = u.id\n" + + "LEFT JOIN latest_bundle_balance lbb ON lbb.user_id = u.id AND u.deleted_at = 0\n" + "LEFT JOIN cast_work cw ON cw.artist_phone COLLATE utf8mb4_general_ci = u.tel_num COLLATE utf8mb4_general_ci AND cw.deleted_at = 0 AND cw.submit_time BETWEEN bb.start_at AND bb.expired_at\n" + "LEFT JOIN cast_work_extra cwe ON cwe.work_uuid = cw.uuid AND cwe.deleted_at = 0\n" + "LEFT JOIN cast_work_analysis cwa ON cwa.artist_phone COLLATE utf8mb4_general_ci = u.tel_num COLLATE utf8mb4_general_ci AND cwa.deleted_at = 0 AND cwa.submit_time BETWEEN UNIX_TIMESTAMP(bb.start_at) AND UNIX_TIMESTAMP(bb.expired_at)\n" +