From 7f187659118a877ebdf92753eadd0edd81cc7dfc Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 16 Mar 2026 16:48:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20IoT=20=E5=8D=A1=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=A1=A5=E5=85=85=20virtual=5Fno=20=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit standaloneListColumns 是为性能优化而手写的列选择列表, virtual_no 字段新增时只加了 model 和 DTO,遗漏了这里, 导致四条列表查询路径均未 SELECT virtual_no,字段始终为空。 Co-Authored-By: Claude Sonnet 4.6 --- internal/store/postgres/iot_card_store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/store/postgres/iot_card_store.go b/internal/store/postgres/iot_card_store.go index afe0965..4d034a1 100644 --- a/internal/store/postgres/iot_card_store.go +++ b/internal/store/postgres/iot_card_store.go @@ -210,7 +210,7 @@ func (s *IotCardStore) List(ctx context.Context, opts *store.QueryOptions, filte // standaloneListColumns 列表查询只选取响应需要的列,避免 SELECT * 的宽行 I/O var standaloneListColumns = []string{ - "id", "iccid", "card_category", "carrier_id", "carrier_type", "carrier_name", + "id", "iccid", "virtual_no", "card_category", "carrier_id", "carrier_type", "carrier_name", "imsi", "msisdn", "batch_no", "supplier", "status", "shop_id", "activated_at", "activation_status", "real_name_status", "network_status", "data_usage_mb", "current_month_usage_mb", "current_month_start_date", "last_month_total_mb",