kae 4759295ce1 fix: wrap GROUP_CONCAT with COALESCE to prevent NULL scan on products with no pans
FindProductSummary and FindColorDetail aggregate pan.position via GROUP_CONCAT
with a LEFT JOIN. When a product has no pans the join produces all-NULL rows,
causing GROUP_CONCAT to return NULL, which cannot be scanned into a Go string —
making the entire summary query fail silently and the frontend show an empty table.

Fix: wrap both GROUP_CONCAT(pan.position) calls with COALESCE(..., '').

Also removes CostPrice from the generated InvProduct model (field dropped from schema).

Adds integration tests TestFindProductSummaryNoPans and TestFindColorDetailNoPans
to guard against this class of NULL-scan regression.
2026-06-23 00:05:42 +08:00
2026-06-14 15:24:02 +08:00
2026-06-14 15:24:02 +08:00
2026-06-14 15:24:02 +08:00
Description
No description provided
485 KiB
Languages
Go 99.8%
Shell 0.1%
JavaScript 0.1%