feat: 实现客户端核心业务接口(client-core-business-api)
新增客户端资产、钱包、订单、实名、设备管理等核心业务 Handler 与 DTO: - 客户端资产信息查询、套餐列表、套餐历史、资产刷新 - 客户端钱包详情、流水、充值校验、充值订单、充值记录 - 客户端订单创建、列表、详情 - 客户端实名认证链接获取 - 客户端设备卡列表、重启、恢复出厂、WiFi配置、切卡 - 客户端订单服务(含微信/支付宝支付流程) - 强充自动代购异步任务处理 - 数据库迁移 000084:充值记录增加自动代购状态字段
This commit is contained in:
104
internal/model/dto/client_realname_device_dto.go
Normal file
104
internal/model/dto/client_realname_device_dto.go
Normal file
@@ -0,0 +1,104 @@
|
||||
package dto
|
||||
|
||||
// ========================================
|
||||
// E1 实名链接获取
|
||||
// ========================================
|
||||
|
||||
// RealnimeLinkRequest E1 实名链接请求
|
||||
type RealnimeLinkRequest struct {
|
||||
Identifier string `json:"identifier" query:"identifier" validate:"required,min=1,max=50" required:"true" minLength:"1" maxLength:"50" description:"资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)"`
|
||||
ICCID string `json:"iccid" query:"iccid" validate:"omitempty,max=30" maxLength:"30" description:"物联网卡ICCID"`
|
||||
}
|
||||
|
||||
// RealnimeLinkResponse E1 实名链接响应
|
||||
type RealnimeLinkResponse struct {
|
||||
RealnameMode string `json:"realname_mode" description:"实名模式 (none:无需实名, template:模板实名, gateway:网关实名)"`
|
||||
RealnameURL string `json:"realname_url" description:"实名链接"`
|
||||
CardInfo CardInfoBrief `json:"card_info" description:"卡片简要信息"`
|
||||
ExpireAt *string `json:"expire_at,omitempty" description:"过期时间"`
|
||||
}
|
||||
|
||||
// CardInfoBrief E1 卡片简要信息
|
||||
type CardInfoBrief struct {
|
||||
ICCID string `json:"iccid" description:"物联网卡ICCID"`
|
||||
MSISDN string `json:"msisdn" description:"手机号"`
|
||||
VirtualNo string `json:"virtual_no" description:"虚拟号"`
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// F1 设备卡列表
|
||||
// ========================================
|
||||
|
||||
// DeviceCardListRequest F1 设备卡列表请求
|
||||
type DeviceCardListRequest struct {
|
||||
Identifier string `json:"identifier" query:"identifier" validate:"required,min=1,max=50" required:"true" minLength:"1" maxLength:"50" description:"资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)"`
|
||||
}
|
||||
|
||||
// DeviceCardItem F1 设备卡项
|
||||
type DeviceCardItem struct {
|
||||
CardID uint `json:"card_id" description:"卡ID"`
|
||||
ICCID string `json:"iccid" description:"物联网卡ICCID"`
|
||||
MSISDN string `json:"msisdn" description:"手机号"`
|
||||
CarrierName string `json:"carrier_name" description:"运营商名称"`
|
||||
NetworkStatus string `json:"network_status" description:"网络状态"`
|
||||
RealNameStatus int `json:"real_name_status" description:"实名状态 (0:未实名, 1:已实名)"`
|
||||
SlotPosition int `json:"slot_position" description:"插槽位置"`
|
||||
IsActive bool `json:"is_active" description:"是否当前激活卡"`
|
||||
}
|
||||
|
||||
// DeviceCardListResponse F1 设备卡列表响应
|
||||
type DeviceCardListResponse struct {
|
||||
Cards []DeviceCardItem `json:"cards" description:"设备卡列表"`
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// F2 设备重启
|
||||
// ========================================
|
||||
|
||||
// DeviceRebootRequest F2 设备重启请求
|
||||
type DeviceRebootRequest struct {
|
||||
Identifier string `json:"identifier" validate:"required,min=1,max=50" required:"true" minLength:"1" maxLength:"50" description:"资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)"`
|
||||
}
|
||||
|
||||
// DeviceOperationResponse F2/F3/F4 设备操作响应
|
||||
type DeviceOperationResponse struct {
|
||||
Accepted bool `json:"accepted" description:"是否已受理"`
|
||||
RequestID string `json:"request_id,omitempty" description:"请求ID"`
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// F3 恢复出厂设置
|
||||
// ========================================
|
||||
|
||||
// DeviceFactoryResetRequest F3 恢复出厂设置请求
|
||||
type DeviceFactoryResetRequest struct {
|
||||
Identifier string `json:"identifier" validate:"required,min=1,max=50" required:"true" minLength:"1" maxLength:"50" description:"资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)"`
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// F4 设备WiFi配置
|
||||
// ========================================
|
||||
|
||||
// DeviceWifiRequest F4 设备WiFi配置请求
|
||||
type DeviceWifiRequest struct {
|
||||
Identifier string `json:"identifier" validate:"required,min=1,max=50" required:"true" minLength:"1" maxLength:"50" description:"资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)"`
|
||||
SSID string `json:"ssid" validate:"required,min=1,max=32" required:"true" minLength:"1" maxLength:"32" description:"WiFi名称"`
|
||||
Password string `json:"password" validate:"required,min=1,max=64" required:"true" minLength:"1" maxLength:"64" description:"WiFi密码"`
|
||||
Enabled bool `json:"enabled" validate:"required" required:"true" description:"是否启用WiFi"`
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// F5 设备切卡
|
||||
// ========================================
|
||||
|
||||
// DeviceSwitchCardRequest F5 设备切卡请求
|
||||
type DeviceSwitchCardRequest struct {
|
||||
Identifier string `json:"identifier" validate:"required,min=1,max=50" required:"true" minLength:"1" maxLength:"50" description:"资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)"`
|
||||
TargetICCID string `json:"target_iccid" validate:"required,min=1,max=30" required:"true" minLength:"1" maxLength:"30" description:"目标ICCID"`
|
||||
}
|
||||
|
||||
// DeviceSwitchCardResponse F5 设备切卡响应
|
||||
type DeviceSwitchCardResponse struct {
|
||||
Accepted bool `json:"accepted" description:"是否已受理"`
|
||||
TargetICCID string `json:"target_iccid" description:"目标ICCID"`
|
||||
}
|
||||
Reference in New Issue
Block a user