docs(H5弹窗): AUG26-007 归档变更并同步 h5-popup-notification 主 Spec 与证据链
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 1m31s

This commit is contained in:
2026-09-15 16:29:56 +08:00
parent 333ba4b647
commit 41722760b1
8 changed files with 314 additions and 3 deletions

View File

@@ -4213,5 +4213,79 @@
"phone-asset-association::后台解除关联"
],
"classification": "behavior"
},
{
"entry_type": "http",
"entry": "GET /api/admin/h5-popup-configurations",
"capability": "h5-popup-notification",
"requirements": [
"h5-popup-notification::运营弹窗实时匹配"
],
"classification": "behavior"
},
{
"entry_type": "http",
"entry": "POST /api/admin/h5-popup-configurations",
"capability": "h5-popup-notification",
"requirements": [
"h5-popup-notification::运营弹窗实时匹配"
],
"classification": "behavior"
},
{
"entry_type": "http",
"entry": "GET /api/admin/h5-popup-configurations/{id}",
"capability": "h5-popup-notification",
"requirements": [
"h5-popup-notification::运营弹窗实时匹配"
],
"classification": "behavior"
},
{
"entry_type": "http",
"entry": "PUT /api/admin/h5-popup-configurations/{id}",
"capability": "h5-popup-notification",
"requirements": [
"h5-popup-notification::运营弹窗实时匹配"
],
"classification": "behavior"
},
{
"entry_type": "http",
"entry": "POST /api/admin/h5-popup-configurations/{id}/enable",
"capability": "h5-popup-notification",
"requirements": [
"h5-popup-notification::运营弹窗实时匹配"
],
"classification": "behavior"
},
{
"entry_type": "http",
"entry": "POST /api/admin/h5-popup-configurations/{id}/disable",
"capability": "h5-popup-notification",
"requirements": [
"h5-popup-notification::运营弹窗实时匹配"
],
"classification": "behavior"
},
{
"entry_type": "http",
"entry": "GET /api/c/v1/popup-candidates",
"capability": "h5-popup-notification",
"requirements": [
"h5-popup-notification::风险换卡候选与地址提交",
"h5-popup-notification::运营弹窗实时匹配",
"h5-popup-notification::通知留存与已读"
],
"classification": "behavior"
},
{
"entry_type": "http",
"entry": "POST /api/c/v1/risk-exchanges/{asset_id}/address",
"capability": "h5-popup-notification",
"requirements": [
"h5-popup-notification::风险换卡候选与地址提交"
],
"classification": "behavior"
}
]

View File

