收口七月卡状态回调与系列授权兼容契约
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
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:
@@ -2,9 +2,9 @@ package dto
|
||||
|
||||
// GrantPackageItem 授权套餐操作项(用于创建/管理套餐列表)
|
||||
type GrantPackageItem struct {
|
||||
PackageID uint `json:"package_id" validate:"required" description:"套餐ID"`
|
||||
CostPrice int64 `json:"cost_price" validate:"required,min=0" description:"成本价(分)"`
|
||||
Remove *bool `json:"remove,omitempty" description:"是否删除该套餐授权(true=删除)"`
|
||||
PackageID uint `json:"package_id" validate:"required" required:"true" minimum:"1" description:"套餐ID"`
|
||||
CostPrice *int64 `json:"cost_price,omitempty" validate:"omitempty,min=0" minimum:"0" description:"成本价(分),新增或调价时必填"`
|
||||
Remove *bool `json:"remove,omitempty" description:"是否删除该套餐授权(true=删除)"`
|
||||
}
|
||||
|
||||
// ShopSeriesGrantPackageItem 授权套餐详情(响应中的套餐信息)
|
||||
@@ -56,13 +56,13 @@ type ShopSeriesGrantResponse struct {
|
||||
|
||||
// CreateShopSeriesGrantRequest 创建系列授权请求
|
||||
type CreateShopSeriesGrantRequest struct {
|
||||
ShopID uint `json:"shop_id" validate:"required" description:"被授权代理店铺ID"`
|
||||
SeriesID uint `json:"series_id" validate:"required" description:"套餐系列ID"`
|
||||
ShopID uint `json:"shop_id" validate:"required" required:"true" minimum:"1" description:"被授权代理店铺ID"`
|
||||
SeriesID uint `json:"series_id" validate:"required" required:"true" minimum:"1" description:"套餐系列ID"`
|
||||
OneTimeCommissionAmount *int64 `json:"one_time_commission_amount,omitempty" description:"固定模式佣金金额(分),固定模式必填"`
|
||||
CommissionTiers []GrantCommissionTierItem `json:"commission_tiers,omitempty" description:"梯度模式阶梯配置,梯度模式必填"`
|
||||
EnableForceRecharge *bool `json:"enable_force_recharge,omitempty" description:"是否启用代理强充"`
|
||||
ForceRechargeAmount *int64 `json:"force_recharge_amount,omitempty" description:"代理强充金额(分)"`
|
||||
Packages []GrantPackageItem `json:"packages,omitempty" description:"初始授权套餐列表"`
|
||||
Packages []GrantPackageItem `json:"packages" validate:"required,min=1,max=100,dive" required:"true" minItems:"1" maxItems:"100" description:"初始授权套餐列表(1~100项,套餐ID不可重复)"`
|
||||
ExpiryBaseOverride *string `json:"expiry_base_override" nullable:"true" description:"分配生效条件覆盖 (null:跟随套餐默认值, from_activation:实名激活时生效, from_purchase:购买即生效)"`
|
||||
ExpiryBaseOverrideSet bool `json:"-"`
|
||||
}
|
||||
@@ -77,7 +77,7 @@ type UpdateShopSeriesGrantRequest struct {
|
||||
|
||||
// ManageGrantPackagesRequest 管理授权套餐请求
|
||||
type ManageGrantPackagesRequest struct {
|
||||
Packages []GrantPackageItem `json:"packages" validate:"required,min=1" description:"套餐操作列表"`
|
||||
Packages []GrantPackageItem `json:"packages" validate:"required,min=1,max=100,dive" required:"true" minItems:"1" maxItems:"100" description:"套餐操作列表(1~100项,套餐ID不可重复)"`
|
||||
ExpiryBaseOverride *string `json:"expiry_base_override" nullable:"true" description:"新增分配的生效条件覆盖 (null:跟随套餐默认值, from_activation:实名激活时生效, from_purchase:购买即生效)"`
|
||||
ExpiryBaseOverrideSet bool `json:"-"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user