Files
junhong_cmp_fiber/.sisyphus/notepads/realname-trigger-priority-enhancement/issues.md
huang 7308afe801
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m18s
归档
2026-04-13 15:03:02 +08:00

1.2 KiB
Raw Blame History

已知问题和注意事项

assetService.ResolvedAsset 类型名已确认(重要修正)

  • 计划中写的 assetService.ResolvedAsset 是错误的
  • 实际类型:*dto.AssetResolveResponse(在 internal/model/dto/asset_dto.go 定义)
  • h.assetService.Resolve() 返回 (*dto.AssetResolveResponse, error)
  • 字段:.AssetType (string), .AssetID (uint), .VirtualNo (string)
  • resolveTargetCard 函数签名应为: func (h *ClientRealnameHandler) resolveTargetCard(c *fiber.Ctx, asset *dto.AssetResolveResponse, iccid string) (*model.IotCard, error)

import 别名冲突

  • client_realname.go 已导入 internal/middleware (for GetCustomerID)
  • 需要额外导入 pkg/middleware (for SetUserContext) 时需使用别名
  • 建议: pkgMiddleware "github.com/break/junhong_cmp_fiber/pkg/middleware"

processBatchTrigger 中也有 TTL Bug

  • 不仅 TriggerSingle (行72)processBatchTrigger (行192) 也有相同 Bug
  • 两处都需修复,不能漏

功能开关检查逻辑

  • config.Get().PollingAutoTrigger.EnableAutoTrigger 为 false 时跳过 goroutine 启动
  • 零值false/0是合法默认值不需要在 Validate() 中校验