fix(gao): join customer in event option statistics

selectOptionStatByRange reuses the keyword filter that references customer columns, but the query did not join gao_customer. Add the missing LEFT JOIN so event statistics no longer fail with Unknown column 'c.code'.
This commit is contained in:
Timi
2026-11-27 17:25:17 +08:00
parent 684d7e19dc
commit fe804efc1b
@@ -190,6 +190,7 @@
ro.`option_label_snapshot` AS `optionLabel`, ro.`option_label_snapshot` AS `optionLabel`,
COUNT(DISTINCT ro.`event_record_id`) AS `recordCount` COUNT(DISTINCT ro.`event_record_id`) AS `recordCount`
FROM `gao_event_record` r FROM `gao_event_record` r
LEFT JOIN `gao_customer` c ON r.`customer_id` = c.`id`
INNER JOIN `gao_event_record_option` ro ON ro.`event_record_id` = r.`id` INNER JOIN `gao_event_record_option` ro ON ro.`event_record_id` = r.`id`
WHERE WHERE
<include refid="rangeWhere"/> <include refid="rangeWhere"/>