feat(收口): 补齐 8 月迭代缺口并同步 Spec 与证据链
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
- 新增六对成对迁移 000232–000237:H5 弹窗类型、退款结算标识与申请人备注、优先轮询事实字段与两个新终态、通道阈值命中留痕、手机号最近解绑人、提现资格校验留痕 - 退款:原因必填与申请人备注、来源支付与渠道流水冻结、线下处理流水号补录审计、按订单查询可选退款方式、企微审批材料补齐且新增字段缺失映射即明确失败 - 优先轮询:人工关闭、有效期到期独立周期任务、失败与过期人工重触发、事实字段与异常重试查询、资产解析端点只读投影 - 通道阈值:命中事实同事务留痕与命中记录查询;员工账单:列表筛选与详情投影;商户池:列表投影与统计周期语义;H5:弹窗类型与类别排序 - 手机号:有效关联数量与最近解绑人、短信验证码失败次数限制;导出:佣金明细十五列与报表序号列 - 时间筛选:三处新增筛选纳入统一严格解析契约,员工账单产生时间参数改名 - 同步 12 份主 Spec 需求、两端点与异步任务证据链,门禁 context-health 与 OpenSpec 校验通过
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package dto
|
||||
|
||||
import "time"
|
||||
|
||||
type CreateCarrierRequest struct {
|
||||
CarrierCode string `json:"carrier_code" validate:"required,min=1,max=50" required:"true" minLength:"1" maxLength:"50" description:"运营商编码"`
|
||||
CarrierName string `json:"carrier_name" validate:"required,min=1,max=100" required:"true" minLength:"1" maxLength:"100" description:"运营商名称"`
|
||||
@@ -88,3 +90,55 @@ type CarrierPageResult struct {
|
||||
Page int `json:"page" description:"当前页"`
|
||||
PageSize int `json:"size" description:"每页数量"`
|
||||
}
|
||||
|
||||
// CarrierThresholdHitListRequest 是通道阈值命中记录的查询参数。
|
||||
//
|
||||
// 判定时间使用统一时间筛选参数名 start_time/end_time(带显式时区的 RFC3339 秒级,闭区间含两端,
|
||||
// 开始晚于结束拒绝);计费周期起点用周期起点的瞬时精确匹配,与判定时间共用同一严格解析器。
|
||||
type CarrierThresholdHitListRequest struct {
|
||||
Page int `json:"page" query:"page" validate:"omitempty,min=1" minimum:"1" description:"页码,默认1"`
|
||||
PageSize int `json:"page_size" query:"page_size" validate:"omitempty,min=1,max=100" minimum:"1" maximum:"100" description:"每页数量,默认20,最大100"`
|
||||
CarrierID *uint `json:"carrier_id" query:"carrier_id" validate:"omitempty,min=1" minimum:"1" description:"运营商通道ID"`
|
||||
CardID *uint `json:"card_id" query:"card_id" validate:"omitempty,min=1" minimum:"1" description:"IoT卡ID"`
|
||||
// PeriodStart 为计费周期起点,取值必须与命中事实记录的周期起点时刻一致(如东八区 2026-09-01T00:00:00+08:00)。
|
||||
PeriodStart string `json:"period_start" query:"period_start" description:"计费周期起点,带时区的RFC3339秒级时间,精确匹配该计费周期"`
|
||||
StartTime string `json:"start_time" query:"start_time" description:"判定时间范围开始,带时区的RFC3339秒级时间,闭区间含该时刻"`
|
||||
EndTime string `json:"end_time" query:"end_time" description:"判定时间范围结束,带时区的RFC3339秒级时间,闭区间含该时刻"`
|
||||
}
|
||||
|
||||
// CarrierThresholdHitItem 是一条通道阈值命中事实。
|
||||
//
|
||||
// 累计流量与阈值为命中时冻结的证据:历史行(本次上线前)未记录读数与阈值,按「无」返回空值,
|
||||
// 不阻断查询;判定时间取既有创建时间。响应不包含任何凭证与上游响应原文。
|
||||
type CarrierThresholdHitItem struct {
|
||||
ID uint `json:"id" description:"命中记录ID"`
|
||||
CarrierID uint `json:"carrier_id" description:"运营商通道ID"`
|
||||
CardID uint `json:"card_id" description:"IoT卡ID"`
|
||||
// PeriodStart 是计费周期起点。
|
||||
PeriodStart time.Time `json:"period_start" description:"计费周期起点"`
|
||||
// HitTrafficMB 为空表示无(历史行读数不可重建)。
|
||||
HitTrafficMB *float64 `json:"hit_traffic_mb" description:"命中时该卡当前计费周期的累计流量读数(MB),取与停机判定同一来源的网关累计读数,不使用本地用量或套餐真流量;为空表示无"`
|
||||
// HitThresholdValue 为空表示无(历史行未记录)。
|
||||
HitThresholdValue *float64 `json:"hit_threshold_value" description:"本次判定实际生效的通道阈值数值,冻结命中时值,通道阈值变更不改写历史命中;为空表示无"`
|
||||
// HitThresholdUnit 为空字符串表示无(历史行未记录)。
|
||||
HitThresholdUnit string `json:"hit_threshold_unit" description:"本次判定阈值单位 MB-兆字节 GB-吉字节;空字符串表示无"`
|
||||
// TriggerSource 取值与 constants.CardObservationSource* 一致,空字符串表示无。
|
||||
TriggerSource string `json:"trigger_source" description:"触发本次判定的流量观测来源 polling-周期轮询 manual_sync-手动同步 manual_override-人工纠偏 carrier_callback-运营商回调 business_event-业务成功后的观测;空字符串表示无"`
|
||||
JudgedAt time.Time `json:"judged_at" description:"判定时间,既有锁行取创建时间"`
|
||||
Status string `json:"status" description:"锁状态 locked-持锁中 unlocked-已跨期解锁"`
|
||||
// UnlockedAt 为空表示尚未解锁。
|
||||
UnlockedAt *time.Time `json:"unlocked_at" description:"周期恢复的解锁时间,未解锁为空"`
|
||||
// ResumeResult 为空字符串表示未处理或历史行。
|
||||
ResumeResult string `json:"resume_result" description:"周期恢复的复机结果 resumed-已发起复机 skipped-仅解锁未复机 manual-周期归属不可判定转人工;空字符串表示未处理或历史行"`
|
||||
// FailureReason 只承载可安全展示的跳过原因或转人工原因,不含内部细节与渠道报文。
|
||||
FailureReason string `json:"failure_reason" description:"跳过复机或转人工核对的可安全原因,无则为空"`
|
||||
CreatedAt time.Time `json:"created_at" description:"记录创建时间"`
|
||||
}
|
||||
|
||||
// CarrierThresholdHitPageResult 是通道阈值命中记录的分页结果。
|
||||
type CarrierThresholdHitPageResult struct {
|
||||
List []*CarrierThresholdHitItem `json:"items" description:"通道阈值命中记录列表,按判定时间倒序"`
|
||||
Total int64 `json:"total" description:"总数"`
|
||||
Page int `json:"page" description:"当前页"`
|
||||
PageSize int `json:"size" description:"每页数量"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user