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:
@@ -190,6 +190,7 @@
|
||||
ro.`option_label_snapshot` AS `optionLabel`,
|
||||
COUNT(DISTINCT ro.`event_record_id`) AS `recordCount`
|
||||
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`
|
||||
WHERE
|
||||
<include refid="rangeWhere"/>
|
||||
|
||||
Reference in New Issue
Block a user