feat: 卡实名时间以上游 archiveTime 为准并记录实名时间历史,新增二次实名批次
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// FlexBool 灵活布尔类型
|
||||
@@ -206,8 +207,17 @@ type CardOperationReq struct {
|
||||
|
||||
// RealnameStatusResp 是实名认证状态的响应
|
||||
type RealnameStatusResp struct {
|
||||
ICCID string `json:"iccid" description:"ICCID"`
|
||||
RealStatus bool `json:"realStatus" description:"实名状态(true=已实名, false=未实名)"`
|
||||
ICCID string `json:"iccid" description:"ICCID"`
|
||||
RealStatus bool `json:"realStatus" description:"实名状态(true=已实名, false=未实名)"`
|
||||
ArchiveTime *string `json:"archiveTime,omitempty" description:"上游实名时间(YYYY-MM-DD HH:mm:ss,北京时间;部分运营商不返回)"`
|
||||
}
|
||||
|
||||
// UpstreamRealnameAt 返回上游实名时间:仅已实名且 archiveTime 可解析时有值;缺失、空、格式错误或未实名时返回 nil。
|
||||
func (r *RealnameStatusResp) UpstreamRealnameAt() *time.Time {
|
||||
if r == nil || !r.RealStatus || r.ArchiveTime == nil {
|
||||
return nil
|
||||
}
|
||||
return parseUpstreamTime(*r.ArchiveTime)
|
||||
}
|
||||
|
||||
// RealnameLinkResp 是实名认证链接的响应
|
||||
|
||||
Reference in New Issue
Block a user