收口七月卡状态回调与系列授权兼容契约
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled

完成运营商实名回调、业务事件观测序列与受控配置装配,同时恢复 UR43 已交付的 packages[].remove 字段及旧响应兼容,统一更新 OpenSpec、OpenAPI 和交付文档。

Constraint: 七月测试环境里程碑不新增或运行自动化测试

Rejected: 以必填 operation_type 替换 packages[].remove | 会破坏已交付前端契约

Confidence: high

Scope-risk: broad

Directive: 后续修改系列套餐管理接口必须保持 packages[].remove 和 ShopSeriesGrantResponse 兼容

Tested: go run ./cmd/gendocs;go build -buildvcs=false ./...;openspec validate complete-july-iteration-test-release --strict;git diff --check

Not-tested: 按本 Change 约定未运行 go test,真实运营商与 Gateway 联调延期
This commit is contained in:
2026-07-24 19:59:24 +08:00
parent a18ed8bc8d
commit 5c4d17e9fc
79 changed files with 4341 additions and 478 deletions

View File

@@ -1,5 +1,7 @@
package constants
import "time"
const (
// IntegrationDirectionInbound 表示外部系统调用本系统。
IntegrationDirectionInbound = "inbound"
@@ -7,6 +9,25 @@ const (
IntegrationDirectionOutbound = "outbound"
)
const (
// IntegrationProviderCTCC 表示中国电信回调提供方。
IntegrationProviderCTCC = "ctcc"
// IntegrationOperationCTCCRealnameCallback 表示中国电信实名结果回调。
IntegrationOperationCTCCRealnameCallback = "realname_callback"
// IntegrationProviderCMCC 表示中国移动回调提供方。
IntegrationProviderCMCC = "cmcc"
// IntegrationOperationCMCCRealnameCallback 表示中国移动实名结果回调。
IntegrationOperationCMCCRealnameCallback = "realname_callback"
// IntegrationProviderCUCC 表示中国联通回调提供方。
IntegrationProviderCUCC = "cucc"
// IntegrationOperationCUCCRealnameRemovalCallback 表示中国联通解除实名回调。
IntegrationOperationCUCCRealnameRemovalCallback = "realname_removal_callback"
// IntegrationOperationCUCCRealnameCallback 表示中国联通实名成功回调。
IntegrationOperationCUCCRealnameCallback = "realname_callback"
// IntegrationInboundProcessingLease 表示入站回调 pending 记录允许恢复前的处理租约。
IntegrationInboundProcessingLease = time.Minute
)
const (
// IntegrationResultPending 表示外部尝试已建立但尚未终结。
IntegrationResultPending = "pending"
@@ -20,6 +41,8 @@ const (
IntegrationResultNotFound = "not_found"
// IntegrationResultInvalidPayload 表示入站载荷无效。
IntegrationResultInvalidPayload = "invalid_payload"
// IntegrationResultConflict 表示入站事实存在唯一性或幂等冲突。
IntegrationResultConflict = "conflict"
// IntegrationResultIgnored 表示外部尝试被安全忽略。
IntegrationResultIgnored = "ignored"
// IntegrationResultMerged 表示尝试被合并且未发送请求。
@@ -41,6 +64,7 @@ func IntegrationResultName(result string) string {
IntegrationResultUnknown: "结果未知",
IntegrationResultNotFound: "未找到",
IntegrationResultInvalidPayload: "无效载荷",
IntegrationResultConflict: "冲突",
IntegrationResultIgnored: "已忽略",
IntegrationResultMerged: "已合并",
IntegrationResultRateLimited: "已限频",