@@ -3838,5 +3838,122 @@
],
"exit_status": 0
}
},
{
"capability": "h5-popup-notification",
"requirement": "风险换卡候选与地址提交",
"spec": "openspec/specs/h5-popup-notification/spec.md",
"entries": [
"GET /api/c/v1/popup-candidates",
"POST /api/c/v1/risk-exchanges/{asset_id}/address"
],
"handler_consumer_job": [
"internal/handler/app/client_popup.go"
],
"application_service_query": [
"internal/application/h5popup/asset.go",
"internal/application/h5popup/candidate.go",
"internal/application/h5popup/risk_exchange.go"
],
"domain_state_amount": [
"pkg/constants/iot.go",
"pkg/constants/constants.go",
"pkg/constants/h5_popup.go"
],
"store_migration_config": [
"migrations/000225_add_h5_popup_configuration.up.sql",
"internal/store/postgres/iot_card_store.go"
],
"verification": {
"command": "代码中检索 GatewayCardExtendRiskStop、CarrierTypeCBN、activeShippingExchangeStatuses 与 flow_type 限定",
"literal_output": [
"internal/application/h5popup/asset.go:112:\tRiskStopped: card.CarrierType == constants.CarrierTypeCBN &&",
"internal/application/h5popup/asset.go:113:\tstrings.TrimSpace(card.GatewayExtend) == constants.GatewayCardExtendRiskStop,",
"internal/application/h5popup/candidate.go:25:\tvar activeShippingExchangeStatuses = []int{",
"internal/application/h5popup/candidate.go:26:\t\tconstants.ExchangeStatusPendingInfo,",
"internal/application/h5popup/candidate.go:27:\t\tconstants.ExchangeStatusPendingShip,",
"internal/application/h5popup/candidate.go:28:\t\tconstants.ExchangeStatusShipped,",
"internal/application/h5popup/candidate.go:29:\t\tconstants.ExchangeStatusCompleted,",
"internal/application/h5popup/candidate.go:219:\tWhere(\"old_asset_type = ? AND old_asset_id = ? AND flow_type = ?\", assetType, assetID, constants.ExchangeFlowTypeShipping).",
"internal/application/h5popup/candidate.go:220:\tWhere(\"status IN ?\", activeShippingExchangeStatuses).",
"internal/application/h5popup/risk_exchange.go:60:\t\tif err := tx.WithContext(ctx).Clauses(clause.Locking{Strength: \"UPDATE\"}).",
"internal/application/h5popup/risk_exchange.go:68:\t\tif card.CarrierType != constants.CarrierTypeCBN ||"
],
"exit_status": 0
}
},
{
"capability": "h5-popup-notification",
"requirement": "运营弹窗实时匹配",
"spec": "openspec/specs/h5-popup-notification/spec.md",
"entries": [
"GET /api/admin/h5-popup-configurations",
"POST /api/admin/h5-popup-configurations",
"GET /api/admin/h5-popup-configurations/{id}",
"PUT /api/admin/h5-popup-configurations/{id}",
"POST /api/admin/h5-popup-configurations/{id}/enable",
"POST /api/admin/h5-popup-configurations/{id}/disable"
],
"handler_consumer_job": [
"internal/handler/admin/h5_popup_configuration.go"
],
"application_service_query": [
"internal/application/h5popup/configuration.go",
"internal/application/h5popup/candidate.go",
"internal/query/h5popup/query.go"
],
"domain_state_amount": [
"pkg/constants/h5_popup.go"
],
"store_migration_config": [
"migrations/000225_add_h5_popup_configuration.up.sql",
"internal/model/h5_popup_configuration.go"
],
"verification": {
"command": "代码中检索 priority DESC 排序、配置版本递增与启停刷新最近更新时间",
"literal_output": [
"internal/application/h5popup/candidate.go:203:\tOrder(\"priority DESC, updated_at DESC, id DESC\").",
"internal/application/h5popup/configuration.go:197:\trecord.Version++",
"internal/application/h5popup/configuration.go:199:\trecord.UpdatedAt = now",
"internal/application/h5popup/configuration.go:244:\trecord.UpdatedAt = now"
],
"exit_status": 0
}
},
{
"capability": "h5-popup-notification",
"requirement": "通知留存与已读",
"spec": "openspec/specs/h5-popup-notification/spec.md",
"entries": [
"GET /api/c/v1/popup-candidates",
"PUT /api/c/v1/notifications/{id}/read"
],
"handler_consumer_job": [
"internal/handler/app/client_popup.go",
"internal/handler/app/client_notification.go"
],
"application_service_query": [
"internal/application/notification/direct.go",
"internal/application/notification/read.go",
"internal/query/notification/query.go"
],
"domain_state_amount": [
"pkg/constants/notification.go"
],
"store_migration_config": [
"migrations/000225_add_h5_popup_configuration.up.sql",
"internal/infrastructure/notification/repository.go"
],
"verification": {
"command": "代码中检索 CreateOrGetPersonal 与个人通知查询/已读两处弹窗类型白名单",
"literal_output": [
"internal/application/notification/direct.go:34:\tfunc (s *DeliveryService) CreateOrGetPersonal(ctx context.Context, eventID string, customerID uint, request PersonalDirectRequest) (*model.Notification, error) {",
"internal/query/notification/query.go:198:\t\tconstants.NotificationTypeH5PopupRiskExchange,",
"internal/query/notification/query.go:199:\t\tconstants.NotificationTypeH5PopupOperation,",
"internal/application/notification/read.go:220:\t\tconstants.NotificationTypeH5PopupRiskExchange,",
"internal/application/notification/read.go:221:\t\tconstants.NotificationTypeH5PopupOperation,"
],
"exit_status": 0
}
}
]