components:
schemas:
AppPersonalCustomerDTO:
properties:
avatar_url:
type: string
id:
minimum: 0
type: integer
nickname:
type: string
phone:
type: string
status:
type: integer
wx_open_id:
type: string
type: object
AppUpdateProfileRequest:
properties:
avatar_url:
type: string
nickname:
type: string
type: object
DtoAccountPageResult:
properties:
items:
description: 账号列表
items:
$ref: '#/components/schemas/DtoAccountResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoAccountResponse:
properties:
created_at:
description: 创建时间
type: string
creator:
description: 创建人ID
minimum: 0
type: integer
enterprise_id:
description: 关联企业ID
minimum: 0
nullable: true
type: integer
enterprise_name:
description: 企业名称
type: string
id:
description: 账号ID
minimum: 0
type: integer
phone:
description: 手机号
type: string
shop_id:
description: 关联店铺ID
minimum: 0
nullable: true
type: integer
shop_name:
description: 店铺名称
type: string
status:
description: 状态 (0:禁用, 1:启用)
type: integer
status_name:
description: 状态名称(中文)
type: string
updated_at:
description: 更新时间
type: string
updater:
description: 更新人ID
minimum: 0
type: integer
user_type:
description: 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
type: integer
username:
description: 用户名
type: string
type: object
DtoAccountRoleResponse:
properties:
account_id:
description: 账号ID
minimum: 0
type: integer
created_at:
description: 创建时间
type: string
id:
description: 关联ID
minimum: 0
type: integer
role_id:
description: 角色ID
minimum: 0
type: integer
status:
description: 状态 (0:禁用, 1:启用)
type: integer
type: object
DtoAccountRolesResponse:
properties:
account_id:
description: 账号ID
minimum: 0
type: integer
roles:
description: 角色列表
items:
$ref: '#/components/schemas/DtoRoleResponse'
nullable: true
type: array
type: object
DtoAgentOfflinePayParams:
properties:
operation_password:
description: 操作密码
type: string
required:
- operation_password
type: object
DtoAgentOpenAPICardResumeRequest:
properties:
card_no:
description: 卡标识(支持 ICCID、虚拟号、MSISDN)
maxLength: 100
minLength: 1
type: string
required:
- card_no
type: object
DtoAgentOpenAPICardResumeResponse:
properties:
card_no:
description: 卡标识
type: string
card_status:
description: 卡状态 (normal:正常, stopped:停机)
type: string
card_status_name:
description: 卡状态名称(中文)
type: string
gateway_extend:
description: Gateway 卡状态扩展字段,复机成功后本地清空
type: string
type: object
DtoAgentOpenAPICardStatusResponse:
properties:
card_no:
description: 卡标识
type: string
card_status:
description: 卡状态 (normal:正常, stopped:停机)
type: string
card_status_name:
description: 卡状态名称(中文)
type: string
gateway_extend:
description: Gateway 卡状态扩展字段,原样返回上游 extend,用于展示运营商侧实际停机原因
type: string
stop_reason:
description: 停机原因
type: string
stop_reason_name:
description: 停机原因名称(中文)
type: string
type: object
DtoAgentOpenAPICardTrafficResponse:
properties:
active_expires_at:
description: 当前生效套餐最晚过期时间
format: date-time
nullable: true
type: string
active_packages:
description: 当前生效套餐列表
items:
$ref: '#/components/schemas/DtoAgentOpenAPIPackageTrafficItem'
nullable: true
type: array
active_remaining_flow_mb:
description: 当前生效套餐剩余流量(MB)
type: integer
active_total_flow_mb:
description: 当前生效套餐总流量(MB)
type: integer
active_used_flow_mb:
description: 当前生效套餐已用流量(MB)
type: integer
card_no:
description: 卡标识(原始传入值)
type: string
device_no:
description: 设备虚拟号(当入参被识别为设备维度时返回,表示该卡/标识关联的设备)
type: string
pending_packages:
description: 待生效套餐列表
items:
$ref: '#/components/schemas/DtoAgentOpenAPIPackageTrafficItem'
nullable: true
type: array
type: object
DtoAgentOpenAPIDeviceOperationRequest:
properties:
device_no:
description: 设备标识(支持虚拟号、IMEI)
maxLength: 100
minLength: 1
type: string
required:
- device_no
type: object
DtoAgentOpenAPIDeviceSwitchCardRequest:
properties:
device_no:
description: 设备标识(支持虚拟号、IMEI)
maxLength: 100
minLength: 1
type: string
iccid:
description: 目标卡 ICCID
maxLength: 100
minLength: 1
type: string
required:
- device_no
- iccid
type: object
DtoAgentOpenAPIDeviceTrafficResponse:
properties:
active_expires_at:
description: 当前生效套餐最晚过期时间
format: date-time
nullable: true
type: string
active_packages:
description: 当前生效套餐列表
items:
$ref: '#/components/schemas/DtoAgentOpenAPIPackageTrafficItem'
nullable: true
type: array
active_remaining_flow_mb:
description: 当前生效套餐剩余流量(MB)
type: integer
active_total_flow_mb:
description: 当前生效套餐总流量(MB)
type: integer
active_used_flow_mb:
description: 当前生效套餐已用流量(MB)
type: integer
device_no:
description: 设备标识
type: string
pending_packages:
description: 待生效套餐列表
items:
$ref: '#/components/schemas/DtoAgentOpenAPIPackageTrafficItem'
nullable: true
type: array
type: object
DtoAgentOpenAPIPackageItem:
properties:
cost_price:
description: 套餐结算价(分)
type: integer
package_code:
description: 套餐编码
type: string
package_id:
description: 套餐ID
minimum: 0
type: integer
package_name:
description: 套餐名称
type: string
package_type:
description: 套餐类型 (formal:正式套餐, addon:附加套餐)
type: string
package_type_name:
description: 套餐类型名称(中文)
type: string
retail_price:
description: 套餐销售价(分)
type: integer
series_name:
description: 套餐系列名称
type: string
total_flow_mb:
description: 总流量(MB)
type: integer
valid_days:
description: 有效天数
type: integer
type: object
DtoAgentOpenAPIPackageTrafficItem:
properties:
expires_at:
description: 套餐过期时间
format: date-time
nullable: true
type: string
package_code:
description: 套餐编码
type: string
package_name:
description: 套餐名称
type: string
package_type:
description: 套餐类型 (formal:正式套餐, addon:附加套餐)
type: string
package_type_name:
description: 套餐类型名称(中文)
type: string
priority:
description: 生效优先级(数字越小优先级越高)
type: integer
remaining_flow_mb:
description: 套餐剩余流量(MB,仅生效套餐返回)
type: integer
series_name:
description: 套餐系列名称
type: string
start_at:
description: 套餐生效时间
format: date-time
nullable: true
type: string
total_flow_mb:
description: 套餐总流量(MB)
type: integer
used_flow_mb:
description: 套餐已用流量(MB,仅生效套餐返回)
type: integer
valid_days:
description: 套餐有效天数(待生效套餐返回)
type: integer
type: object
DtoAgentOpenAPIRealnameStatusResponse:
properties:
card_no:
description: 卡标识
type: string
is_realnamed:
description: 是否已实名
type: boolean
type: object
DtoAgentOpenAPIWalletBalanceResponse:
properties:
available_balance:
description: 可用余额(分)
type: integer
balance:
description: 钱包余额(分)
type: integer
currency:
description: 币种
type: string
frozen_balance:
description: 冻结余额(分)
type: integer
type: object
DtoAgentOpenAPIWalletPackageOrderFailure:
properties:
card_no:
description: 卡标识
type: string
code:
description: 错误码
type: integer
message:
description: 失败原因
type: string
type: object
DtoAgentOpenAPIWalletPackageOrderItem:
properties:
card_no:
description: 卡标识
type: string
order_no:
description: 订单号
type: string
type: object
DtoAgentOpenAPIWalletPackageOrderRequest:
properties:
card_nos:
description: 卡标识列表(支持 ICCID、虚拟号、MSISDN)
items:
type: string
maxItems: 100
minItems: 1
nullable: true
type: array
package_code:
description: 套餐编码(一次只能购买一个套餐)
maxLength: 100
minLength: 1
type: string
required:
- card_nos
- package_code
type: object
DtoAgentOpenAPIWalletPackageOrderResponse:
properties:
batch_no:
description: 批次号
type: string
failed_cards:
description: 失败卡列表
items:
$ref: '#/components/schemas/DtoAgentOpenAPIWalletPackageOrderFailure'
nullable: true
type: array
failed_count:
description: 失败数量
type: integer
orders:
description: 成功订单列表
items:
$ref: '#/components/schemas/DtoAgentOpenAPIWalletPackageOrderItem'
nullable: true
type: array
package_code:
description: 套餐编码
type: string
success_count:
description: 成功数量
type: integer
type: object
DtoAgentRechargeListResponse:
properties:
items:
description: 充值记录列表
items:
$ref: '#/components/schemas/DtoAgentRechargeResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页条数
type: integer
total:
description: 总记录数
type: integer
type: object
DtoAgentRechargeResponse:
properties:
agent_wallet_id:
description: 代理钱包ID
minimum: 0
type: integer
amount:
description: 充值金额(分)
type: integer
completed_at:
description: 完成时间
nullable: true
type: string
created_at:
description: 创建时间
type: string
id:
description: 充值记录ID
minimum: 0
type: integer
paid_at:
description: 支付时间
nullable: true
type: string
payment_channel:
description: 实际支付通道 (wechat_direct:微信直连, fuyou:富友, offline:线下转账)
type: string
payment_config_id:
description: 关联支付配置ID,线下充值为null
minimum: 0
nullable: true
type: integer
payment_method:
description: 支付方式 (wechat:微信在线支付, offline:线下转账)
type: string
payment_transaction_id:
description: 第三方支付流水号
type: string
payment_voucher_key:
description: 支付凭证对象存储Key(线下支付时存在)
type: string
recharge_no:
description: 充值单号(ARCH前缀)
type: string
shop_id:
description: 店铺ID
minimum: 0
type: integer
shop_name:
description: 店铺名称
type: string
status:
description: 状态 (1:待支付, 2:已支付, 3:已完成, 4:已关闭, 5:已退款)
type: integer
status_name:
description: 状态名称(中文)
type: string
updated_at:
description: 更新时间
type: string
type: object
DtoAllocateCardsReq:
properties:
batch_no:
description: '[filter模式] 批次号'
maxLength: 100
type: string
carrier_id:
description: '[filter模式] 运营商ID'
minimum: 0
nullable: true
type: integer
iccid:
description: '[filter模式] ICCID模糊匹配'
maxLength: 20
type: string
iccid_end:
description: '[range模式] 号段结束ICCID'
maxLength: 20
type: string
iccid_start:
description: '[range模式] 号段起始ICCID'
maxLength: 20
type: string
iccids:
description: '[list模式] ICCID列表(最多1000个)'
items:
type: string
nullable: true
type: array
remark:
description: 授权备注(所有模式均可选)
maxLength: 500
type: string
selection_type:
description: 选取模式 (list:指定ICCID列表, range:号段范围, filter:按条件过滤)
type: string
shop_id:
description: '[filter模式] 店铺ID'
minimum: 0
nullable: true
type: integer
shop_ids:
description: '[filter模式] 店铺ID列表'
items:
minimum: 0
type: integer
nullable: true
type: array
required:
- selection_type
type: object
DtoAllocateCardsResp:
properties:
fail_count:
description: 失败数量
type: integer
failed_items:
description: 失败详情
items:
$ref: '#/components/schemas/DtoFailedItem'
nullable: true
type: array
success_count:
description: 成功数量
type: integer
type: object
DtoAllocateDevicesReq:
properties:
batch_no:
description: '[filter模式] 批次号'
maxLength: 100
type: string
device_nos:
description: '[list模式] 设备号列表(最多100个)'
items:
type: string
nullable: true
type: array
remark:
description: 授权备注(所有模式均可选)
maxLength: 500
type: string
selection_type:
description: 选取模式 (list:指定设备号列表, filter:按条件过滤)
type: string
shop_id:
description: '[filter模式] 店铺ID'
minimum: 0
nullable: true
type: integer
virtual_no:
description: '[filter模式] 设备虚拟号(模糊匹配)'
maxLength: 100
type: string
required:
- selection_type
type: object
DtoAllocateDevicesRequest:
properties:
device_ids:
description: 设备ID列表
items:
minimum: 0
type: integer
maxItems: 100
minItems: 1
nullable: true
type: array
remark:
description: 备注
maxLength: 500
type: string
target_shop_id:
description: 目标店铺ID
minimum: 1
type: integer
required:
- target_shop_id
- device_ids
type: object
DtoAllocateDevicesResp:
properties:
authorized_devices:
description: 已授权设备列表
items:
$ref: '#/components/schemas/DtoAuthorizedDeviceItem'
nullable: true
type: array
fail_count:
description: 失败数量
type: integer
failed_items:
description: 失败项列表
items:
$ref: '#/components/schemas/DtoFailedDeviceItem'
nullable: true
type: array
success_count:
description: 成功数量
type: integer
type: object
DtoAllocateDevicesResponse:
properties:
fail_count:
description: 失败数量
type: integer
failed_items:
description: 失败详情列表
items:
$ref: '#/components/schemas/DtoAllocationDeviceFailedItem'
nullable: true
type: array
success_count:
description: 成功数量
type: integer
type: object
DtoAllocateStandaloneCardsRequest:
properties:
batch_no:
description: 批次号(selection_type=filter时可选)
maxLength: 100
type: string
carrier_id:
description: 运营商ID(selection_type=filter时可选)
minimum: 0
nullable: true
type: integer
iccid_end:
description: 结束ICCID(selection_type=range时必填)
maxLength: 20
type: string
iccid_start:
description: 起始ICCID(selection_type=range时必填)
maxLength: 20
type: string
iccids:
description: ICCID列表(selection_type=list时必填,最多1000个)
items:
type: string
nullable: true
type: array
remark:
description: 备注
maxLength: 500
type: string
selection_type:
description: 选卡方式 (list:ICCID列表, range:号段范围, filter:筛选条件)
enum:
- list
- range
- filter
type: string
status:
description: 卡状态 (1:在库, 2:已分销)(selection_type=filter时可选)
maximum: 4
minimum: 1
nullable: true
type: integer
to_shop_id:
description: 目标店铺ID
minimum: 1
type: integer
required:
- to_shop_id
- selection_type
type: object
DtoAllocateStandaloneCardsResponse:
properties:
allocation_no:
description: 分配单号
type: string
fail_count:
description: 失败数
type: integer
failed_items:
description: 失败项列表
items:
$ref: '#/components/schemas/DtoAllocationFailedItem'
nullable: true
type: array
success_count:
description: 成功数
type: integer
total_count:
description: 待分配总数
type: integer
type: object
DtoAllocationDeviceFailedItem:
properties:
device_id:
description: 设备ID
minimum: 0
type: integer
reason:
description: 失败原因
type: string
virtual_no:
description: 设备虚拟号
type: string
type: object
DtoAllocationFailedItem:
properties:
iccid:
description: ICCID
type: string
reason:
description: 失败原因
type: string
type: object
DtoApproveRefundRequest:
properties:
approved_refund_amount:
description: 审批实际退款金额(分),不填则使用申请金额
minimum: 1
nullable: true
type: integer
remark:
description: 审批备注
maxLength: 500
type: string
type: object
DtoApproveWithdrawalReq:
properties:
account_name:
description: 修正后的收款人姓名
maxLength: 100
nullable: true
type: string
account_number:
description: 修正后的收款账号
maxLength: 100
nullable: true
type: string
amount:
description: 修正后的提现金额(分),不填则使用原金额
minimum: 1
nullable: true
type: integer
payment_type:
description: 放款类型(目前只支持manual人工打款)
type: string
remark:
description: 备注
maxLength: 500
type: string
withdrawal_method:
description: 修正后的收款类型 (alipay:支付宝, wechat:微信, bank:银行卡)
nullable: true
type: string
required:
- payment_type
type: object
DtoAssetAllocationRecordDetailResponse:
properties:
allocation_name:
description: 分配类型名称
type: string
allocation_no:
description: 分配单号
type: string
allocation_type:
description: 分配类型 (allocate:分配, recall:回收)
type: string
asset_id:
description: 资产ID
minimum: 0
type: integer
asset_identifier:
description: 资产标识符(ICCID或设备号)
type: string
asset_type:
description: 资产类型 (iot_card:物联网卡, device:设备)
type: string
asset_type_name:
description: 资产类型名称
type: string
created_at:
description: 创建时间
format: date-time
type: string
from_owner_id:
description: 来源所有者ID
minimum: 0
nullable: true
type: integer
from_owner_name:
description: 来源所有者名称
type: string
from_owner_type:
description: 来源所有者类型
type: string
id:
description: 记录ID
minimum: 0
type: integer
operator_id:
description: 操作人ID
minimum: 0
type: integer
operator_name:
description: 操作人名称
type: string
related_card_count:
description: 关联卡数量
type: integer
related_card_ids:
description: 关联卡ID列表
items:
minimum: 0
type: integer
type: array
related_device_id:
description: 关联设备ID
minimum: 0
nullable: true
type: integer
remark:
description: 备注
type: string
to_owner_id:
description: 目标所有者ID
minimum: 0
type: integer
to_owner_name:
description: 目标所有者名称
type: string
to_owner_type:
description: 目标所有者类型
type: string
type: object
DtoAssetAllocationRecordResponse:
properties:
allocation_name:
description: 分配类型名称
type: string
allocation_no:
description: 分配单号
type: string
allocation_type:
description: 分配类型 (allocate:分配, recall:回收)
type: string
asset_id:
description: 资产ID
minimum: 0
type: integer
asset_identifier:
description: 资产标识符(ICCID或设备号)
type: string
asset_type:
description: 资产类型 (iot_card:物联网卡, device:设备)
type: string
asset_type_name:
description: 资产类型名称
type: string
created_at:
description: 创建时间
format: date-time
type: string
from_owner_id:
description: 来源所有者ID
minimum: 0
nullable: true
type: integer
from_owner_name:
description: 来源所有者名称
type: string
from_owner_type:
description: 来源所有者类型
type: string
id:
description: 记录ID
minimum: 0
type: integer
operator_id:
description: 操作人ID
minimum: 0
type: integer
operator_name:
description: 操作人名称
type: string
related_card_count:
description: 关联卡数量
type: integer
related_device_id:
description: 关联设备ID
minimum: 0
nullable: true
type: integer
remark:
description: 备注
type: string
to_owner_id:
description: 目标所有者ID
minimum: 0
type: integer
to_owner_name:
description: 目标所有者名称
type: string
to_owner_type:
description: 目标所有者类型
type: string
type: object
DtoAssetInfoResponse:
properties:
activated_at:
description: 激活时间
format: date-time
nullable: true
type: string
activation_status:
description: 激活状态(0:未激活, 1:已激活;设备需有生效中主套餐且任意绑定卡已实名)
type: integer
activation_status_name:
description: 激活状态名称(中文)
type: string
asset_id:
description: 资产ID
minimum: 0
type: integer
asset_type:
description: 资产类型(card:卡, device:设备)
type: string
bound_card_count:
description: 绑定卡数量
type: integer
bound_device_id:
description: 绑定的设备ID
minimum: 0
nullable: true
type: integer
bound_device_name:
description: 绑定的设备名称
type: string
bound_device_no:
description: 绑定的设备虚拟号
type: string
bound_phone:
description: 当前登录用户绑定的手机号
type: string
card_category:
description: 卡业务类型(normal:普通卡, industry:行业卡)
type: string
cards:
description: 绑定卡列表(含每张卡的ICCID/MSISDN/网络状态/实名状态/插槽位置)
items:
$ref: '#/components/schemas/DtoBoundCardInfo'
type: array
carrier_id:
description: 运营商ID
minimum: 0
type: integer
carrier_name:
description: 运营商名称
type: string
carrier_type:
description: 运营商类型(CMCC/CUCC/CTCC/CBN)
type: string
current_package:
description: 当前套餐名称(无套餐时为空)
type: string
current_package_activated_at:
description: 当前主套餐开始时间
format: date-time
nullable: true
type: string
current_package_expires_at:
description: 当前主套餐过期时间
format: date-time
nullable: true
type: string
current_package_usage_id:
description: 当前主套餐的套餐使用记录ID,无主套餐时为 null
minimum: 0
nullable: true
type: integer
device_model:
description: 设备型号
type: string
device_name:
description: 设备名称
type: string
device_protect_status:
description: 设备保护期状态(none:无, stop:停机保护, start:开机保护)
type: string
device_realtime:
$ref: '#/components/schemas/DtoDeviceRealtimeInfo'
device_type:
description: 设备类型
type: string
enable_virtual_data:
description: 当前主套餐是否启用虚流量(按套餐使用记录快照返回)
type: boolean
gateway_extend:
description: Gateway 卡状态扩展字段,原样返回上游 extend,用于展示运营商侧实际停机原因
type: string
generation:
description: 世代
type: string
iccid:
description: 卡ICCID
type: string
identifier:
description: 资产标识符
type: string
imei:
description: 设备IMEI
type: string
manufacturer:
description: 制造商
type: string
max_sim_slots:
description: 最大插槽数
type: integer
msisdn:
description: 手机号
type: string
network_status:
description: 网络状态(0:停机, 1:开机)
type: integer
network_status_name:
description: 网络状态名称(中文)
type: string
real_name_status:
description: 实名状态(0:未实名, 1:已实名)
type: integer
real_name_status_name:
description: 实名状态名称(中文)
type: string
real_total_mb:
description: 当前主套餐真实总量(MB)
type: integer
real_used_mb:
description: 当前主套餐真实已用量(MB)
type: integer
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
type: string
reduction_pct:
description: 展示增幅比例,公式为(real_total_mb / virtual_total_mb) - 1
type: number
sn:
description: 设备序列号
type: string
status:
description: 资产归属状态(1:在库, 2:已分销;卡仍沿用原卡状态枚举)
type: integer
status_name:
description: 状态名称(中文)
type: string
virtual_no:
description: 虚拟号
type: string
virtual_total_mb:
description: 当前主套餐业务停机阈值(MB)
type: integer
virtual_used_mb:
description: 当前主套餐展示已用量(MB)
type: number
wallet_balance:
description: 钱包余额(分)
type: integer
type: object
DtoAssetOperationLogItem:
properties:
after_data:
additionalProperties: {}
description: 变更后数据
type: object
asset_id:
description: 资产ID
minimum: 0
type: integer
asset_identifier:
description: 资产标识(ICCID/虚拟号)
type: string
asset_type:
description: 资产类型(iot_card/device)
type: string
batch_total:
description: 批量总数
type: integer
before_data:
additionalProperties: {}
description: 变更前数据
type: object
created_at:
description: 操作时间
format: date-time
type: string
error_code:
description: 错误码
nullable: true
type: string
error_msg:
description: 错误摘要
nullable: true
type: string
fail_count:
description: 批量失败数
type: integer
id:
description: 日志ID
minimum: 0
type: integer
ip_address:
description: 请求IP
nullable: true
type: string
operation_content_after:
additionalProperties: {}
description: 操作内容(变更后)
type: object
operation_content_before:
additionalProperties: {}
description: 操作内容(变更前)
type: object
operation_desc:
description: 操作描述(中文)
type: string
operation_fields_desc:
additionalProperties:
type: string
description: 操作内容字段说明(key 为字段名,value 为中文说明)
type: object
operation_type:
description: 操作类型
type: string
operator_id:
description: 操作人ID(系统触发为空)
minimum: 0
nullable: true
type: integer
operator_name:
description: 操作人名称(优先返回可读名称)
type: string
operator_type:
description: 操作人类型名称 (系统:系统, 平台用户:平台用户, 代理账号:代理账号, 企业账号:企业账号, 个人客户:个人客户)
type: string
operator_type_code:
description: 操作人类型编码(system/admin_user/agent_user/enterprise_user/personal_customer)
type: string
request_id:
description: 请求ID
nullable: true
type: string
request_method:
description: 请求方法
nullable: true
type: string
request_path:
description: 请求路径
nullable: true
type: string
result_status:
description: 执行结果 (success:成功, failed:失败, denied:拒绝)
type: string
success_count:
description: 批量成功数
type: integer
user_agent:
description: 用户代理
nullable: true
type: string
type: object
DtoAssetOperationLogListResponse:
properties:
items:
description: 日志列表
items:
$ref: '#/components/schemas/DtoAssetOperationLogItem'
nullable: true
type: array
page:
description: 当前页码
type: integer
page_size:
description: 每页条数
type: integer
total:
description: 总条数
type: integer
type: object
DtoAssetOrderItem:
properties:
created_at:
description: 订单创建时间
format: date-time
type: string
generation:
description: 订单所属资产世代编号
type: integer
items:
description: 套餐明细列表
items:
$ref: '#/components/schemas/DtoAssetOrderItemDetail'
nullable: true
type: array
order_no:
description: 订单号
type: string
order_type:
description: 订单类型:single_card/device
type: string
paid_at:
description: 支付时间
format: date-time
nullable: true
type: string
payment_method:
description: 支付方式:wallet/wechat/alipay/offline
type: string
payment_status:
description: 支付状态:1待支付 2已支付 3已取消 4已退款
type: integer
payment_status_text:
description: 支付状态文本
type: string
total_amount:
description: 订单金额(分)
type: integer
type: object
DtoAssetOrderItemDetail:
properties:
amount:
description: 小计金额(分)
type: integer
package_name:
description: 套餐名称快照
type: string
quantity:
description: 数量
type: integer
unit_price:
description: 单价(分)
type: integer
type: object
DtoAssetOrdersResponse:
properties:
current_generation:
$ref: '#/components/schemas/DtoGenerationOrders'
previous_generations:
description: 前代订单列表(include_previous=true时返回)
items:
$ref: '#/components/schemas/DtoPreviousGenerationOrders'
type: array
truncated:
description: 是否已截断(换货链超过10代追溯上限时为true)
type: boolean
type: object
DtoAssetPackageHistoryResponse:
properties:
items:
description: 套餐历史列表
items:
$ref: '#/components/schemas/DtoAssetPackageResponse'
nullable: true
type: array
page:
description: 页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoAssetPackageListResponse:
properties:
packages:
description: 套餐列表
items:
$ref: '#/components/schemas/DtoClientPackageItem'
nullable: true
type: array
type: object
DtoAssetPackageResponse:
properties:
activated_at:
description: 激活时间(待生效套餐为空)
format: date-time
nullable: true
type: string
created_at:
description: 创建时间
format: date-time
type: string
enable_virtual_data:
description: 是否启用虚流量(按套餐使用记录快照返回)
type: boolean
expires_at:
description: 到期时间(待生效套餐为空)
format: date-time
nullable: true
type: string
expiry_base:
description: 到期时间基准 (from_activation:实名激活时起算, from_purchase:购买时起算)
type: string
master_usage_id:
description: 主套餐ID(加油包时有值)
minimum: 0
nullable: true
type: integer
order_id:
description: 关联订单ID(无订单分配时为0)
minimum: 0
type: integer
order_no:
description: 订单号快照(无订单分配时为空)
type: string
package_id:
description: 套餐ID
minimum: 0
type: integer
package_name:
description: 套餐名称
type: string
package_type:
description: 套餐类型:formal/addon
type: string
package_usage_id:
description: 套餐使用记录ID
minimum: 0
type: integer
paid_amount:
description: 购买成本价(分),仅平台账号可见,非平台账号不返回此字段
nullable: true
type: integer
priority:
description: 优先级
type: integer
real_total_mb:
description: 套餐真实总量(MB)
type: integer
real_used_mb:
description: 套餐真实已用量(MB)
type: integer
reduction_pct:
description: 展示增幅比例,公式为(real_total_mb / virtual_total_mb) - 1
type: number
refund_id:
description: 退款主键ID快照(未退款时为空)
minimum: 0
nullable: true
type: integer
refund_no:
description: 退款单号快照(未退款时为空)
type: string
retail_amount:
description: 购买零售价(分),无订单关联时为空
nullable: true
type: integer
status:
description: 状态:0待生效 1生效中 2已用完 3已过期 4已失效
type: integer
status_name:
description: 状态名称
type: string
usage_type:
description: 使用类型:single_card/device
type: string
virtual_total_mb:
description: 套餐业务停机阈值(MB)
type: integer
virtual_used_mb:
description: 套餐展示已用量(MB)
type: number
type: object
DtoAssetPackagesResult:
properties:
items:
description: 套餐列表
items:
$ref: '#/components/schemas/DtoAssetPackageResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
page_size:
description: 每页条数
type: integer
total:
description: 总条数
type: integer
type: object
DtoAssetRealtimeStatusResponse:
properties:
asset_id:
description: 资产ID
minimum: 0
type: integer
asset_type:
description: 资产类型:card 或 device
type: string
cards:
description: 绑定卡状态列表(asset_type=device时有效)
items:
$ref: '#/components/schemas/DtoBoundCardInfo'
type: array
current_month_usage_mb:
description: 系统自然月累计流量(MB,asset_type=card时有效,不等于运营商周期口径)
type: number
device_protect_status:
description: 保护期状态(asset_type=device时有效):none/stop/start
type: string
device_realtime:
$ref: '#/components/schemas/DtoDeviceGatewayInfo'
gateway_card_imei:
description: 插拔卡业务 IMEI(由 Gateway 卡状态接口同步,非设备自身 IMEI,无业务含义,仅供查看)
type: string
gateway_extend:
description: Gateway 卡状态扩展字段,原样返回上游 extend,用于展示运营商侧实际停机原因
type: string
last_card_status_check_at:
description: 最后一次卡状态检查时间(asset_type=card时有效)
format: date-time
nullable: true
type: string
last_data_check_at:
description: 最后一次流量检查时间(asset_type=card时有效)
format: date-time
nullable: true
type: string
last_gateway_reading_mb:
description: 运营商当前周期累计流量读数(MB,asset_type=card时有效,运营商口径展示建议读取该字段)
type: number
last_real_name_check_at:
description: 最后一次实名检查时间(asset_type=card时有效)
format: date-time
nullable: true
type: string
last_sync_time:
description: 最后同步时间(asset_type=card时有效)
format: date-time
nullable: true
type: string
network_status:
description: 网络状态(asset_type=card时有效):0停机 1开机
type: integer
real_name_status:
description: 实名状态(asset_type=card时有效):0未实名 1已实名
type: integer
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
type: string
type: object
DtoAssetRefreshRequest:
properties:
identifier:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
required:
- identifier
type: object
DtoAssetRefreshResponse:
properties:
accepted:
description: 是否已受理
type: boolean
cooldown_seconds:
description: 冷却秒数
type: integer
refresh_type:
description: 刷新类型 (card:卡, device:设备)
type: string
type: object
DtoAssetResolveResponse:
properties:
activated_at:
description: 激活时间(未来准备移除,请勿依赖)
format: date-time
nullable: true
type: string
activation_status:
description: 激活状态:0未激活 1已激活;设备需有生效中主套餐且任意绑定卡已实名
type: integer
activation_status_name:
description: 激活状态名称(中文)
type: string
asset_id:
description: 资产数据库ID
minimum: 0
type: integer
asset_type:
description: 资产类型:card 或 device
type: string
batch_no:
description: 批次号
type: string
bound_card_count:
description: 绑定的卡数量(asset_type=device时有效)
type: integer
bound_device_id:
description: 绑定的设备ID(asset_type=card时有效)
minimum: 0
nullable: true
type: integer
bound_device_name:
description: 绑定的设备名称(asset_type=card时有效)
type: string
bound_device_no:
description: 绑定的设备虚拟号(asset_type=card时有效)
type: string
card_category:
description: 卡业务类型
type: string
cards:
description: 绑定的卡列表(asset_type=device时有效)
items:
$ref: '#/components/schemas/DtoBoundCardInfo'
type: array
carrier_id:
description: 运营商ID
minimum: 0
type: integer
carrier_name:
description: 运营商名称
type: string
carrier_type:
description: 运营商类型
type: string
created_at:
description: 创建时间
format: date-time
type: string
current_package:
description: 当前套餐名称(无套餐时为空)
type: string
current_package_activated_at:
description: 当前主套餐开始时间
format: date-time
nullable: true
type: string
current_package_expires_at:
description: 当前主套餐过期时间
format: date-time
nullable: true
type: string
current_package_usage_id:
description: 当前主套餐的套餐使用记录ID,无主套餐时为 null
minimum: 0
nullable: true
type: integer
device_model:
description: 设备型号
type: string
device_name:
description: 设备名称
type: string
device_protect_status:
description: 设备保护期状态:none/stop/start(仅asset_type=device时有效)
type: string
device_type:
description: 设备类型
type: string
enable_polling:
description: 是否参与轮询
type: boolean
enable_virtual_data:
description: 当前主套餐是否启用虚流量(按套餐使用记录快照返回)
type: boolean
gateway_card_imei:
description: 插拔卡业务 IMEI(由 Gateway 卡状态接口同步,非设备自身 IMEI,无业务含义,仅供查看)
type: string
gateway_extend:
description: Gateway 卡状态扩展字段,原样返回上游 extend,用于展示运营商侧实际停机原因
type: string
iccid:
description: 卡ICCID(asset_type=card时有效)
type: string
identifier:
description: 解析时使用的标识符
type: string
imei:
description: 设备IMEI
type: string
imsi:
description: IMSI
type: string
last_gateway_sync_at:
description: 最后 sync-info 同步时间(设备类型时有效)
format: date-time
nullable: true
type: string
last_online_time:
description: 最后在线时间(设备类型时有效)
format: date-time
nullable: true
type: string
manufacturer:
description: 制造商
type: string
max_sim_slots:
description: 最大插槽数
type: integer
msisdn:
description: 手机号
type: string
network_status:
description: 网络状态:0停机 1开机(asset_type=card时有效)
type: integer
online_status:
description: 在线状态:0未知 1在线 2离线(设备类型时有效)
type: integer
real_name_at:
description: 最近一次完成实名的时间,未实名时为 null
format: date-time
nullable: true
type: string
real_name_status:
description: 实名状态:0未实名 1已实名
type: integer
real_total_mb:
description: 当前主套餐真实总量(MB)
type: integer
real_used_mb:
description: 当前主套餐真实已用量(MB)
type: integer
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
type: string
reduction_pct:
description: 展示增幅比例,公式为(real_total_mb / virtual_total_mb) - 1
type: number
series_id:
description: 套餐系列ID
minimum: 0
nullable: true
type: integer
series_name:
description: 套餐系列名称
type: string
shop_id:
description: 所属店铺ID
minimum: 0
nullable: true
type: integer
shop_name:
description: 所属店铺名称
type: string
sn:
description: 设备序列号
type: string
software_version:
description: 固件版本号(设备类型时有效)
type: string
status:
description: 资产归属状态 (1:在库, 2:已分销;卡仍沿用原卡状态枚举)
type: integer
status_name:
description: 资产状态名称(中文)
type: string
supplier:
description: 供应商
type: string
switch_mode:
description: 切卡模式:0=自动,1=手动(设备类型时有效)
type: string
updated_at:
description: 更新时间
format: date-time
type: string
virtual_no:
description: 虚拟号
type: string
virtual_total_mb:
description: 当前主套餐业务停机阈值(MB)
type: integer
virtual_used_mb:
description: 当前主套餐展示已用量(MB)
type: number
type: object
DtoAssetWalletResponse:
properties:
available_balance:
description: 可用余额 = balance - frozen_balance(分)
type: integer
balance:
description: 总余额(分)
type: integer
created_at:
description: 创建时间(RFC3339)
format: date-time
type: string
currency:
description: 币种,目前固定 CNY
type: string
frozen_balance:
description: 冻结余额(分)
type: integer
resource_id:
description: 对应卡或设备的数据库ID
minimum: 0
type: integer
resource_type:
description: 资源类型:iot_card 或 device
type: string
status:
description: 钱包状态:1-正常 2-冻结 3-关闭
type: integer
status_text:
description: 状态文本
type: string
updated_at:
description: 更新时间(RFC3339)
format: date-time
type: string
wallet_id:
description: 钱包数据库ID
minimum: 0
type: integer
type: object
DtoAssetWalletTransactionItem:
properties:
amount:
description: 变动金额(分),充值为正数,扣款/退款为负数
type: integer
balance_after:
description: 变动后余额(分)
type: integer
balance_before:
description: 变动前余额(分)
type: integer
created_at:
description: 流水创建时间(RFC3339)
format: date-time
type: string
id:
description: 流水记录ID
minimum: 0
type: integer
reference_no:
description: 关联业务编号:充值单号(CRCH…)或订单号(ORD…)(可空)
nullable: true
type: string
reference_type:
description: 关联业务类型:recharge、order 或 exchange(可空)
nullable: true
type: string
remark:
description: 备注(可空)
nullable: true
type: string
transaction_type:
description: 交易类型:recharge/deduct/refund/exchange
type: string
transaction_type_text:
description: 交易类型文本:充值/扣款/退款/换货迁移
type: string
type: object
DtoAssetWalletTransactionListResponse:
properties:
items:
description: 流水列表
items:
$ref: '#/components/schemas/DtoAssetWalletTransactionItem'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoAssignPermissionsParams:
properties:
perm_ids:
description: 权限ID列表
items:
minimum: 0
type: integer
minItems: 1
nullable: true
type: array
required:
- perm_ids
type: object
DtoAssignRolesParams:
properties:
role_ids:
description: 角色ID列表,传空数组可清空所有角色
items:
minimum: 0
type: integer
nullable: true
type: array
type: object
DtoAssignShopRolesRequest:
properties:
role_ids:
description: 角色ID列表
items:
minimum: 0
type: integer
nullable: true
type: array
type: object
DtoAuthorizationItem:
properties:
authorized_at:
description: 授权时间
format: date-time
type: string
authorized_by:
description: 授权人ID
minimum: 0
type: integer
authorizer_name:
description: 授权人名称
type: string
authorizer_type:
description: 授权人类型:2=平台,3=代理
type: integer
card_id:
description: 卡ID
minimum: 0
type: integer
enterprise_id:
description: 企业ID
minimum: 0
type: integer
enterprise_name:
description: 企业名称
type: string
iccid:
description: ICCID
type: string
id:
description: 授权记录ID
minimum: 0
type: integer
msisdn:
description: 手机号
type: string
remark:
description: 备注
type: string
revoked_at:
description: 回收时间
format: date-time
nullable: true
type: string
revoked_by:
description: 回收人ID
minimum: 0
nullable: true
type: integer
revoker_name:
description: 回收人名称
type: string
status:
description: 状态:1=有效,0=已回收
type: integer
type: object
DtoAuthorizationListResp:
properties:
items:
description: 授权记录列表
items:
$ref: '#/components/schemas/DtoAuthorizationItem'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoAuthorizedDeviceItem:
properties:
card_count:
description: 绑定卡数量
type: integer
device_id:
description: 设备ID
minimum: 0
type: integer
virtual_no:
description: 设备虚拟号
type: string
type: object
DtoBatchAllocatePackagesRequest:
properties:
one_time_commission_amount:
description: 该代理能拿到的一次性佣金(分)
minimum: 0
nullable: true
type: integer
price_adjustment:
$ref: '#/components/schemas/DtoPriceAdjustment'
series_id:
description: 套餐系列ID
minimum: 0
type: integer
shop_id:
description: 被分配的店铺ID
minimum: 0
type: integer
required:
- shop_id
- series_id
type: object
DtoBatchPricingSkipped:
properties:
allocation_id:
description: 分配ID
minimum: 0
type: integer
reason:
description: 跳过原因
type: string
type: object
DtoBatchRemovePermissionsRequest:
properties:
perm_ids:
description: 权限ID列表
items:
minimum: 0
type: integer
minItems: 1
nullable: true
type: array
required:
- perm_ids
type: object
DtoBatchSetCardSeriesBindngRequest:
properties:
batch_no:
description: 批次号(selection_type=filter时可选)
maxLength: 100
type: string
carrier_id:
description: 运营商ID(selection_type=filter时可选)
minimum: 0
nullable: true
type: integer
carrier_name:
description: 运营商名称模糊查询(selection_type=filter时可选)
maxLength: 100
type: string
filter_series_id:
description: 当前绑定套餐系列ID(selection_type=filter时可选;目标套餐系列仍使用series_id)
minimum: 0
nullable: true
type: integer
iccid:
description: ICCID模糊查询(selection_type=filter时可选)
maxLength: 20
type: string
iccid_end:
description: 结束ICCID(selection_type=range时使用)
maxLength: 20
type: string
iccid_start:
description: 起始ICCID(selection_type=range时使用)
maxLength: 20
type: string
iccids:
description: ICCID列表(selection_type=list时使用,最多1000个)
items:
type: string
maxItems: 1000
nullable: true
type: array
is_distributed:
description: 是否已分销(selection_type=filter时可选)
nullable: true
type: boolean
is_replaced:
description: 是否有换卡记录(selection_type=filter时可选)
nullable: true
type: boolean
is_standalone:
description: 是否为独立卡(selection_type=filter时可选)
nullable: true
type: boolean
msisdn:
description: 卡接入号模糊查询(selection_type=filter时可选)
maxLength: 20
type: string
package_id:
description: 套餐ID(selection_type=filter时可选)
minimum: 0
nullable: true
type: integer
selection_type:
description: 选卡方式 (list:ICCID列表, range:号段范围, filter:筛选条件;不传时兼容旧版ICCID列表)
enum:
- list
- range
- filter
type: string
series_id:
description: 目标套餐系列ID(0表示清除关联)
minimum: 0
type: integer
shop_id:
description: 分销商ID(selection_type=filter时可选,兼容旧参数,单选)
minimum: 0
nullable: true
type: integer
shop_ids:
description: 分销商ID列表(selection_type=filter时可选,多选)
items:
minimum: 0
type: integer
nullable: true
type: array
status:
description: 状态 (1:在库, 2:已分销, 3:已激活, 4:已停用)(selection_type=filter时可选)
maximum: 4
minimum: 1
nullable: true
type: integer
required:
- series_id
type: object
DtoBatchSetCardSeriesBindngResponse:
properties:
fail_count:
description: 失败数量
type: integer
failed_items:
description: 失败详情列表
items:
$ref: '#/components/schemas/DtoCardSeriesBindngFailedItem'
nullable: true
type: array
success_count:
description: 成功数量
type: integer
type: object
DtoBatchSetDeviceSeriesBindngRequest:
properties:
activation_status:
description: 激活状态 (0:未激活, 1:已激活;selection_type=filter时可选)
maximum: 1
minimum: 0
nullable: true
type: integer
batch_no:
description: 批次号(selection_type=filter时可选)
maxLength: 100
type: string
created_at_end:
description: 创建时间结束(selection_type=filter时可选)
format: date-time
nullable: true
type: string
created_at_start:
description: 创建时间起始(selection_type=filter时可选)
format: date-time
nullable: true
type: string
device_ids:
description: 设备ID列表(selection_type=list时使用,最多1000个)
items:
minimum: 0
type: integer
maxItems: 1000
nullable: true
type: array
device_name:
description: 设备名称模糊查询(selection_type=filter时可选)
maxLength: 255
type: string
device_type:
description: 设备类型(selection_type=filter时可选)
maxLength: 50
type: string
filter_series_id:
description: 当前绑定套餐系列ID(selection_type=filter时可选;目标套餐系列仍使用series_id)
minimum: 0
nullable: true
type: integer
manufacturer:
description: 制造商模糊查询(selection_type=filter时可选)
maxLength: 255
type: string
selection_type:
description: 选设备方式 (list:设备ID列表, range:设备虚拟号范围, filter:筛选条件;不传时兼容旧版设备ID列表)
enum:
- list
- range
- filter
type: string
series_id:
description: 目标套餐系列ID(0表示清除关联)
minimum: 0
type: integer
shop_id:
description: 店铺ID(selection_type=filter时可选,兼容旧参数,单选)
minimum: 0
nullable: true
type: integer
shop_ids:
description: 店铺ID列表(selection_type=filter时可选,多选)
items:
minimum: 0
type: integer
nullable: true
type: array
status:
description: 归属状态 (1:在库, 2:已分销)(selection_type=filter时可选)
maximum: 2
minimum: 1
nullable: true
type: integer
virtual_no:
description: 设备虚拟号模糊查询(selection_type=filter时可选)
maxLength: 100
type: string
virtual_no_end:
description: 结束设备虚拟号(selection_type=range时使用)
maxLength: 100
type: string
virtual_no_start:
description: 起始设备虚拟号(selection_type=range时使用)
maxLength: 100
type: string
required:
- series_id
type: object
DtoBatchSetDeviceSeriesBindngResponse:
properties:
fail_count:
description: 失败数量
type: integer
failed_items:
description: 失败详情列表
items:
$ref: '#/components/schemas/DtoDeviceSeriesBindngFailedItem'
nullable: true
type: array
success_count:
description: 成功数量
type: integer
type: object
DtoBatchUpdateCostPriceRequest:
properties:
change_reason:
description: 变更原因
maxLength: 255
type: string
price_adjustment:
$ref: '#/components/schemas/DtoPriceAdjustment'
series_id:
description: 套餐系列ID(可选,不填则调整所有)
minimum: 0
nullable: true
type: integer
shop_id:
description: 店铺ID
minimum: 0
type: integer
required:
- shop_id
- price_adjustment
type: object
DtoBatchUpdateCostPriceResponse:
properties:
affected_ids:
description: 受影响的分配ID列表
items:
minimum: 0
type: integer
nullable: true
type: array
skipped:
description: 跳过的记录
items:
$ref: '#/components/schemas/DtoBatchPricingSkipped'
type: array
updated_count:
description: 更新数量
type: integer
type: object
DtoBindCardToDeviceRequest:
properties:
iot_card_id:
description: IoT卡ID
minimum: 1
type: integer
slot_position:
description: 插槽位置 (1-4)
maximum: 4
minimum: 1
type: integer
required:
- iot_card_id
- slot_position
type: object
DtoBindCardToDeviceResponse:
properties:
binding_id:
description: 绑定记录ID
minimum: 0
type: integer
message:
description: 提示信息
type: string
type: object
DtoBindPhoneRequest:
properties:
code:
description: 验证码
maxLength: 6
minLength: 6
type: string
phone:
description: 手机号
maxLength: 11
minLength: 11
type: string
required:
- phone
- code
type: object
DtoBindPhoneResponse:
properties:
bound_at:
description: 绑定时间
type: string
phone:
description: 已绑定手机号
type: string
type: object
DtoBoundCardInfo:
properties:
card_id:
description: 卡ID
minimum: 0
type: integer
carrier_id:
description: 运营商ID
minimum: 0
type: integer
carrier_name:
description: 运营商名称
type: string
carrier_type:
description: 运营商类型
type: string
gateway_extend:
description: Gateway 卡状态扩展字段,原样返回上游 extend,用于展示运营商侧实际停机原因
type: string
iccid:
description: ICCID
type: string
is_current:
description: 是否为当前使用的卡
type: boolean
last_card_status_check_at:
description: 最后一次卡状态检查时间
format: date-time
nullable: true
type: string
last_data_check_at:
description: 最后一次流量检查时间
format: date-time
nullable: true
type: string
last_real_name_check_at:
description: 最后一次实名检查时间
format: date-time
nullable: true
type: string
last_sync_time:
description: 最后同步时间
format: date-time
nullable: true
type: string
msisdn:
description: 手机号
type: string
network_status:
description: 网络状态:0停机 1开机
type: integer
real_name_at:
description: 该卡最近一次完成实名的时间,未实名时为 null
format: date-time
nullable: true
type: string
real_name_status:
description: 实名状态:0未实名 1已实名
type: integer
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
type: string
slot_position:
description: 插槽位置
type: integer
type: object
DtoCancelExportTaskResponse:
properties:
cancel_requested:
description: 是否已请求取消
type: boolean
message:
description: 提示信息
type: string
status:
description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:已失败, 5:已取消)
type: integer
status_name:
description: 任务状态名称(中文)
type: string
task_id:
description: 任务ID
minimum: 0
type: integer
type: object
DtoCancelTriggerReq:
properties:
trigger_id:
description: 触发任务ID
minimum: 0
type: integer
type: object
DtoCardInfoBrief:
properties:
iccid:
description: 物联网卡ICCID
type: string
msisdn:
description: 手机号
type: string
virtual_no:
description: 虚拟号
type: string
type: object
DtoCardSeriesBindngFailedItem:
properties:
iccid:
description: ICCID
type: string
reason:
description: 失败原因
type: string
type: object
DtoCarrierPageResult:
properties:
items:
description: 运营商列表
items:
$ref: '#/components/schemas/DtoCarrierResponse'
nullable: true
type: array
page:
description: 当前页
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoCarrierResponse:
properties:
carrier_code:
description: 运营商编码
type: string
carrier_name:
description: 运营商名称
type: string
carrier_type:
description: 运营商类型 (CMCC:中国移动, CUCC:中国联通, CTCC:中国电信, CBN:中国广电)
type: string
created_at:
description: 创建时间
type: string
data_reset_day:
description: 上游流量重置日(1-28)
type: integer
description:
description: 运营商描述
type: string
id:
description: 运营商ID
minimum: 0
type: integer
realname_link_template:
description: 实名链接模板URL
type: string
realname_link_type:
description: 实名链接类型 none-不支持 template-模板URL gateway-Gateway接口
type: string
status:
description: 状态 (1:启用, 0:禁用)
type: integer
updated_at:
description: 更新时间
type: string
type: object
DtoChangePasswordRequest:
properties:
new_password:
type: string
old_password:
type: string
type: object
DtoChangePhoneRequest:
properties:
new_code:
description: 新手机号验证码
maxLength: 6
minLength: 6
type: string
new_phone:
description: 新手机号
maxLength: 11
minLength: 11
type: string
old_code:
description: 旧手机号验证码
maxLength: 6
minLength: 6
type: string
old_phone:
description: 旧手机号
maxLength: 11
minLength: 11
type: string
required:
- old_phone
- old_code
- new_phone
- new_code
type: object
DtoChangePhoneResponse:
properties:
changed_at:
description: 换绑时间
type: string
phone:
description: 换绑后手机号
type: string
type: object
DtoClientCreateOrderRequest:
properties:
app_type:
description: 应用类型(微信强充必传)(official_account:公众号, miniapp:小程序)
type: string
identifier:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
package_ids:
description: 套餐ID列表
items:
minimum: 0
type: integer
nullable: true
type: array
payment_method:
description: 支付方式(强充必传)(wechat:微信, alipay:支付宝)
type: string
required:
- identifier
- package_ids
type: object
DtoClientCreateOrderResponse:
properties:
idempotent:
description: 幂等标志(true 表示返回的是已存在的待支付充值订单)
type: boolean
linked_package_info:
$ref: '#/components/schemas/DtoLinkedPackageInfo'
order:
$ref: '#/components/schemas/DtoClientOrderInfo'
order_type:
description: 订单类型 (package:套餐订单, recharge:充值订单)
type: string
pay_config:
$ref: '#/components/schemas/DtoClientPayConfig'
payment_link:
$ref: '#/components/schemas/DtoClientPaymentLink'
recharge:
$ref: '#/components/schemas/DtoClientRechargeInfo'
type: object
DtoClientCreateRechargeRequest:
properties:
amount:
description: 充值金额(分)
maximum: 1e+07
minimum: 1
type: integer
app_type:
description: 应用类型(微信支付必传)(official_account:公众号, miniapp:小程序)
type: string
identifier:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
payment_method:
description: 支付方式 (wechat:微信支付, alipay:支付宝)
type: string
required:
- identifier
- amount
- payment_method
type: object
DtoClientExchangePendingResponse:
properties:
created_at:
description: 创建时间
format: date-time
type: string
exchange_no:
description: 换货单号
type: string
exchange_reason:
description: 换货原因
type: string
flow_type:
description: 换货流程类型 (shipping:物流换货, direct:直接换货)
type: string
id:
description: 换货单ID
minimum: 0
type: integer
status:
description: 换货状态 (1:待填写信息, 2:待发货, 3:已发货待确认, 4:已完成, 5:已取消)
type: integer
status_name:
description: 换货状态名称(中文)
type: string
status_text:
description: 换货状态文本
type: string
type: object
DtoClientOrderDetailResponse:
properties:
completed_at:
description: 完成时间
nullable: true
type: string
created_at:
description: 创建时间
type: string
order_id:
description: 订单ID
minimum: 0
type: integer
order_no:
description: 订单号
type: string
packages:
description: 订单套餐列表
items:
$ref: '#/components/schemas/DtoClientOrderPackageItem'
nullable: true
type: array
paid_at:
description: 支付时间
nullable: true
type: string
payment_method:
description: 支付方式
type: string
payment_status:
description: 支付状态 (1:待支付, 2:已支付, 3:已取消, 4:已退款)
type: integer
payment_status_name:
description: 支付状态名称(中文)
type: string
total_amount:
description: 订单总金额(分)
type: integer
type: object
DtoClientOrderInfo:
properties:
created_at:
description: 创建时间
type: string
order_id:
description: 订单ID
minimum: 0
type: integer
order_no:
description: 订单号
type: string
payment_status:
description: 支付状态 (1:待支付, 2:已支付, 3:已取消, 4:已退款)
type: integer
payment_status_name:
description: 支付状态名称(中文)
type: string
total_amount:
description: 订单总金额(分)
type: integer
type: object
DtoClientOrderListItem:
properties:
created_at:
description: 创建时间
type: string
order_id:
description: 订单ID
minimum: 0
type: integer
order_no:
description: 订单号
type: string
package_names:
description: 套餐名称列表
items:
type: string
nullable: true
type: array
payment_status:
description: 支付状态 (1:待支付, 2:已支付, 3:已取消, 4:已退款)
type: integer
payment_status_name:
description: 支付状态名称(中文)
type: string
total_amount:
description: 订单总金额(分)
type: integer
type: object
DtoClientOrderListResponse:
properties:
items:
description: 订单列表
items:
$ref: '#/components/schemas/DtoClientOrderListItem'
nullable: true
type: array
page:
description: 页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoClientOrderPackageItem:
properties:
package_id:
description: 套餐ID
minimum: 0
type: integer
package_name:
description: 套餐名称
type: string
package_type:
description: 套餐类型 (formal:正式套餐, addon:加油包)
type: string
price:
description: 单价(分)
type: integer
quantity:
description: 数量
type: integer
type: object
DtoClientPackageItem:
properties:
cost_price:
description: 成本价(分)
type: integer
data_allowance:
description: 流量额度
type: integer
data_unit:
description: 流量单位
type: string
description:
description: 套餐说明
type: string
is_addon:
description: 是否加油包
type: boolean
package_id:
description: 套餐ID
minimum: 0
type: integer
package_name:
description: 套餐名称
type: string
package_type:
description: 套餐类型 (formal:正式套餐, addon:加油包)
type: string
retail_price:
description: 生效零售价(分)
type: integer
validity_days:
description: 有效天数(按天套餐为折算总天数,自然月套餐按当前日期推算)
type: integer
type: object
DtoClientPayConfig:
properties:
app_id:
description: 应用ID
type: string
nonce_str:
description: 随机字符串
type: string
package:
description: 预支付参数
type: string
pay_sign:
description: 支付签名
type: string
sign_type:
description: 签名类型
type: string
timestamp:
description: 时间戳
type: string
type: object
DtoClientPayOrderParams:
properties:
app_type:
description: 应用类型(微信支付必传)(official_account:公众号, miniapp:小程序)
type: string
payment_method:
description: 支付方式 (wallet:钱包, wechat:微信, alipay:支付宝)
type: string
required:
- payment_method
type: object
DtoClientPayOrderResponse:
properties:
pay_config:
$ref: '#/components/schemas/DtoClientPayConfig'
payment_link:
$ref: '#/components/schemas/DtoClientPaymentLink'
payment_method:
description: 支付方式
type: string
type: object
DtoClientPaymentLink:
properties:
copy_link:
description: 复制到普通浏览器打开的支付链接(与 qr_link 相同)
type: string
pay_expire_at:
description: 支付链接过期时间(RFC3339 格式)
type: string
payment_no:
description: 支付单号
type: string
qr_link:
description: 二维码内容链接,前端用该链接生成二维码
type: string
type: object
DtoClientRechargeCheckResponse:
properties:
force_recharge_amount:
description: 强制充值金额(分)
type: integer
max_amount:
description: 最大充值金额(分)
type: integer
message:
description: 提示信息
type: string
min_amount:
description: 最小充值金额(分)
type: integer
need_force_recharge:
description: 是否需要强制充值
type: boolean
trigger_type:
description: 触发类型
type: string
type: object
DtoClientRechargeInfo:
properties:
amount:
description: 充值金额(分)
type: integer
auto_purchase_status:
description: 自动购包状态
type: string
recharge_id:
description: 充值ID
minimum: 0
type: integer
recharge_no:
description: 充值单号
type: string
status:
description: 状态 (0:待支付, 1:已支付, 2:已关闭)
type: integer
status_name:
description: 状态名称(中文)
type: string
type: object
DtoClientRechargeListItem:
properties:
amount:
description: 充值金额(分)
type: integer
auto_purchase_status:
description: 自动购包状态
type: string
created_at:
description: 创建时间
type: string
payment_method:
description: 支付方式
type: string
recharge_id:
description: 充值ID
minimum: 0
type: integer
recharge_no:
description: 充值单号
type: string
status:
description: 状态 (0:待支付, 1:已支付, 2:已关闭)
type: integer
type: object
DtoClientRechargeListResponse:
properties:
items:
description: 充值记录列表
items:
$ref: '#/components/schemas/DtoClientRechargeListItem'
nullable: true
type: array
page:
description: 页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoClientRechargePayConfig:
properties:
app_id:
description: 应用ID
type: string
nonce_str:
description: 随机字符串
type: string
package:
description: 预支付参数
type: string
pay_sign:
description: 支付签名
type: string
sign_type:
description: 签名类型
type: string
timestamp:
description: 时间戳
type: string
type: object
DtoClientRechargeResponse:
properties:
pay_config:
$ref: '#/components/schemas/DtoClientRechargePayConfig'
payment_link:
$ref: '#/components/schemas/DtoClientPaymentLink'
recharge:
$ref: '#/components/schemas/DtoClientRechargeResult'
type: object
DtoClientRechargeResult:
properties:
amount:
description: 充值金额(分)
type: integer
recharge_id:
description: 充值ID
minimum: 0
type: integer
recharge_no:
description: 充值单号
type: string
status:
description: 状态 (0:待支付, 1:已支付, 2:已关闭)
type: integer
type: object
DtoClientSendCodeRequest:
properties:
phone:
description: 手机号
maxLength: 11
minLength: 11
type: string
scene:
description: 业务场景 (bind_phone:绑定手机号, change_phone_old:换绑旧手机, change_phone_new:换绑新手机)
type: string
required:
- phone
- scene
type: object
DtoClientSendCodeResponse:
properties:
cooldown_seconds:
description: 冷却秒数
type: integer
type: object
DtoClientShippingInfoParams:
properties:
recipient_address:
description: 收货地址
maxLength: 500
minLength: 1
type: string
recipient_name:
description: 收件人姓名
maxLength: 50
minLength: 1
type: string
recipient_phone:
description: 收件人电话
maxLength: 20
minLength: 1
type: string
required:
- recipient_name
- recipient_phone
- recipient_address
type: object
DtoCommissionRecordResolveRequest:
properties:
action:
description: 操作 (release:入账, invalidate:作废)
type: string
amount:
description: 佣金金额(分),release 时必填
minimum: 1
nullable: true
type: integer
remark:
description: 处理备注
maxLength: 500
type: string
required:
- action
type: object
DtoCommissionStatsResponse:
properties:
cost_diff_amount:
description: 成本价差收入(分)
type: integer
cost_diff_count:
description: 成本价差笔数
type: integer
cost_diff_percent:
description: 成本价差占比(千分比)
type: integer
one_time_amount:
description: 一次性佣金收入(分)
type: integer
one_time_count:
description: 一次性佣金笔数
type: integer
one_time_percent:
description: 一次性佣金占比(千分比)
type: integer
total_amount:
description: 总收入(分)
type: integer
total_count:
description: 总笔数
type: integer
type: object
DtoCommissionTierInfo:
properties:
current_rate:
description: 当前返佣比例
type: string
next_rate:
description: 下一档位返佣比例
type: string
next_threshold:
description: 下一档位阈值
nullable: true
type: integer
type: object
DtoCreateAccountRequest:
properties:
enterprise_id:
description: 关联企业ID(企业账号必填)
minimum: 0
nullable: true
type: integer
password:
description: 密码
maxLength: 32
minLength: 8
type: string
phone:
description: 手机号
maxLength: 11
minLength: 11
type: string
shop_id:
description: 关联店铺ID(代理账号必填)
minimum: 0
nullable: true
type: integer
user_type:
description: 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
maximum: 4
minimum: 1
type: integer
username:
description: 用户名
maxLength: 50
minLength: 3
type: string
required:
- username
- phone
- password
- user_type
type: object
DtoCreateAdminOrderRequest:
properties:
identifier:
description: 资产标识符(ICCID 或 VirtualNo)
maxLength: 100
minLength: 1
type: string
package_ids:
description: 套餐ID列表
items:
minimum: 0
type: integer
maxItems: 10
minItems: 1
nullable: true
type: array
payment_method:
description: 支付方式 (wallet:钱包支付, offline:线下支付)
type: string
payment_voucher_key:
description: 线下支付凭证对象存储file_key(payment_method=offline时必填,通过/storage/upload-url上传图片后获得)
maxLength: 500
type: string
required:
- identifier
- package_ids
- payment_method
type: object
DtoCreateAgentRechargeRequest:
properties:
amount:
description: 充值金额(分),范围1分~100万元
maximum: 1e+08
minimum: 1
type: integer
payment_method:
description: 支付方式 (wechat:微信在线支付, offline:线下转账仅平台可用)
type: string
payment_voucher_key:
description: 支付凭证对象存储Key(payment_method=offline 时必填,微信支付时忽略)
type: string
shop_id:
description: 目标店铺ID,代理只能填自己店铺
minimum: 0
type: integer
required:
- shop_id
- amount
- payment_method
type: object
DtoCreateCarrierRequest:
properties:
carrier_code:
description: 运营商编码
maxLength: 50
minLength: 1
type: string
carrier_name:
description: 运营商名称
maxLength: 100
minLength: 1
type: string
carrier_type:
description: 运营商类型 (CMCC:中国移动, CUCC:中国联通, CTCC:中国电信, CBN:中国广电)
type: string
data_reset_day:
description: 上游流量重置日(1-28),运营商每月清零网关计数器的日期,默认1
maximum: 28
minimum: 1
nullable: true
type: integer
description:
description: 运营商描述
maxLength: 500
type: string
realname_link_template:
description: 实名链接模板URL,支持 {iccid}/{msisdn}/{virtual_no} 占位符
maxLength: 500
nullable: true
type: string
realname_link_type:
description: 实名链接类型 none-不支持 template-模板URL gateway-Gateway接口
nullable: true
type: string
required:
- carrier_code
- carrier_name
- carrier_type
type: object
DtoCreateDataCleanupConfigReq:
properties:
batch_size:
description: 每批删除条数,默认10000
type: integer
description:
description: 配置说明
type: string
retention_days:
description: 保留天数,最少7天
type: integer
table_name:
description: 表名
type: string
type: object
DtoCreateEnterpriseReq:
properties:
address:
description: 详细地址
maximum: 255
type: string
business_license:
description: 营业执照号
maximum: 100
type: string
city:
description: 城市
maximum: 50
type: string
contact_name:
description: 联系人姓名
maximum: 50
type: string
contact_phone:
description: 联系人电话
maximum: 20
type: string
district:
description: 区县
maximum: 50
type: string
enterprise_code:
description: 企业编号(唯一)
maximum: 50
type: string
enterprise_name:
description: 企业名称
maximum: 100
type: string
legal_person:
description: 法人代表
maximum: 50
type: string
login_phone:
description: 登录手机号(作为企业账号)
type: string
owner_shop_id:
description: 归属店铺ID(可不填则归属平台)
minimum: 0
nullable: true
type: integer
password:
description: 登录密码
maximum: 20
minimum: 6
type: string
province:
description: 省份
maximum: 50
type: string
required:
- enterprise_name
- enterprise_code
- contact_name
- contact_phone
- login_phone
- password
type: object
DtoCreateEnterpriseResp:
properties:
account_id:
description: 账号ID
minimum: 0
type: integer
enterprise:
$ref: '#/components/schemas/DtoEnterpriseItem'
type: object
DtoCreateExchangeRequest:
properties:
exchange_reason:
description: 换货原因
maxLength: 100
minLength: 1
type: string
flow_type:
description: 换货流程类型 (shipping:物流换货, direct:直接换货)
enum:
- shipping
- direct
type: string
migrate_data:
description: 是否执行全量迁移,direct 流程未传按 false 处理
nullable: true
type: boolean
new_identifier:
description: 新资产标识符,direct 流程必填(ICCID/虚拟号/IMEI/SN)
maxLength: 100
minLength: 1
type: string
old_asset_type:
description: 旧资产类型 (iot_card:物联网卡, device:设备)
type: string
old_identifier:
description: 旧资产标识符(ICCID/虚拟号/IMEI/SN)
maxLength: 100
minLength: 1
type: string
remark:
description: 备注
maxLength: 500
nullable: true
type: string
required:
- old_asset_type
- old_identifier
- exchange_reason
type: object
DtoCreateExportTaskRequest:
properties:
format:
description: 导出格式 (xlsx:Excel, csv:CSV)
type: string
query:
additionalProperties: {}
description: 导出筛选参数(JSON对象,可选)
type: object
scene:
description: 导出场景 (device:设备, iot_card:IoT卡, order:订单)
type: string
required:
- scene
- format
type: object
DtoCreateExportTaskResponse:
properties:
message:
description: 提示信息
type: string
status:
description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:已失败, 5:已取消)
type: integer
status_name:
description: 任务状态名称(中文)
type: string
task_id:
description: 导出任务ID
minimum: 0
type: integer
task_no:
description: 任务编号
type: string
type: object
DtoCreateMyWithdrawalReq:
properties:
account_name:
description: 收款人姓名
maximum: 50
type: string
account_number:
description: 收款账号
maximum: 100
type: string
amount:
description: 提现金额(分)
minimum: 1
type: integer
withdrawal_method:
description: 收款类型
enum:
- alipay
type: string
required:
- amount
- withdrawal_method
- account_name
- account_number
type: object
DtoCreateMyWithdrawalResp:
properties:
actual_amount:
description: 实际到账金额(分)
type: integer
amount:
description: 提现金额(分)
type: integer
created_at:
description: 申请时间
type: string
fee:
description: 手续费(分)
type: integer
fee_rate:
description: 手续费比率(基点)
type: integer
id:
description: 提现申请ID
minimum: 0
type: integer
status:
description: 状态
type: integer
status_name:
description: 状态名称
type: string
withdrawal_no:
description: 提现单号
type: string
type: object
DtoCreatePackageRequest:
properties:
calendar_type:
description: 套餐周期类型 (natural_month:自然月, by_day:按天)
nullable: true
type: string
cost_price:
description: 成本价(分)
minimum: 0
type: integer
data_reset_cycle:
description: 流量重置周期 (daily:每日, monthly:每月, yearly:每年, none:不重置)
nullable: true
type: string
duration_days:
description: 套餐天数(calendar_type=by_day时必填)
maximum: 3650
minimum: 1
nullable: true
type: integer
duration_months:
description: 套餐时长(月数)
maximum: 120
minimum: 1
type: integer
enable_virtual_data:
description: 是否启用虚流量
type: boolean
expiry_base:
description: 到期时间基准 (from_activation:实名激活时起算, from_purchase:购买时起算)
example: from_activation
type: string
is_gift:
description: 是否赠送套餐
type: boolean
package_code:
description: 套餐编码
maxLength: 100
minLength: 1
type: string
package_name:
description: 套餐名称
maxLength: 255
minLength: 1
type: string
package_type:
description: 套餐类型 (formal:正式套餐, addon:附加套餐)
type: string
real_data_mb:
description: 真流量额度(MB)
minimum: 0
nullable: true
type: integer
series_id:
description: 套餐系列ID
minimum: 0
nullable: true
type: integer
suggested_retail_price:
description: 建议售价原始值(分,普通可售套餐留空表示未配置,赠送套餐必须显式为0)
minimum: 0
nullable: true
type: integer
virtual_data_mb:
description: 虚流量额度(MB)
minimum: 0
nullable: true
type: integer
required:
- package_code
- package_name
- package_type
- duration_months
- cost_price
type: object
DtoCreatePackageSeriesRequest:
properties:
description:
description: 描述
maxLength: 500
type: string
enable_one_time_commission:
description: 是否启用一次性佣金
nullable: true
type: boolean
one_time_commission_config:
$ref: '#/components/schemas/DtoSeriesOneTimeCommissionConfigDTO'
series_code:
description: 系列编码
maxLength: 100
minLength: 1
type: string
series_name:
description: 系列名称
maxLength: 255
minLength: 1
type: string
required:
- series_code
- series_name
type: object
DtoCreatePermissionRequest:
properties:
parent_id:
description: 父权限ID
minimum: 0
nullable: true
type: integer
perm_code:
description: 权限编码
maxLength: 100
minLength: 1
type: string
perm_name:
description: 权限名称
maxLength: 50
minLength: 1
type: string
perm_type:
description: 权限类型 (1:菜单, 2:按钮)
maximum: 2
minimum: 1
type: integer
platform:
description: 适用端口 (all:全部, web:Web后台, h5:H5端),默认为 all
type: string
sort:
description: 排序值
minimum: 0
type: integer
url:
description: 请求路径
maxLength: 255
type: string
required:
- perm_name
- perm_code
- perm_type
type: object
DtoCreatePollingAlertRuleReq:
properties:
alert_level:
description: 告警级别 (warning/critical)
type: string
cooldown_minutes:
description: 冷却时间(分钟),默认5分钟
type: integer
metric_type:
description: 指标类型 (queue_size/success_rate/avg_duration/concurrency)
type: string
notify_channels:
description: 通知渠道(JSON格式)
type: string
operator:
description: 比较运算符,默认 >
type: string
rule_name:
description: 规则名称
type: string
task_type:
description: 任务类型 (polling:realname/polling:carddata/polling:package)
type: string
threshold:
description: 阈值
type: number
type: object
DtoCreatePollingConfigRequest:
properties:
card_category:
description: 卡业务类型 (normal:普通卡, industry:行业卡)
type: string
card_condition:
description: 卡状态条件 (not_real_name:未实名, real_name:已实名, activated:已激活, suspended:已停用)
type: string
card_status_check_interval:
description: 卡状态检查间隔(秒),NULL表示不检查,最小30秒
minimum: 30
nullable: true
type: integer
carddata_check_interval:
description: 流量检查间隔(秒),NULL表示不检查,最小60秒
minimum: 60
nullable: true
type: integer
carrier_id:
description: 运营商ID(可选,精确匹配)
minimum: 0
nullable: true
type: integer
config_name:
description: 配置名称
maxLength: 100
minLength: 1
type: string
description:
description: 配置说明
maxLength: 500
type: string
package_check_interval:
description: 套餐检查间隔(秒),NULL表示不检查,最小60秒
minimum: 60
nullable: true
type: integer
priority:
description: 优先级(数字越小优先级越高)
maximum: 1000
minimum: 1
type: integer
protect_check_interval:
description: 保护期一致性检查间隔(秒),NULL表示不检查,最小30秒
minimum: 30
nullable: true
type: integer
realname_check_interval:
description: 实名检查间隔(秒),NULL表示不检查,最小30秒
minimum: 30
nullable: true
type: integer
required:
- config_name
- priority
type: object
DtoCreateRefundRequest:
properties:
actual_received_amount:
description: 实收金额(分)
minimum: 1
type: integer
order_id:
description: 关联订单ID
minimum: 0
type: integer
package_usage_id:
description: 关联套餐使用记录ID(可选)
minimum: 0
nullable: true
type: integer
refund_reason:
description: 退款原因
maxLength: 1000
type: string
refund_voucher_key:
description: 退款凭证对象存储file_key(通过/storage/upload-url上传图片后获得)
maxLength: 500
minLength: 1
type: string
requested_refund_amount:
description: 申请退款金额(分)
minimum: 1
type: integer
required:
- order_id
- actual_received_amount
- requested_refund_amount
- refund_voucher_key
type: object
DtoCreateRoleRequest:
properties:
role_desc:
description: 角色描述
maxLength: 255
type: string
role_name:
description: 角色名称
maxLength: 50
minLength: 1
type: string
role_type:
description: 角色类型 (1:平台角色, 2:客户角色)
maximum: 2
minimum: 1
type: integer
required:
- role_name
- role_type
type: object
DtoCreateShopRequest:
properties:
address:
description: 详细地址
maxLength: 255
type: string
city:
description: 城市
maxLength: 50
type: string
contact_name:
description: 联系人姓名
maxLength: 50
type: string
contact_phone:
description: 联系人电话
maxLength: 11
minLength: 11
type: string
default_role_id:
description: 店铺默认角色ID(必须是客户角色)
minimum: 1
type: integer
district:
description: 区县
maxLength: 50
type: string
init_password:
description: 初始账号密码
maxLength: 32
minLength: 8
type: string
init_phone:
description: 初始账号手机号
maxLength: 11
minLength: 11
type: string
init_username:
description: 初始账号用户名
maxLength: 50
minLength: 3
type: string
parent_id:
description: 上级店铺ID(一级店铺可不填)
minimum: 1
nullable: true
type: integer
province:
description: 省份
maxLength: 50
type: string
shop_code:
description: 店铺编号
maxLength: 50
minLength: 1
type: string
shop_name:
description: 店铺名称
maxLength: 100
minLength: 1
type: string
required:
- shop_name
- shop_code
- default_role_id
- init_password
- init_username
- init_phone
type: object
DtoCreateShopSeriesGrantRequest:
properties:
commission_tiers:
description: 梯度模式阶梯配置,梯度模式必填
items:
$ref: '#/components/schemas/DtoGrantCommissionTierItem'
type: array
enable_force_recharge:
description: 是否启用代理强充
nullable: true
type: boolean
force_recharge_amount:
description: 代理强充金额(分)
nullable: true
type: integer
one_time_commission_amount:
description: 固定模式佣金金额(分),固定模式必填
nullable: true
type: integer
packages:
description: 初始授权套餐列表
items:
$ref: '#/components/schemas/DtoGrantPackageItem'
type: array
series_id:
description: 套餐系列ID
minimum: 0
type: integer
shop_id:
description: 被授权代理店铺ID
minimum: 0
type: integer
type: object
DtoCreateWechatConfigRequest:
properties:
ali_app_id:
description: 支付宝应用ID
maxLength: 100
type: string
ali_notify_url:
description: 支付宝异步通知地址
maxLength: 500
type: string
ali_pay_expire_minutes:
description: 支付过期分钟数 (默认30分钟)
maximum: 1440
minimum: 1
type: integer
ali_private_key:
description: 支付宝应用私钥(PEM格式)
type: string
ali_production:
description: 是否生产环境 (true:生产, false:沙箱)
type: boolean
ali_public_key:
description: 支付宝公钥(PEM格式,用于验签)
type: string
ali_return_url:
description: 支付宝同步跳转地址
maxLength: 500
type: string
description:
description: 配置描述
maxLength: 500
type: string
fy_api_url:
description: 富友API地址
maxLength: 500
type: string
fy_ins_cd:
description: 富友机构号
maxLength: 50
type: string
fy_mchnt_cd:
description: 富友商户号
maxLength: 50
type: string
fy_notify_url:
description: 富友支付回调地址
maxLength: 500
type: string
fy_private_key:
description: 富友私钥(PEM格式)
type: string
fy_public_key:
description: 富友公钥(PEM格式)
type: string
fy_term_id:
description: 富友终端号
maxLength: 50
type: string
miniapp_app_id:
description: 小程序AppID
maxLength: 100
type: string
miniapp_app_secret:
description: 小程序AppSecret
maxLength: 200
type: string
name:
description: 配置名称
maxLength: 100
minLength: 1
type: string
oa_aes_key:
description: 公众号AES加密Key
maxLength: 200
type: string
oa_app_id:
description: 公众号AppID
maxLength: 100
type: string
oa_app_secret:
description: 公众号AppSecret
maxLength: 200
type: string
oa_oauth_redirect_url:
description: OAuth回调地址
maxLength: 500
type: string
oa_token:
description: 公众号Token
maxLength: 200
type: string
provider_type:
description: 支付渠道类型 (wechat:微信直连v3, wechat_v2:微信直连v2, fuiou:富友)
type: string
wx_api_v2_key:
description: 微信APIv2密钥
maxLength: 200
type: string
wx_api_v3_key:
description: 微信APIv3密钥
maxLength: 200
type: string
wx_cert_content:
description: 微信支付证书内容(PEM格式)
type: string
wx_key_content:
description: 微信支付密钥内容(PEM格式)
type: string
wx_mch_id:
description: 微信商户号
maxLength: 100
type: string
wx_notify_url:
description: 微信支付回调地址
maxLength: 500
type: string
wx_serial_no:
description: 微信证书序列号
maxLength: 200
type: string
required:
- name
- provider_type
type: object
DtoCreateWithdrawalSettingReq:
properties:
daily_withdrawal_limit:
description: 每日提现次数限制
maximum: 100
minimum: 1
type: integer
fee_rate:
description: 手续费比率(基点,100=1%)
maximum: 10000
minimum: 0
type: integer
min_withdrawal_amount:
description: 最低提现金额(分)
minimum: 1
type: integer
required:
- daily_withdrawal_limit
- min_withdrawal_amount
- fee_rate
type: object
DtoDailyCommissionStatsResponse:
properties:
date:
description: 日期(YYYY-MM-DD)
type: string
total_amount:
description: 当日总收入(分)
type: integer
total_count:
description: 当日总笔数
type: integer
type: object
DtoDataCleanupConfigListResp:
properties:
items:
description: 配置列表
items:
$ref: '#/components/schemas/DtoDataCleanupConfigResp'
nullable: true
type: array
type: object
DtoDataCleanupConfigResp:
properties:
batch_size:
description: 每批删除条数
type: integer
created_at:
description: 创建时间
format: date-time
type: string
description:
description: 配置说明
type: string
enabled:
description: 是否启用:0-禁用,1-启用
type: integer
id:
description: 配置ID
minimum: 0
type: integer
retention_days:
description: 保留天数
type: integer
table_name:
description: 表名
type: string
updated_at:
description: 更新时间
format: date-time
type: string
updated_by:
description: 更新人ID
minimum: 0
nullable: true
type: integer
type: object
DtoDataCleanupLogListResp:
properties:
items:
description: 日志列表
items:
$ref: '#/components/schemas/DtoDataCleanupLogResp'
nullable: true
type: array
page:
description: 当前页
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoDataCleanupLogResp:
properties:
cleanup_type:
description: 清理类型:scheduled/manual
type: string
completed_at:
description: 完成时间
format: date-time
nullable: true
type: string
deleted_count:
description: 删除记录数
type: integer
duration_ms:
description: 执行耗时(毫秒)
type: integer
error_message:
description: 错误信息
type: string
id:
description: 日志ID
minimum: 0
type: integer
retention_days:
description: 保留天数
type: integer
started_at:
description: 开始时间
format: date-time
type: string
status:
description: 状态:success/failed/running
type: string
table_name:
description: 表名
type: string
triggered_by:
description: 触发人ID
minimum: 0
nullable: true
type: integer
type: object
DtoDataCleanupPreviewItem:
properties:
description:
description: 配置说明
type: string
record_count:
description: 待清理记录数
type: integer
retention_days:
description: 保留天数
type: integer
table_name:
description: 表名
type: string
type: object
DtoDataCleanupPreviewResp:
properties:
items:
description: 预览列表
items:
$ref: '#/components/schemas/DtoDataCleanupPreviewItem'
nullable: true
type: array
type: object
DtoDataCleanupProgressResp:
properties:
current_table:
description: 当前清理的表
type: string
is_running:
description: 是否正在运行
type: boolean
last_log:
$ref: '#/components/schemas/DtoDataCleanupLogResp'
processed_tables:
description: 已处理表数
type: integer
started_at:
description: 开始时间
format: date-time
nullable: true
type: string
total_deleted:
description: 已删除记录数
type: integer
total_tables:
description: 总表数
type: integer
type: object
DtoDeviceCardBindingResponse:
properties:
bind_time:
description: 绑定时间
format: date-time
nullable: true
type: string
carrier_name:
description: 运营商名称
type: string
gateway_extend:
description: Gateway 卡状态扩展字段,原样返回上游 extend,用于展示运营商侧实际停机原因
type: string
iccid:
description: ICCID
type: string
id:
description: 绑定记录ID
minimum: 0
type: integer
iot_card_id:
description: IoT卡ID
minimum: 0
type: integer
is_current:
description: 是否为当前使用的卡
type: boolean
msisdn:
description: 接入号
type: string
network_status:
description: 网络状态:0停机 1开机(asset_type=card时有效)
type: integer
real_name_status:
description: 实名状态 (0:未实名, 1:已实名)
type: integer
real_name_status_name:
description: 实名状态名称(中文)
type: string
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
type: string
slot_position:
description: 插槽位置 (1-4)
type: integer
status:
description: 卡状态 (1:在库, 2:已分销, 3:已激活, 4:已停用)
type: integer
status_name:
description: 卡状态名称(中文)
type: string
type: object
DtoDeviceCardItem:
properties:
card_id:
description: 卡ID
minimum: 0
type: integer
carrier_name:
description: 运营商名称
type: string
carrier_type:
description: 运营商类型(CMCC/CUCC/CTCC/CBN)
type: string
gateway_extend:
description: Gateway 卡状态扩展字段,原样返回上游 extend,用于展示运营商侧实际停机原因
type: string
iccid:
description: 物联网卡ICCID
type: string
is_active:
description: 是否当前激活卡
type: boolean
msisdn:
description: 手机号
type: string
network_status:
description: 网络状态
type: string
real_name_status:
description: 实名状态 (0:未实名, 1:已实名)
type: integer
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
type: string
slot_position:
description: 插槽位置
type: integer
type: object
DtoDeviceCardListResponse:
properties:
cards:
description: 设备卡列表
items:
$ref: '#/components/schemas/DtoDeviceCardItem'
nullable: true
type: array
type: object
DtoDeviceFactoryResetRequest:
properties:
identifier:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
required:
- identifier
type: object
DtoDeviceGatewayInfo:
properties:
battery_level:
description: 电池电量百分比(无电池时为null)
nullable: true
type: integer
client_number:
description: 当前已连接客户端数
nullable: true
type: integer
connect_time:
description: 本次联网时间(秒)
nullable: true
type: string
current_iccid:
description: 当前使用的ICCID
nullable: true
type: string
daily_usage:
description: 日使用流量(字节)
nullable: true
type: string
device_id:
description: Gateway设备ID(IMEI/SN)
nullable: true
type: string
device_name:
description: Gateway返回的设备名称
nullable: true
type: string
device_type:
description: Gateway返回的设备类型
nullable: true
type: string
dl_stats:
description: 本次开机下载流量(字节)
nullable: true
type: string
gateway_msg:
description: Gateway 上游消息(成功时为 null,失败时为错误信息)
nullable: true
type: string
imei:
description: IMEI号
nullable: true
type: string
imsi:
description: IMSI用户标识码
nullable: true
type: string
ip_address:
description: IP地址
nullable: true
type: string
lan_ip:
description: 局域网网关IP地址
nullable: true
type: string
last_online_time:
description: 设备最后在线时间
nullable: true
type: string
last_update_time:
description: 设备信息最后更新时间
nullable: true
type: string
limit_speed:
description: 限速速率(KB/s)
nullable: true
type: integer
mac_address:
description: MAC地址
nullable: true
type: string
max_clients:
description: 最大连接客户端数
nullable: true
type: integer
online_status:
description: 在线状态:1=在线,2=离线
nullable: true
type: integer
rsrp:
description: 参考信号接收功率(dBm)
nullable: true
type: integer
rsrq:
description: 参考信号接收质量(dB)
nullable: true
type: integer
rssi:
description: 接收信号强度
nullable: true
type: string
run_time:
description: 本次开机运行时间(秒)
nullable: true
type: string
signal_bad_reason:
description: 信号较弱时的怀疑原因提示
nullable: true
type: string
signal_quality:
description: 信号综合判断(信号很好/信号正常/信号较弱/信号很差/暂无数据)
nullable: true
type: string
sinr:
description: 信噪比(dB)
nullable: true
type: integer
software_version:
description: 软件版本号
nullable: true
type: string
ssid:
description: WiFi热点名称
nullable: true
type: string
status:
description: 设备状态:1=正常,0=禁用
nullable: true
type: integer
switch_mode:
description: 切卡模式:0=自动,1=手动
nullable: true
type: string
sync_interval:
description: 信息上报周期(秒)
nullable: true
type: integer
ul_stats:
description: 本次开机上传流量(字节)
nullable: true
type: string
wan_ip:
description: 基站分配IPv4地址
nullable: true
type: string
wifi_enabled:
description: WiFi开关状态
nullable: true
type: boolean
wifi_password:
description: WiFi密码
nullable: true
type: string
type: object
DtoDeviceImportResultItemDTO:
properties:
line:
description: 行号
type: integer
reason:
description: 原因
type: string
virtual_no:
description: 设备虚拟号
type: string
type: object
DtoDeviceImportTaskDetailResponse:
properties:
batch_no:
description: 批次号
type: string
completed_at:
description: 完成时间
format: date-time
nullable: true
type: string
created_at:
description: 创建时间
format: date-time
type: string
error_message:
description: 错误信息
type: string
fail_count:
description: 失败数
type: integer
failed_items:
description: 失败记录详情
items:
$ref: '#/components/schemas/DtoDeviceImportResultItemDTO'
nullable: true
type: array
file_name:
description: 文件名
type: string
id:
description: 任务ID
minimum: 0
type: integer
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
type: string
skip_count:
description: 跳过数
type: integer
skipped_items:
description: 跳过记录详情
items:
$ref: '#/components/schemas/DtoDeviceImportResultItemDTO'
nullable: true
type: array
started_at:
description: 开始处理时间
format: date-time
nullable: true
type: string
status:
description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:失败)
type: integer
status_text:
description: 任务状态文本
type: string
success_count:
description: 成功数
type: integer
task_no:
description: 任务编号
type: string
total_count:
description: 总数
type: integer
warning_count:
description: 警告数(部分成功的设备数量)
type: integer
warning_items:
description: 警告记录详情(部分成功的设备及其卡绑定失败原因)
items:
$ref: '#/components/schemas/DtoDeviceImportResultItemDTO'
nullable: true
type: array
type: object
DtoDeviceImportTaskResponse:
properties:
batch_no:
description: 批次号
type: string
completed_at:
description: 完成时间
format: date-time
nullable: true
type: string
created_at:
description: 创建时间
format: date-time
type: string
error_message:
description: 错误信息
type: string
fail_count:
description: 失败数
type: integer
file_name:
description: 文件名
type: string
id:
description: 任务ID
minimum: 0
type: integer
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
type: string
skip_count:
description: 跳过数
type: integer
started_at:
description: 开始处理时间
format: date-time
nullable: true
type: string
status:
description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:失败)
type: integer
status_text:
description: 任务状态文本
type: string
success_count:
description: 成功数
type: integer
task_no:
description: 任务编号
type: string
total_count:
description: 总数
type: integer
warning_count:
description: 警告数(部分成功的设备数量)
type: integer
type: object
DtoDeviceOperationResponse:
properties:
accepted:
description: 是否已受理
type: boolean
request_id:
description: 请求ID
type: string
type: object
DtoDeviceRealtimeInfo:
properties:
battery_level:
description: 电池电量百分比
nullable: true
type: integer
client_number:
description: 当前已连接客户端数
nullable: true
type: integer
connect_time:
description: 设备本次联网时间(秒)
nullable: true
type: string
created_at:
description: Gateway创建时间(Unix时间戳)
nullable: true
type: integer
current_iccid:
description: 当前使用的ICCID
nullable: true
type: string
daily_usage:
description: 日使用流量(字节)
nullable: true
type: string
device_id:
description: Gateway设备ID(IMEI/SN)
nullable: true
type: string
device_name:
description: Gateway返回的设备名称
nullable: true
type: string
device_type:
description: Gateway返回的设备型号
nullable: true
type: string
dl_stats:
description: 本次开机下载流量(字节)
nullable: true
type: string
gateway_msg:
description: Gateway 上游消息(成功时为 null,失败时为错误信息)
nullable: true
type: string
imei:
description: Gateway返回的IMEI号
nullable: true
type: string
imsi:
description: Gateway返回的IMSI
nullable: true
type: string
ip_address:
description: IP地址
nullable: true
type: string
lan_ip:
description: 局域网网关IP地址
nullable: true
type: string
last_online_time:
description: 设备最后在线时间
nullable: true
type: string
last_update_time:
description: 设备信息最后更新时间
nullable: true
type: string
limit_speed:
description: 限速速率(KB/s)
nullable: true
type: integer
mac_address:
description: MAC地址
nullable: true
type: string
max_clients:
description: 最大连接客户端数
nullable: true
type: integer
online_status:
description: 在线状态(1:在线, 2:离线)
nullable: true
type: integer
rsrp:
description: 参考信号接收功率(dBm)
nullable: true
type: integer
rsrq:
description: 参考信号接收质量(dB)
nullable: true
type: integer
rssi:
description: 接收信号强度
nullable: true
type: string
run_time:
description: 设备本次开机运行时间(秒)
nullable: true
type: string
signal_bad_reason:
description: 信号较弱时的怀疑原因提示
nullable: true
type: string
signal_quality:
description: 信号综合判断(信号很好/信号正常/信号较弱/信号很差/暂无数据)
nullable: true
type: string
sinr:
description: 信噪比(dB)
nullable: true
type: integer
software_version:
description: 软件版本号
nullable: true
type: string
ssid:
description: WiFi热点名称
nullable: true
type: string
status:
description: 设备状态(1:正常, 0:禁用)
nullable: true
type: integer
switch_mode:
description: 切卡模式(0:自动, 1:手动)
nullable: true
type: integer
sync_interval:
description: 信息上报周期(秒)
nullable: true
type: integer
ul_stats:
description: 本次开机上传流量(字节)
nullable: true
type: string
updated_at:
description: Gateway更新时间(Unix时间戳)
nullable: true
type: integer
wan_ip:
description: 基站分配IPv4地址
nullable: true
type: string
wifi_enabled:
description: WiFi开关状态
nullable: true
type: boolean
wifi_password:
description: WiFi密码
nullable: true
type: string
type: object
DtoDeviceRebootRequest:
properties:
identifier:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
required:
- identifier
type: object
DtoDeviceResponse:
properties:
activated_at:
description: 激活时间
format: date-time
nullable: true
type: string
activation_status:
description: 激活状态 (0:未激活, 1:已激活;需有生效中主套餐且任意绑定卡已实名)
type: integer
activation_status_name:
description: 激活状态名称(中文)
type: string
asset_status:
description: 业务状态 (1:在库, 2:已销售, 3:已换货, 4:已停用)
type: integer
asset_status_name:
description: 业务状态名称(中文)
type: string
authorized_enterprise_id:
description: 当前有效授权的企业ID,未授权时为 null
minimum: 0
nullable: true
type: integer
authorized_enterprise_name:
description: 当前有效授权的企业名称,未授权时为空字符串
type: string
batch_no:
description: 批次号
type: string
bound_card_count:
description: 已绑定卡数量
type: integer
created_at:
description: 创建时间
format: date-time
type: string
device_model:
description: 设备型号
type: string
device_name:
description: 设备名称
type: string
device_type:
description: 设备类型
type: string
generation:
description: 资产世代编号(初始值1,每次换货转新后+1)
type: integer
id:
description: 设备ID
minimum: 0
type: integer
imei:
description: 设备IMEI
type: string
last_gateway_sync_at:
description: 最后 sync-info 同步时间
format: date-time
nullable: true
type: string
last_online_time:
description: 最后在线时间
format: date-time
nullable: true
type: string
manufacturer:
description: 制造商
type: string
max_sim_slots:
description: 最大插槽数
type: integer
online_status:
description: 在线状态:0未知 1在线 2离线
type: integer
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
type: string
series_id:
description: 套餐系列ID
minimum: 0
nullable: true
type: integer
series_name:
description: 套餐系列名称
type: string
shop_id:
description: 店铺ID
minimum: 0
nullable: true
type: integer
shop_name:
description: 店铺名称
type: string
sn:
description: 设备序列号
type: string
software_version:
description: 固件版本号
type: string
status:
description: 归属状态 (1:在库, 2:已分销)
type: integer
status_name:
description: 归属状态名称(中文)
type: string
switch_mode:
description: 切卡模式:0=自动,1=手动
type: string
updated_at:
description: 更新时间
format: date-time
type: string
virtual_no:
description: 设备虚拟号/别名
type: string
type: object
DtoDeviceSeriesBindngFailedItem:
properties:
device_id:
description: 设备ID
minimum: 0
type: integer
reason:
description: 失败原因
type: string
virtual_no:
description: 设备虚拟号
type: string
type: object
DtoDeviceSwitchCardRequest:
properties:
identifier:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
target_iccid:
description: 目标ICCID
maxLength: 30
minLength: 1
type: string
required:
- identifier
- target_iccid
type: object
DtoDeviceSwitchCardResponse:
properties:
accepted:
description: 是否已受理
type: boolean
target_iccid:
description: 目标ICCID
type: string
type: object
DtoDeviceWifiRequest:
properties:
enabled:
description: 是否启用WiFi
type: boolean
identifier:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
password:
description: WiFi密码
maxLength: 64
minLength: 1
type: string
ssid:
description: WiFi名称
maxLength: 32
minLength: 1
type: string
required:
- identifier
- ssid
- password
- enabled
type: object
DtoEmptyResponse:
properties:
message:
description: 提示信息
type: string
type: object
DtoEnterpriseCardItem:
properties:
carrier_id:
description: 运营商ID
minimum: 0
type: integer
carrier_name:
description: 运营商名称
type: string
device_id:
description: 设备ID
minimum: 0
nullable: true
type: integer
gateway_extend:
description: Gateway 卡状态扩展字段,原样返回上游 extend,用于展示运营商侧实际停机原因
type: string
iccid:
description: ICCID
type: string
id:
description: 卡ID
minimum: 0
type: integer
msisdn:
description: 手机号
type: string
network_status:
description: 网络状态
type: integer
network_status_name:
description: 网络状态名称
type: string
package_id:
description: 套餐ID
minimum: 0
nullable: true
type: integer
package_name:
description: 套餐名称
type: string
status:
description: 状态
type: integer
status_name:
description: 状态名称
type: string
virtual_no:
description: 卡虚拟号
type: string
type: object
DtoEnterpriseCardPageResult:
properties:
items:
description: 卡列表
items:
$ref: '#/components/schemas/DtoEnterpriseCardItem'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoEnterpriseDeviceItem:
properties:
authorized_at:
description: 授权时间
format: date-time
type: string
card_count:
description: 绑定卡数量
type: integer
device_id:
description: 设备ID
minimum: 0
type: integer
device_model:
description: 设备型号
type: string
device_name:
description: 设备名称
type: string
virtual_no:
description: 设备虚拟号
type: string
type: object
DtoEnterpriseDeviceListResp:
properties:
items:
description: 设备列表
items:
$ref: '#/components/schemas/DtoEnterpriseDeviceItem'
nullable: true
type: array
total:
description: 总数
type: integer
type: object
DtoEnterpriseItem:
properties:
address:
description: 详细地址
type: string
business_license:
description: 营业执照号
type: string
city:
description: 城市
type: string
contact_name:
description: 联系人姓名
type: string
contact_phone:
description: 联系人电话
type: string
created_at:
description: 创建时间
type: string
district:
description: 区县
type: string
enterprise_code:
description: 企业编号
type: string
enterprise_name:
description: 企业名称
type: string
id:
description: 企业ID
minimum: 0
type: integer
legal_person:
description: 法人代表
type: string
login_phone:
description: 登录手机号
type: string
owner_shop_id:
description: 归属店铺ID
minimum: 0
nullable: true
type: integer
owner_shop_name:
description: 归属店铺名称
type: string
province:
description: 省份
type: string
status:
description: 状态(0=禁用, 1=启用)
type: integer
status_name:
description: 状态名称
type: string
type: object
DtoEnterprisePageResult:
properties:
items:
description: 企业列表
items:
$ref: '#/components/schemas/DtoEnterpriseItem'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoExchangeCancelParams:
properties:
remark:
description: 取消备注
maxLength: 500
nullable: true
type: string
type: object
DtoExchangeListResponse:
properties:
items:
description: 换货单列表
items:
$ref: '#/components/schemas/DtoExchangeOrderResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoExchangeOrderResponse:
properties:
completed_at:
description: 换货完成时间
format: date-time
nullable: true
type: string
created_at:
description: 创建时间
format: date-time
type: string
creator:
description: 创建人ID
minimum: 0
type: integer
deleted_at:
description: 删除时间
format: date-time
nullable: true
type: string
exchange_no:
description: 换货单号
type: string
exchange_reason:
description: 换货原因
type: string
express_company:
description: 快递公司
type: string
express_no:
description: 快递单号
type: string
flow_type:
description: 换货流程类型 (shipping:物流换货, direct:直接换货)
type: string
flow_type_name:
description: 换货流程类型名称
type: string
id:
description: 换货单ID
minimum: 0
type: integer
migrate_data:
description: 是否执行全量迁移
type: boolean
migration_balance:
description: 迁移转移金额(分)
type: integer
migration_completed:
description: 迁移是否已完成
type: boolean
new_asset_id:
description: 新资产ID
minimum: 0
nullable: true
type: integer
new_asset_identifier:
description: 新资产标识符
type: string
new_asset_type:
description: 新资产类型 (iot_card:物联网卡, device:设备)
type: string
old_asset_id:
description: 旧资产ID
minimum: 0
type: integer
old_asset_identifier:
description: 旧资产标识符
type: string
old_asset_type:
description: 旧资产类型 (iot_card:物联网卡, device:设备)
type: string
recipient_address:
description: 收货地址
type: string
recipient_name:
description: 收件人姓名
type: string
recipient_phone:
description: 收件人电话
type: string
remark:
description: 备注
nullable: true
type: string
shipped_at:
description: 发货时间
format: date-time
nullable: true
type: string
shop_id:
description: 所属店铺ID
minimum: 0
nullable: true
type: integer
status:
description: 换货状态 (1:待填写信息, 2:待发货, 3:已发货待确认, 4:已完成, 5:已取消)
type: integer
status_name:
description: 换货状态名称(中文)
type: string
status_text:
description: 换货状态文本
type: string
updated_at:
description: 更新时间
format: date-time
type: string
updater:
description: 更新人ID
minimum: 0
type: integer
type: object
DtoExchangeShipParams:
properties:
express_company:
description: 快递公司
maxLength: 100
minLength: 1
type: string
express_no:
description: 快递单号
maxLength: 100
minLength: 1
type: string
migrate_data:
description: 是否执行全量迁移 (true:执行, false:不执行)
type: boolean
new_identifier:
description: 新资产标识符(ICCID/虚拟号/IMEI/SN)
maxLength: 100
minLength: 1
type: string
required:
- express_company
- express_no
- new_identifier
- migrate_data
type: object
DtoExportTaskDetailResponse:
properties:
cancel_requested:
description: 是否已请求取消
type: boolean
completed_at:
description: 完成时间
format: date-time
nullable: true
type: string
created_at:
description: 创建时间
format: date-time
type: string
creator_enterprise_id:
description: 创建人企业ID
minimum: 0
nullable: true
type: integer
creator_shop_id:
description: 创建人店铺ID
minimum: 0
nullable: true
type: integer
creator_user_id:
description: 创建人用户ID
minimum: 0
type: integer
creator_user_type:
description: 创建人用户类型 (2:平台, 3:代理, 4:企业)
type: integer
download_expires_at:
description: 下载链接过期时间
format: date-time
nullable: true
type: string
download_url:
description: 下载链接(仅已完成任务返回)
type: string
error_message:
description: 错误信息
type: string
failed_shards:
description: 失败分片数
type: integer
file_key:
description: 导出文件Key
type: string
format:
description: 导出格式 (xlsx:Excel, csv:CSV)
type: string
id:
description: 任务ID
minimum: 0
type: integer
processed_rows:
description: 已处理行数
type: integer
progress:
description: 任务进度(0-100)
type: integer
scene:
description: 导出场景 (device:设备, iot_card:IoT卡, order:订单)
type: string
started_at:
description: 开始处理时间
format: date-time
nullable: true
type: string
status:
description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:已失败, 5:已取消)
type: integer
status_name:
description: 任务状态名称(中文)
type: string
success_shards:
description: 成功分片数
type: integer
task_no:
description: 任务编号
type: string
total_rows:
description: 总行数
type: integer
total_shards:
description: 总分片数
type: integer
type: object
DtoExportTaskItem:
properties:
cancel_requested:
description: 是否已请求取消
type: boolean
completed_at:
description: 完成时间
format: date-time
nullable: true
type: string
created_at:
description: 创建时间
format: date-time
type: string
creator_enterprise_id:
description: 创建人企业ID
minimum: 0
nullable: true
type: integer
creator_shop_id:
description: 创建人店铺ID
minimum: 0
nullable: true
type: integer
creator_user_id:
description: 创建人用户ID
minimum: 0
type: integer
creator_user_type:
description: 创建人用户类型 (2:平台, 3:代理, 4:企业)
type: integer
error_message:
description: 错误信息
type: string
failed_shards:
description: 失败分片数
type: integer
file_key:
description: 导出文件Key
type: string
format:
description: 导出格式 (xlsx:Excel, csv:CSV)
type: string
id:
description: 任务ID
minimum: 0
type: integer
processed_rows:
description: 已处理行数
type: integer
progress:
description: 任务进度(0-100)
type: integer
scene:
description: 导出场景 (device:设备, iot_card:IoT卡, order:订单)
type: string
started_at:
description: 开始处理时间
format: date-time
nullable: true
type: string
status:
description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:已失败, 5:已取消)
type: integer
status_name:
description: 任务状态名称(中文)
type: string
success_shards:
description: 成功分片数
type: integer
task_no:
description: 任务编号
type: string
total_rows:
description: 总行数
type: integer
total_shards:
description: 总分片数
type: integer
type: object
DtoFailedDeviceItem:
properties:
reason:
description: 失败原因
type: string
virtual_no:
description: 设备虚拟号
type: string
type: object
DtoFailedItem:
properties:
iccid:
description: ICCID
type: string
reason:
description: 失败原因
type: string
type: object
DtoGenerationOrders:
properties:
asset_type:
description: 资产类型:card 或 device
type: string
generation:
description: 世代编号
type: integer
identifier:
description: 资产标识符
type: string
items:
description: 订单列表
items:
$ref: '#/components/schemas/DtoAssetOrderItem'
nullable: true
type: array
page:
description: 当前页码
type: integer
page_size:
description: 每页条数
type: integer
total:
description: 总订单数
type: integer
type: object
DtoGetBatchDownloadURLsRequest:
properties:
file_keys:
description: 文件路径标识列表,最多 50 个
items:
type: string
minLength: 1
nullable: true
type: array
required:
- file_keys
type: object
DtoGetBatchDownloadURLsResponse:
properties:
expires_in:
description: URL 有效期(秒)
type: integer
urls:
additionalProperties:
type: string
description: file_key 到预签名下载 URL 的映射
nullable: true
type: object
type: object
DtoGetUploadURLRequest:
properties:
content_type:
description: 文件 MIME 类型(如:text/csv),留空则自动推断
maxLength: 100
type: string
file_name:
description: 文件名(如:cards.csv)
maxLength: 255
minLength: 1
type: string
purpose:
description: 文件用途 (iot_import:ICCID导入, export:数据导出, attachment:附件)
type: string
required:
- file_name
- purpose
type: object
DtoGetUploadURLResponse:
properties:
expires_in:
description: URL 有效期(秒)
type: integer
file_key:
description: 文件路径标识,上传成功后用于调用业务接口
type: string
upload_url:
description: 预签名上传 URL,使用 PUT 方法上传文件
type: string
type: object
DtoGrantCommissionTierItem:
properties:
amount:
description: 该代理在此档位的佣金金额(分)
type: integer
dimension:
description: 统计维度(sales_count:销售量, sales_amount:销售额),来自 PackageSeries 全局配置,响应中只读
type: string
operator:
description: 比较运算符(>、>=、<、<=),响应中从 PackageSeries 合并,请求中不传
type: string
stat_scope:
description: 统计范围(self:仅自己, self_and_sub:自己+下级),来自 PackageSeries 全局配置,响应中只读
type: string
threshold:
description: 阈值(与 PackageSeries 全局配置对应)
type: integer
type: object
DtoGrantPackageItem:
properties:
cost_price:
description: 成本价(分)
type: integer
package_id:
description: 套餐ID
minimum: 0
type: integer
remove:
description: 是否删除该套餐授权(true=删除)
nullable: true
type: boolean
type: object
DtoImportDeviceRequest:
properties:
batch_no:
description: 批次号
maxLength: 100
type: string
file_key:
description: 对象存储文件路径(通过 /storage/upload-url 获取)
maxLength: 500
minLength: 1
type: string
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名),默认 after_order
type: string
required:
- file_key
type: object
DtoImportDeviceResponse:
properties:
message:
description: 提示信息
type: string
task_id:
description: 导入任务ID
minimum: 0
type: integer
task_no:
description: 任务编号
type: string
type: object
DtoImportIotCardRequest:
properties:
batch_no:
description: 批次号
maxLength: 100
type: string
card_category:
description: 卡业务类型 (normal:普通卡, industry:行业卡),默认 normal
type: string
carrier_id:
description: 运营商ID
minimum: 1
type: integer
file_key:
description: 对象存储文件路径(通过 /storage/upload-url 获取)
maxLength: 500
minLength: 1
type: string
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名),默认 after_order
type: string
required:
- carrier_id
- file_key
type: object
DtoImportIotCardResponse:
properties:
message:
description: 提示信息
type: string
task_id:
description: 导入任务ID
minimum: 0
type: integer
task_no:
description: 任务编号
type: string
type: object
DtoImportResultItemDTO:
properties:
iccid:
description: ICCID
type: string
line:
description: 行号
type: integer
msisdn:
description: 接入号
type: string
reason:
description: 原因
type: string
type: object
DtoImportTaskDetailResponse:
properties:
batch_no:
description: 批次号
type: string
card_category:
description: 卡业务类型 (normal:普通卡, industry:行业卡)
type: string
carrier_id:
description: 运营商ID
minimum: 0
type: integer
carrier_name:
description: 运营商名称
type: string
carrier_type:
description: 运营商类型 (CMCC:中国移动, CUCC:中国联通, CTCC:中国电信, CBN:中国广电)
type: string
completed_at:
description: 完成时间
format: date-time
nullable: true
type: string
created_at:
description: 创建时间
format: date-time
type: string
error_message:
description: 错误信息
type: string
fail_count:
description: 失败数
type: integer
failed_items:
description: 失败记录详情
items:
$ref: '#/components/schemas/DtoImportResultItemDTO'
nullable: true
type: array
file_name:
description: 文件名
type: string
id:
description: 任务ID
minimum: 0
type: integer
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
type: string
skip_count:
description: 跳过数
type: integer
skipped_items:
description: 跳过记录详情
items:
$ref: '#/components/schemas/DtoImportResultItemDTO'
nullable: true
type: array
started_at:
description: 开始处理时间
format: date-time
nullable: true
type: string
status:
description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:失败)
type: integer
status_text:
description: 任务状态文本
type: string
success_count:
description: 成功数
type: integer
task_no:
description: 任务编号
type: string
total_count:
description: 总数
type: integer
type: object
DtoImportTaskResponse:
properties:
batch_no:
description: 批次号
type: string
card_category:
description: 卡业务类型 (normal:普通卡, industry:行业卡)
type: string
carrier_id:
description: 运营商ID
minimum: 0
type: integer
carrier_name:
description: 运营商名称
type: string
carrier_type:
description: 运营商类型 (CMCC:中国移动, CUCC:中国联通, CTCC:中国电信, CBN:中国广电)
type: string
completed_at:
description: 完成时间
format: date-time
nullable: true
type: string
created_at:
description: 创建时间
format: date-time
type: string
error_message:
description: 错误信息
type: string
fail_count:
description: 失败数
type: integer
file_name:
description: 文件名
type: string
id:
description: 任务ID
minimum: 0
type: integer
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
type: string
skip_count:
description: 跳过数
type: integer
started_at:
description: 开始处理时间
format: date-time
nullable: true
type: string
status:
description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:失败)
type: integer
status_text:
description: 任务状态文本
type: string
success_count:
description: 成功数
type: integer
task_no:
description: 任务编号
type: string
total_count:
description: 总数
type: integer
type: object
DtoJSSDKConfigResponse:
properties:
app_id:
description: 公众号 AppID
type: string
nonce_str:
description: 随机字符串
type: string
signature:
description: 签名(SHA1)
type: string
timestamp:
description: 时间戳(秒)
type: integer
type: object
DtoLinkedPackageInfo:
properties:
force_recharge_amount:
description: 强制充值金额(分)
type: integer
package_names:
description: 套餐名称列表
items:
type: string
nullable: true
type: array
total_package_amount:
description: 套餐总金额(分)
type: integer
wallet_credit:
description: 钱包抵扣金额(分)
type: integer
type: object
DtoListAssetAllocationRecordResponse:
properties:
items:
description: 分配记录列表
items:
$ref: '#/components/schemas/DtoAssetAllocationRecordResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoListDeviceCardsResponse:
properties:
bindings:
description: 绑定列表
items:
$ref: '#/components/schemas/DtoDeviceCardBindingResponse'
nullable: true
type: array
type: object
DtoListDeviceImportTaskResponse:
properties:
items:
description: 任务列表
items:
$ref: '#/components/schemas/DtoDeviceImportTaskResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoListDeviceResponse:
properties:
items:
description: 设备列表
items:
$ref: '#/components/schemas/DtoDeviceResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoListExportTaskResponse:
properties:
items:
description: 任务列表
items:
$ref: '#/components/schemas/DtoExportTaskItem'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoListImportTaskResponse:
properties:
items:
description: 任务列表
items:
$ref: '#/components/schemas/DtoImportTaskResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoListStandaloneIotCardResponse:
properties:
items:
description: 单卡列表
items:
$ref: '#/components/schemas/DtoStandaloneIotCardResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoLoginRequest:
properties:
device:
type: string
password:
type: string
username:
type: string
type: object
DtoLoginResponse:
properties:
access_token:
type: string
buttons:
description: 按钮权限码
items:
type: string
nullable: true
type: array
expires_in:
type: integer
menus:
description: 菜单树
items:
$ref: '#/components/schemas/DtoMenuNode'
nullable: true
type: array
permissions:
description: 所有权限码(向后兼容)
items:
type: string
nullable: true
type: array
refresh_token:
type: string
user:
$ref: '#/components/schemas/DtoUserInfo'
type: object
DtoLogoutResponse:
properties:
success:
description: 是否成功
type: boolean
type: object
DtoMainWalletTransactionItem:
properties:
amount:
description: 变动金额(分,正数为入账,负数为扣款)
type: integer
asset_id:
description: 资产ID(仅套餐扣款流水有值)
minimum: 0
type: integer
asset_identifier:
description: 资产标识快照(ICCID、IMEI或虚拟号,仅套餐扣款流水有值)
type: string
asset_type:
description: 资产类型(iot_card:物联网卡, device:设备,仅套餐扣款流水有值)
type: string
balance_after:
description: 变动后余额(分)
type: integer
balance_before:
description: 变动前余额(分)
type: integer
created_at:
description: 流水时间
type: string
id:
description: 流水记录ID
minimum: 0
type: integer
remark:
description: 备注(可为空)
type: string
transaction_subtype:
description: 交易子类型(可为空)
type: string
transaction_type:
description: 交易类型(recharge:充值入账, deduct:套餐扣款, refund:退款)
type: string
type: object
DtoMainWalletTransactionListResponse:
properties:
items:
description: 流水记录列表
items:
$ref: '#/components/schemas/DtoMainWalletTransactionItem'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoManageGrantPackagesParams:
properties:
packages:
description: 套餐操作列表
items:
$ref: '#/components/schemas/DtoGrantPackageItem'
nullable: true
type: array
type: object
DtoManualTriggerLogListResp:
properties:
items:
description: 日志列表
items:
$ref: '#/components/schemas/DtoManualTriggerLogResp'
nullable: true
type: array
page:
description: 当前页
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoManualTriggerLogResp:
properties:
completed_at:
description: 完成时间
format: date-time
nullable: true
type: string
failed_count:
description: 失败数
type: integer
id:
description: 日志ID
minimum: 0
type: integer
processed_count:
description: 已处理数
type: integer
status:
description: 状态:pending/processing/completed/cancelled
type: string
status_name:
description: 状态名称
type: string
success_count:
description: 成功数
type: integer
task_type:
description: 任务类型
type: string
task_type_name:
description: 任务类型名称
type: string
total_count:
description: 总卡数
type: integer
trigger_type:
description: 触发类型:single/batch/by_condition
type: string
trigger_type_name:
description: 触发类型名称
type: string
triggered_at:
description: 触发时间
format: date-time
type: string
triggered_by:
description: 触发人ID
minimum: 0
type: integer
type: object
DtoManualTriggerStatusResp:
properties:
queue_sizes:
additionalProperties:
type: integer
description: 各队列大小
nullable: true
type: object
running_tasks:
description: 正在运行的任务
items:
$ref: '#/components/schemas/DtoManualTriggerLogResp'
nullable: true
type: array
type: object
DtoMenuNode:
properties:
children:
description: 子菜单
items:
$ref: '#/components/schemas/DtoMenuNode'
nullable: true
type: array
id:
description: 权限ID
minimum: 0
type: integer
name:
description: 菜单名称
type: string
perm_code:
description: 权限码
type: string
sort:
description: 排序值
type: integer
url:
description: 路由路径
type: string
type: object
DtoMiniappLoginRequest:
properties:
asset_token:
description: A1返回的资产令牌
type: string
avatar_url:
description: 用户头像URL(前端授权后传入)
type: string
code:
description: 小程序登录凭证
type: string
nickname:
description: 用户昵称(前端授权后传入)
type: string
required:
- code
- asset_token
type: object
DtoOneTimeCommissionTierDTO:
properties:
amount:
description: 佣金金额(分)
minimum: 0
type: integer
dimension:
description: 统计维度 (sales_count:销量, sales_amount:销售额)
type: string
operator:
description: 阈值比较运算符(>、>=、<、<=),空值时计算引擎默认 >=
type: string
stat_scope:
description: 统计范围 (self:仅自己, self_and_sub:自己+下级)
type: string
threshold:
description: 达标阈值
minimum: 0
type: integer
required:
- dimension
- threshold
- amount
type: object
DtoOperationPasswordStatusResponse:
properties:
is_set:
description: 操作密码是否已设置
type: boolean
type: object
DtoOrderItemResponse:
properties:
amount:
description: 小计金额(分)
type: integer
id:
description: 明细ID
minimum: 0
type: integer
package_id:
description: 套餐ID
minimum: 0
type: integer
package_name:
description: 套餐名称
type: string
package_type:
description: 套餐类型快照 (formal:正式套餐, addon:加油包)
nullable: true
type: string
quantity:
description: 数量
type: integer
unit_price:
description: 单价(分)
type: integer
type: object
DtoOrderListResponse:
properties:
items:
description: 订单列表
items:
$ref: '#/components/schemas/DtoOrderResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoOrderResponse:
properties:
actual_paid_amount:
description: 实际支付金额(分)
nullable: true
type: integer
asset_identifier:
description: 下单时资产的标识符快照(ICCID 或 VirtualNo)
type: string
asset_type:
description: 资产类型 (card:单卡, device:设备)
type: string
buyer_id:
description: 买家ID
minimum: 0
type: integer
buyer_nickname:
description: 买家昵称快照(个人客户下单时记录)
nullable: true
type: string
buyer_phone:
description: 买家手机号快照(个人客户下单时记录)
nullable: true
type: string
buyer_type:
description: 买家类型 (personal:个人客户, agent:代理商)
type: string
commission_config_version:
description: 佣金配置版本
type: integer
commission_result:
description: 佣金业务结果 (0:未知, 1:有佣金, 2:无佣金, 3:链路异常)
type: integer
commission_result_name:
description: 佣金业务结果名称(中文)
type: string
commission_status:
description: 佣金流程状态 (1:待计算, 2:已完成, 3:待人工处理)
type: integer
commission_status_name:
description: 佣金流程状态名称(中文)
type: string
created_at:
description: 创建时间
format: date-time
type: string
device_id:
description: 设备ID
minimum: 0
nullable: true
type: integer
expires_at:
description: 订单过期时间
format: date-time
nullable: true
type: string
id:
description: 订单ID
minimum: 0
type: integer
iot_card_id:
description: IoT卡ID
minimum: 0
nullable: true
type: integer
is_expired:
description: 是否已过期
type: boolean
is_purchase_on_behalf:
description: 是否为代购订单
type: boolean
is_purchased_by_parent:
description: 是否由上级代理购买
type: boolean
items:
description: 订单明细列表
items:
$ref: '#/components/schemas/DtoOrderItemResponse'
nullable: true
type: array
operator_id:
description: 操作者账号ID(真实发起操作的账号/主体ID)
minimum: 0
nullable: true
type: integer
operator_name:
description: 操作者名称(按账号语义展示)
type: string
operator_type:
description: 操作者账号类型 (platform:平台, agent:代理, enterprise:企业, personal_customer:个人客户)
type: string
order_no:
description: 订单号
type: string
order_type:
description: 订单类型 (single_card:单卡购买, device:设备购买)
type: string
paid_at:
description: 支付时间
format: date-time
nullable: true
type: string
payment_method:
description: 支付方式 (wallet:钱包支付, wechat:微信支付, alipay:支付宝支付, offline:线下支付)
type: string
payment_status:
description: 支付状态 (1:待支付, 2:已支付, 3:已取消, 4:已退款)
type: integer
payment_status_text:
description: 支付状态文本
type: string
payment_voucher_key:
description: 线下支付凭证对象存储file_key(仅线下支付订单有值)
type: string
purchase_remark:
description: 购买备注
type: string
purchase_role:
description: 订单角色 (self_purchase:自己购买, purchased_by_parent:上级代理购买, purchased_by_platform:平台代购, purchase_for_subordinate:给下级购买)
type: string
seller_shop_id:
description: 销售店铺ID(业务归属字段)
minimum: 0
nullable: true
type: integer
seller_shop_name:
description: 销售店铺名称(业务归属展示)
type: string
total_amount:
description: 订单总金额(分)
type: integer
updated_at:
description: 更新时间
format: date-time
type: string
type: object
DtoPackagePageResult:
properties:
items:
description: 套餐列表
items:
$ref: '#/components/schemas/DtoPackageResponse'
nullable: true
type: array
page:
description: 当前页
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoPackageResponse:
properties:
calendar_type:
description: 套餐周期类型 (natural_month:自然月, by_day:按天)
type: string
cost_price:
description: 成本价(分)
type: integer
created_at:
description: 创建时间
type: string
current_commission_rate:
description: 当前返佣比例(仅代理用户可见)
type: string
data_reset_cycle:
description: 流量重置周期 (daily:每日, monthly:每月, yearly:每年, none:不重置)
type: string
duration_days:
description: 套餐天数(calendar_type=by_day时有值)
nullable: true
type: integer
duration_months:
description: 套餐时长(月数)
type: integer
effective_retail_price:
description: 生效零售价(分,仅销售链路展示使用)
nullable: true
type: integer
enable_virtual_data:
description: 是否启用虚流量
type: boolean
expiry_base:
description: 到期时间基准 (from_activation:实名激活时起算, from_purchase:购买时起算)
type: string
id:
description: 套餐ID
minimum: 0
type: integer
is_gift:
description: 是否赠送套餐
type: boolean
one_time_commission_amount:
description: 一次性佣金金额(分,代理视角)
nullable: true
type: integer
package_code:
description: 套餐编码
type: string
package_name:
description: 套餐名称
type: string
package_type:
description: 套餐类型 (formal:正式套餐, addon:附加套餐)
type: string
price_config_status:
description: 价格配置状态 (0:未配置, 1:赠送0价, 2:已配置非0)
type: integer
price_config_status_name:
description: 价格配置状态名称(中文)
type: string
profit_margin:
description: 利润空间(分,仅代理用户可见)
nullable: true
type: integer
real_data_mb:
description: 真流量额度(MB)
type: integer
retail_price:
description: 代理零售价原始值(分,仅代理用户可见,未配置时为空)
nullable: true
type: integer
retail_price_config_status:
description: 代理零售价配置状态 (0:未配置, 1:赠送0价, 2:已配置非0)
nullable: true
type: integer
series_id:
description: 套餐系列ID
minimum: 0
nullable: true
type: integer
series_name:
description: 套餐系列名称
nullable: true
type: string
shelf_status:
description: 上架状态 (1:上架, 2:下架)
type: integer
shelf_status_name:
description: 上架状态名称(中文)
type: string
status:
description: 状态 (0:禁用, 1:启用)
type: integer
status_name:
description: 状态名称(中文)
type: string
suggested_retail_price:
description: 建议售价原始值(分,未配置时为空)
nullable: true
type: integer
tier_info:
$ref: '#/components/schemas/DtoCommissionTierInfo'
updated_at:
description: 更新时间
type: string
virtual_data_mb:
description: 虚流量额度(MB)
type: integer
virtual_ratio:
description: 虚流量比例(real_data_mb/virtual_data_mb),启用虚流量时计算,否则为1.0
type: number
type: object
DtoPackageSeriesPageResult:
properties:
items:
description: 套餐系列列表
items:
$ref: '#/components/schemas/DtoPackageSeriesResponse'
nullable: true
type: array
page:
description: 当前页
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoPackageSeriesResponse:
properties:
created_at:
description: 创建时间
type: string
description:
description: 描述
type: string
enable_one_time_commission:
description: 是否启用一次性佣金
type: boolean
id:
description: 系列ID
minimum: 0
type: integer
one_time_commission_config:
$ref: '#/components/schemas/DtoSeriesOneTimeCommissionConfigDTO'
series_code:
description: 系列编码
type: string
series_name:
description: 系列名称
type: string
status:
description: 状态 (0:禁用, 1:启用)
type: integer
updated_at:
description: 更新时间
type: string
type: object
DtoPackageUsageDailyRecordResponse:
properties:
cumulative_usage_mb:
description: 截止当日的累计流量(MB)
type: integer
daily_usage_mb:
description: 当日流量使用量(MB)
type: integer
date:
description: 日期
type: string
type: object
DtoPackageUsageDetailResponse:
properties:
package_name:
description: 套餐名称
type: string
package_usage_id:
description: 套餐使用记录ID
minimum: 0
type: integer
records:
description: 流量日记录列表
items:
$ref: '#/components/schemas/DtoPackageUsageDailyRecordResponse'
nullable: true
type: array
total_usage_mb:
description: 总使用流量(MB)
type: integer
type: object
DtoPermissionPageResult:
properties:
items:
description: 权限列表
items:
$ref: '#/components/schemas/DtoPermissionResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoPermissionResponse:
properties:
available_for_role_types:
description: 可用角色类型 (1:平台角色, 2:客户角色)
type: string
created_at:
description: 创建时间
type: string
creator:
description: 创建人ID
minimum: 0
type: integer
id:
description: 权限ID
minimum: 0
type: integer
parent_id:
description: 父权限ID
minimum: 0
nullable: true
type: integer
perm_code:
description: 权限编码
type: string
perm_name:
description: 权限名称
type: string
perm_type:
description: 权限类型 (1:菜单, 2:按钮)
type: integer
platform:
description: 适用端口 (all:全部, web:Web后台, h5:H5端)
type: string
sort:
description: 排序值
type: integer
status:
description: 状态 (0:禁用, 1:启用)
type: integer
updated_at:
description: 更新时间
type: string
updater:
description: 更新人ID
minimum: 0
type: integer
url:
description: 请求路径
type: string
type: object
DtoPermissionTreeNode:
properties:
available_for_role_types:
description: 可用角色类型 (1:平台角色, 2:客户角色)
type: string
children:
description: 子权限列表
items:
$ref: '#/components/schemas/DtoPermissionTreeNode'
type: array
id:
description: 权限ID
minimum: 0
type: integer
perm_code:
description: 权限编码
type: string
perm_name:
description: 权限名称
type: string
perm_type:
description: 权限类型 (1:菜单, 2:按钮)
type: integer
platform:
description: 适用端口 (all:全部, web:Web后台, h5:H5端)
type: string
sort:
description: 排序值
type: integer
status:
description: 状态 (0:禁用, 1:启用)
type: integer
url:
description: 请求路径
type: string
type: object
DtoPollingAlertHistoryListResp:
properties:
items:
description: 告警历史列表
items:
$ref: '#/components/schemas/DtoPollingAlertHistoryResp'
nullable: true
type: array
page:
description: 当前页
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoPollingAlertHistoryResp:
properties:
alert_level:
description: 告警级别
type: string
created_at:
description: 触发时间
format: date-time
type: string
current_value:
description: 触发时的值
type: number
id:
description: 历史ID
minimum: 0
type: integer
message:
description: 告警消息
type: string
metric_type:
description: 指标类型
type: string
rule_id:
description: 规则ID
minimum: 0
type: integer
rule_name:
description: 规则名称
type: string
task_type:
description: 任务类型
type: string
threshold:
description: 阈值
type: number
type: object
DtoPollingAlertRuleListResp:
properties:
items:
description: 告警规则列表
items:
$ref: '#/components/schemas/DtoPollingAlertRuleResp'
nullable: true
type: array
type: object
DtoPollingAlertRuleResp:
properties:
alert_level:
description: 告警级别
type: string
cooldown_minutes:
description: 冷却时间(分钟)
type: integer
created_at:
description: 创建时间
format: date-time
type: string
id:
description: 规则ID
minimum: 0
type: integer
metric_type:
description: 指标类型
type: string
metric_type_name:
description: 指标类型名称
type: string
notify_channels:
description: 通知渠道
type: string
operator:
description: 比较运算符
type: string
rule_name:
description: 规则名称
type: string
status:
description: 状态 (0:禁用, 1:启用)
type: integer
task_type:
description: 任务类型
type: string
task_type_name:
description: 任务类型名称
type: string
threshold:
description: 阈值
type: number
updated_at:
description: 更新时间
format: date-time
type: string
type: object
DtoPollingConcurrencyListResp:
properties:
items:
description: 并发配置列表
items:
$ref: '#/components/schemas/DtoPollingConcurrencyResp'
nullable: true
type: array
type: object
DtoPollingConcurrencyResp:
properties:
available:
description: 可用并发数
type: integer
current:
description: 当前并发数
type: integer
max_concurrency:
description: 最大并发数
type: integer
task_type:
description: 任务类型
type: string
task_type_name:
description: 任务类型名称
type: string
utilization:
description: 使用率(百分比)
type: number
type: object
DtoPollingConfigPageResult:
properties:
items:
description: 配置列表
items:
$ref: '#/components/schemas/DtoPollingConfigResponse'
nullable: true
type: array
page:
description: 当前页
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoPollingConfigResponse:
properties:
card_category:
description: 卡业务类型 (normal:普通卡, industry:行业卡)
type: string
card_condition:
description: 卡状态条件 (not_real_name:未实名, real_name:已实名, activated:已激活, suspended:已停用)
type: string
card_status_check_interval:
description: 卡状态检查间隔(秒),NULL表示不检查
nullable: true
type: integer
carddata_check_interval:
description: 流量检查间隔(秒),NULL表示不检查
nullable: true
type: integer
carrier_id:
description: 运营商ID
minimum: 0
nullable: true
type: integer
config_name:
description: 配置名称
type: string
created_at:
description: 创建时间
type: string
description:
description: 配置说明
type: string
id:
description: 配置ID
minimum: 0
type: integer
package_check_interval:
description: 套餐检查间隔(秒),NULL表示不检查
nullable: true
type: integer
priority:
description: 优先级(数字越小优先级越高)
type: integer
protect_check_interval:
description: 保护期一致性检查间隔(秒),NULL表示不检查
nullable: true
type: integer
realname_check_interval:
description: 实名检查间隔(秒),NULL表示不检查
nullable: true
type: integer
status:
description: 状态 (1:启用, 0:禁用)
type: integer
updated_at:
description: 更新时间
type: string
type: object
DtoPollingInitProgressResp:
properties:
estimated_eta:
description: 预计完成时间
type: string
initialized_cards:
description: 已初始化卡数
type: integer
is_complete:
description: 是否完成
type: boolean
progress:
description: 进度百分比(0-100)
type: number
started_at:
description: 开始时间
format: date-time
type: string
total_cards:
description: 总卡数
type: integer
type: object
DtoPollingOverviewResp:
properties:
carddata_queue_size:
description: 流量检查队列大小
type: integer
init_progress:
description: 初始化进度(0-100)
type: number
initialized_cards:
description: 已初始化卡数
type: integer
is_initializing:
description: 是否正在初始化
type: boolean
package_queue_size:
description: 套餐检查队列大小
type: integer
realname_queue_size:
description: 实名检查队列大小
type: integer
total_cards:
description: 总卡数
type: integer
type: object
DtoPollingQueueStatusListResp:
properties:
items:
description: 队列状态列表
items:
$ref: '#/components/schemas/DtoPollingQueueStatusResp'
nullable: true
type: array
type: object
DtoPollingQueueStatusResp:
properties:
avg_wait_time_s:
description: 平均等待时间(秒)
type: number
due_count:
description: 到期待处理数
type: integer
manual_pending:
description: 手动触发待处理数
type: integer
queue_size:
description: 队列大小
type: integer
task_type:
description: 任务类型
type: string
task_type_name:
description: 任务类型名称
type: string
type: object
DtoPollingTaskStatsListResp:
properties:
items:
description: 任务统计列表
items:
$ref: '#/components/schemas/DtoPollingTaskStatsResp'
nullable: true
type: array
type: object
DtoPollingTaskStatsResp:
properties:
avg_duration_ms:
description: 平均耗时(毫秒)
type: number
failure_count_1h:
description: 1小时失败数
type: integer
success_count_1h:
description: 1小时成功数
type: integer
success_rate:
description: 成功率(0-100)
type: number
task_type:
description: 任务类型
type: string
task_type_name:
description: 任务类型名称
type: string
total_count_1h:
description: 1小时总数
type: integer
type: object
DtoPreviousGenerationOrders:
properties:
asset_type:
description: 前代资产类型:card 或 device
type: string
exchange_no:
description: 换货单号
type: string
exchanged_at:
description: 换货完成时间
format: date-time
type: string
generation:
description: 前代世代编号
type: integer
identifier:
description: 前代资产标识符
type: string
items:
description: 前代订单列表(最多20条)
items:
$ref: '#/components/schemas/DtoAssetOrderItem'
nullable: true
type: array
total:
description: 前代总订单数
type: integer
type: object
DtoPriceAdjustment:
properties:
type:
description: 调整类型 (fixed:固定金额, percent:百分比)
type: string
value:
description: 调整值(分或千分比)
type: integer
required:
- type
- value
type: object
DtoPurchaseCheckRequest:
properties:
order_type:
description: 订单类型 (single_card:单卡购买, device:设备购买)
type: string
package_ids:
description: 套餐ID列表
items:
minimum: 0
type: integer
maxItems: 10
minItems: 1
nullable: true
type: array
resource_id:
description: 资源ID (IoT卡ID或设备ID)
minimum: 0
type: integer
required:
- order_type
- resource_id
- package_ids
type: object
DtoPurchaseCheckResponse:
properties:
actual_payment:
description: 实际支付金额(分)
type: integer
force_recharge_amount:
description: 强充金额(分)
type: integer
message:
description: 提示信息
type: string
need_force_recharge:
description: 是否需要强充
type: boolean
total_package_amount:
description: 套餐总价(分)
type: integer
wallet_credit:
description: 钱包到账金额(分)
type: integer
type: object
DtoRealnimeLinkResponse:
properties:
card_info:
$ref: '#/components/schemas/DtoCardInfoBrief'
expire_at:
description: 过期时间
nullable: true
type: string
realname_mode:
description: 实名模式 (none:无需实名, template:模板实名, gateway:网关实名)
type: string
realname_url:
description: 实名链接
type: string
type: object
DtoRecallCardsReq:
properties:
batch_no:
description: '[filter模式] 批次号'
maxLength: 100
type: string
carrier_id:
description: '[filter模式] 运营商ID'
minimum: 0
nullable: true
type: integer
iccid:
description: '[filter模式] ICCID模糊匹配'
maxLength: 20
type: string
iccid_end:
description: '[range模式] 号段结束ICCID'
maxLength: 20
type: string
iccid_start:
description: '[range模式] 号段起始ICCID'
maxLength: 20
type: string
iccids:
description: '[list模式] 需要回收授权的ICCID列表'
items:
type: string
nullable: true
type: array
selection_type:
description: 选取模式 (list:指定ICCID列表, range:号段范围, filter:按条件过滤)
type: string
required:
- selection_type
type: object
DtoRecallCardsResp:
properties:
fail_count:
description: 失败数量
type: integer
failed_items:
description: 失败详情
items:
$ref: '#/components/schemas/DtoFailedItem'
nullable: true
type: array
recalled_devices:
description: 连带回收的设备列表
items:
$ref: '#/components/schemas/DtoRecalledDevice'
nullable: true
type: array
success_count:
description: 成功数量
type: integer
type: object
DtoRecallDevicesReq:
properties:
batch_no:
description: '[filter模式] 批次号'
maxLength: 100
type: string
device_nos:
description: '[list模式] 设备号列表(最多100个)'
items:
type: string
nullable: true
type: array
selection_type:
description: 选取模式 (list:指定设备号列表, filter:按条件过滤)
type: string
virtual_no:
description: '[filter模式] 设备虚拟号(模糊匹配)'
maxLength: 100
type: string
required:
- selection_type
type: object
DtoRecallDevicesRequest:
properties:
device_ids:
description: 设备ID列表
items:
minimum: 0
type: integer
maxItems: 100
minItems: 1
nullable: true
type: array
remark:
description: 备注
maxLength: 500
type: string
required:
- device_ids
type: object
DtoRecallDevicesResp:
properties:
fail_count:
description: 失败数量
type: integer
failed_items:
description: 失败项列表
items:
$ref: '#/components/schemas/DtoFailedDeviceItem'
nullable: true
type: array
success_count:
description: 成功数量
type: integer
type: object
DtoRecallDevicesResponse:
properties:
fail_count:
description: 失败数量
type: integer
failed_items:
description: 失败详情列表
items:
$ref: '#/components/schemas/DtoAllocationDeviceFailedItem'
nullable: true
type: array
success_count:
description: 成功数量
type: integer
type: object
DtoRecallStandaloneCardsRequest:
properties:
batch_no:
description: 批次号(selection_type=filter时可选)
maxLength: 100
type: string
carrier_id:
description: 运营商ID(selection_type=filter时可选)
minimum: 0
nullable: true
type: integer
iccid_end:
description: 结束ICCID(selection_type=range时必填)
maxLength: 20
type: string
iccid_start:
description: 起始ICCID(selection_type=range时必填)
maxLength: 20
type: string
iccids:
description: ICCID列表(selection_type=list时必填,最多1000个)
items:
type: string
nullable: true
type: array
remark:
description: 备注
maxLength: 500
type: string
selection_type:
description: 选卡方式 (list:ICCID列表, range:号段范围, filter:筛选条件)
enum:
- list
- range
- filter
type: string
required:
- selection_type
type: object
DtoRecallStandaloneCardsResponse:
properties:
allocation_no:
description: 回收单号
type: string
fail_count:
description: 失败数
type: integer
failed_items:
description: 失败项列表
items:
$ref: '#/components/schemas/DtoAllocationFailedItem'
nullable: true
type: array
success_count:
description: 成功数
type: integer
total_count:
description: 待回收总数
type: integer
type: object
DtoRecalledDevice:
properties:
card_count:
description: 卡数量
type: integer
device_id:
description: 设备ID
minimum: 0
type: integer
iccids:
description: 卡ICCID列表
items:
type: string
nullable: true
type: array
virtual_no:
description: 设备虚拟号
type: string
type: object
DtoRefreshTokenRequest:
properties:
refresh_token:
type: string
type: object
DtoRefreshTokenResponse:
properties:
access_token:
type: string
expires_in:
type: integer
type: object
DtoRefundListResponse:
properties:
items:
description: 退款申请列表
items:
$ref: '#/components/schemas/DtoRefundResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoRefundResponse:
properties:
actual_received_amount:
description: 实收金额(分)
type: integer
approved_refund_amount:
description: 审批实际退款金额(分)
nullable: true
type: integer
asset_identifier:
description: 下单时资产的标识符快照(ICCID 或 VirtualNo)
type: string
asset_reset:
description: 退款后资产处理是否完成
type: boolean
asset_type:
description: 资产类型 (card:单卡, device:设备)
type: string
commission_deducted:
description: 佣金是否已回扣
type: boolean
created_at:
description: 创建时间
type: string
creator:
description: 创建人ID
minimum: 0
type: integer
device_id:
description: 设备ID
minimum: 0
nullable: true
type: integer
id:
description: 退款申请ID
minimum: 0
type: integer
iot_card_id:
description: IoT卡ID
minimum: 0
nullable: true
type: integer
order_id:
description: 关联订单ID
minimum: 0
type: integer
order_no:
description: 订单号
type: string
package_usage_id:
description: 关联套餐使用记录ID
minimum: 0
nullable: true
type: integer
processed_at:
description: 审批时间
type: string
processor_id:
description: 审批人ID
minimum: 0
nullable: true
type: integer
refund_no:
description: 退款单号
type: string
refund_reason:
description: 退款原因
type: string
refund_voucher_key:
description: 退款凭证对象存储file_key
type: string
reject_reason:
description: 拒绝原因
type: string
remark:
description: 审批备注
type: string
requested_refund_amount:
description: 申请退款金额(分)
type: integer
shop_id:
description: 店铺ID
minimum: 0
nullable: true
type: integer
shop_name:
description: 店铺名称
type: string
status:
description: 状态 (1:待审批, 2:已通过, 3:已拒绝, 4:已退回)
type: integer
status_name:
description: 状态名称(中文)
type: string
updated_at:
description: 更新时间
type: string
updater:
description: 更新人ID
minimum: 0
type: integer
type: object
DtoRejectRefundRequest:
properties:
reject_reason:
description: 拒绝原因(必填)
maxLength: 500
type: string
required:
- reject_reason
type: object
DtoRejectWithdrawalReq:
properties:
remark:
description: 拒绝原因(必填)
maxLength: 500
type: string
required:
- remark
type: object
DtoResetPollingConcurrencyReq:
properties:
task_type:
description: 任务类型
type: string
type: object
DtoResubmitRefundRequest:
properties:
actual_received_amount:
description: 实收金额(分)
minimum: 1
nullable: true
type: integer
refund_reason:
description: 退款原因
maxLength: 1000
nullable: true
type: string
refund_voucher_key:
description: 退款凭证对象存储file_key(重新提交时可替换;历史记录缺失时必填)
maxLength: 500
nullable: true
type: string
requested_refund_amount:
description: 申请退款金额(分)
minimum: 1
nullable: true
type: integer
type: object
DtoReturnRefundRequest:
properties:
remark:
description: 退回备注
maxLength: 500
type: string
type: object
DtoRolePageResult:
properties:
items:
description: 角色列表
items:
$ref: '#/components/schemas/DtoRoleResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoRoleResponse:
properties:
created_at:
description: 创建时间
type: string
creator:
description: 创建人ID
minimum: 0
type: integer
id:
description: 角色ID
minimum: 0
type: integer
role_desc:
description: 角色描述
type: string
role_name:
description: 角色名称
type: string
role_type:
description: 角色类型 (1:平台角色, 2:客户角色)
type: integer
status:
description: 状态 (0:禁用, 1:启用)
type: integer
updated_at:
description: 更新时间
type: string
updater:
description: 更新人ID
minimum: 0
type: integer
type: object
DtoSeriesOneTimeCommissionConfigDTO:
properties:
commission_amount:
description: 固定佣金金额(分),commission_type=fixed时使用
minimum: 0
type: integer
commission_type:
description: 佣金类型 (fixed:固定, tiered:梯度)
type: string
enable:
description: 是否启用一次性佣金
type: boolean
enable_force_recharge:
description: 是否启用强充
type: boolean
force_amount:
description: 强充金额(分)
minimum: 0
type: integer
force_calc_type:
description: 强充计算类型 (fixed:固定, dynamic:动态)
type: string
threshold:
description: 触发阈值(分)
minimum: 0
type: integer
tiers:
description: 梯度配置列表,commission_type=tiered时使用
items:
$ref: '#/components/schemas/DtoOneTimeCommissionTierDTO'
nullable: true
type: array
trigger_type:
description: 触发类型 (first_recharge:首充, accumulated_recharge:累计充值)
type: string
validity_type:
description: 时效类型 (permanent:永久, fixed_date:固定日期, relative:相对时长)
type: string
validity_value:
description: 时效值(日期或月数)
type: string
type: object
DtoSetOperationPasswordRequest:
properties:
confirm_password:
description: 确认密码,必须与 password 一致
type: string
password:
description: 新操作密码,长度 6~50 位
maxLength: 50
minLength: 6
type: string
required:
- password
- confirm_password
type: object
DtoSetSpeedLimitRequest:
properties:
speed_limit:
description: 限速值(KB/s)
minimum: 1
type: integer
required:
- speed_limit
type: object
DtoSetSwitchModeRequest:
properties:
iot_card_id:
description: 目标卡资产ID(必须是系统内状态正常且已实名的卡)
minimum: 1
type: integer
switch_mode:
description: 切卡模式 (0:自动切卡, 1:手动切卡)
nullable: true
type: integer
required:
- switch_mode
- iot_card_id
type: object
DtoSetWiFiRequest:
properties:
enabled:
description: 启用状态
type: boolean
password:
description: WiFi 密码
type: string
ssid:
description: WiFi 名称
maxLength: 32
minLength: 1
type: string
required:
- ssid
type: object
DtoShopCascadeItem:
properties:
has_children:
description: 是否有下级店铺
type: boolean
id:
description: 店铺ID
minimum: 0
type: integer
shop_name:
description: 店铺名称
type: string
type: object
DtoShopCommissionRecordItem:
properties:
amount:
description: 佣金金额(分)
type: integer
balance_after:
description: 入账后佣金余额(分)
type: integer
commission_source:
description: 佣金来源 (cost_diff:成本价差, one_time:一次性佣金, tier_bonus(已废弃):梯度奖励)
type: string
created_at:
description: 佣金入账时间
type: string
iccid:
description: ICCID
type: string
id:
description: 佣金记录ID
minimum: 0
type: integer
order_created_at:
description: 订单创建时间
type: string
order_id:
description: 订单ID
minimum: 0
type: integer
order_no:
description: 订单号
type: string
seller_shop_id:
description: 销售来源店铺ID
minimum: 0
type: integer
seller_shop_name:
description: 销售来源店铺名称
type: string
status:
description: 状态 (1:已冻结, 2:解冻中, 3:已发放, 4:已失效)
type: integer
status_name:
description: 状态名称
type: string
virtual_no:
description: 设备虚拟号
type: string
type: object
DtoShopCommissionRecordPageResult:
properties:
items:
description: 佣金明细列表
items:
$ref: '#/components/schemas/DtoShopCommissionRecordItem'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoShopFundSummaryItem:
properties:
available_commission:
description: 可提现佣金(分)
type: integer
created_at:
description: 店铺创建时间
type: string
frozen_commission:
description: 冻结中佣金(分)
type: integer
main_balance:
description: 预充值钱包余额(分)
type: integer
main_frozen_balance:
description: 预充值钱包冻结余额(分,预留字段)
type: integer
phone:
description: 主账号手机号
type: string
shop_code:
description: 店铺编码
type: string
shop_id:
description: 店铺ID
minimum: 0
type: integer
shop_name:
description: 店铺名称
type: string
total_commission:
description: 累计佣金总额(分)
type: integer
unwithdraw_commission:
description: 未提现佣金(分)
type: integer
username:
description: 主账号用户名
type: string
withdrawing_commission:
description: 提现中佣金(分)
type: integer
withdrawn_commission:
description: 已提现佣金(分)
type: integer
type: object
DtoShopFundSummaryPageResult:
properties:
items:
description: 代理商资金概况列表
items:
$ref: '#/components/schemas/DtoShopFundSummaryItem'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoShopPageResult:
properties:
items:
description: 店铺列表
items:
$ref: '#/components/schemas/DtoShopResponse'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoShopResponse:
properties:
address:
description: 详细地址
type: string
city:
description: 城市
type: string
contact_name:
description: 联系人姓名
type: string
contact_phone:
description: 联系人电话
type: string
created_at:
description: 创建时间
type: string
district:
description: 区县
type: string
id:
description: 店铺ID
minimum: 0
type: integer
level:
description: 店铺层级 (1-7级)
type: integer
parent_id:
description: 上级店铺ID
minimum: 0
nullable: true
type: integer
parent_shop_name:
description: 上级店铺名称
type: string
province:
description: 省份
type: string
shop_code:
description: 店铺编号
type: string
shop_name:
description: 店铺名称
type: string
status:
description: 状态 (0:禁用, 1:启用)
type: integer
status_name:
description: 状态名称(中文)
type: string
updated_at:
description: 更新时间
type: string
type: object
DtoShopRoleResponse:
properties:
role_desc:
description: 角色描述
type: string
role_id:
description: 角色ID
minimum: 0
type: integer
role_name:
description: 角色名称
type: string
shop_id:
description: 店铺ID
minimum: 0
type: integer
status:
description: 状态 (0:禁用, 1:启用)
type: integer
type: object
DtoShopRolesResponse:
properties:
roles:
description: 角色列表
items:
$ref: '#/components/schemas/DtoShopRoleResponse'
nullable: true
type: array
shop_id:
description: 店铺ID
minimum: 0
type: integer
type: object
DtoShopSeriesGrantListItem:
properties:
allocator_shop_id:
description: 分配者店铺ID
minimum: 0
type: integer
allocator_shop_name:
description: 分配者店铺名称
type: string
commission_type:
description: 佣金类型
type: string
created_at:
description: 创建时间
type: string
force_recharge_amount:
description: 强充金额(分)
type: integer
force_recharge_enabled:
description: 是否启用强充
type: boolean
force_recharge_locked:
description: 强充是否被套餐系列锁定(true 时代理不可修改)
type: boolean
id:
description: 授权记录ID
minimum: 0
type: integer
one_time_commission_amount:
description: 固定模式佣金金额(分)
type: integer
package_count:
description: 已授权套餐数量
type: integer
series_id:
description: 套餐系列ID
minimum: 0
type: integer
series_name:
description: 套餐系列名称
type: string
shop_id:
description: 被授权店铺ID
minimum: 0
type: integer
shop_name:
description: 被授权店铺名称
type: string
status:
description: 状态 0=禁用 1=启用
type: integer
type: object
DtoShopSeriesGrantPackageItem:
properties:
cost_price:
description: 成本价(分)
type: integer
package_code:
description: 套餐编码
type: string
package_id:
description: 套餐ID
minimum: 0
type: integer
package_name:
description: 套餐名称
type: string
shelf_status:
description: 上架状态 1-上架 2-下架
type: integer
status:
description: 分配状态 0=禁用 1=启用
type: integer
type: object
DtoShopSeriesGrantPageResult:
properties:
items:
description: 授权列表
items:
$ref: '#/components/schemas/DtoShopSeriesGrantListItem'
nullable: true
type: array
page:
description: 当前页
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoShopSeriesGrantResponse:
properties:
allocator_shop_id:
description: 分配者店铺ID,0 表示平台
minimum: 0
type: integer
allocator_shop_name:
description: 分配者店铺名称
type: string
commission_tiers:
description: 梯度模式阶梯列表(固定模式为空)
items:
$ref: '#/components/schemas/DtoGrantCommissionTierItem'
nullable: true
type: array
commission_type:
description: 佣金类型 fixed-固定 tiered-梯度
type: string
created_at:
description: 创建时间
type: string
force_recharge_amount:
description: 强充金额(分)
type: integer
force_recharge_enabled:
description: 是否启用强充
type: boolean
force_recharge_locked:
description: 强充是否被平台锁定(true 时代理不可修改)
type: boolean
id:
description: 授权记录ID
minimum: 0
type: integer
one_time_commission_amount:
description: 固定模式佣金金额(分),梯度模式返回 0
type: integer
packages:
description: 已授权套餐列表
items:
$ref: '#/components/schemas/DtoShopSeriesGrantPackageItem'
nullable: true
type: array
series_code:
description: 套餐系列编码
type: string
series_id:
description: 套餐系列ID
minimum: 0
type: integer
series_name:
description: 套餐系列名称
type: string
shop_id:
description: 被授权店铺ID
minimum: 0
type: integer
shop_name:
description: 被授权店铺名称
type: string
status:
description: 状态 0=禁用 1=启用
type: integer
updated_at:
description: 更新时间
type: string
type: object
DtoShopWithdrawalRequestItem:
properties:
account_name:
description: 收款账户名称
type: string
account_number:
description: 收款账号
type: string
actual_amount:
description: 实际到账金额(分)
type: integer
amount:
description: 提现金额(分)
type: integer
applicant_id:
description: 申请人账号ID
minimum: 0
type: integer
applicant_name:
description: 申请人用户名
type: string
bank_name:
description: 银行名称(银行卡提现时)
type: string
created_at:
description: 申请时间
type: string
fee:
description: 手续费(分)
type: integer
fee_rate:
description: 手续费比率(基点,100=1%)
type: integer
id:
description: 提现申请ID
minimum: 0
type: integer
paid_at:
description: 到账时间
type: string
payment_type:
description: 放款类型 (manual:人工打款)
type: string
processed_at:
description: 处理时间
type: string
processor_id:
description: 处理人账号ID
minimum: 0
nullable: true
type: integer
processor_name:
description: 处理人用户名
type: string
reject_reason:
description: 拒绝原因
type: string
remark:
description: 备注
type: string
shop_hierarchy:
description: 店铺层级路径(格式:上上级_上级_本身,最多两层上级)
type: string
shop_id:
description: 店铺ID
minimum: 0
type: integer
shop_name:
description: 店铺名称
type: string
status:
description: 状态 (1:待审核, 2:已通过, 3:已拒绝, 4:已到账)
type: integer
status_name:
description: 状态名称
type: string
withdrawal_method:
description: 提现方式 (alipay:支付宝, wechat:微信, bank:银行卡)
type: string
withdrawal_no:
description: 提现单号
type: string
type: object
DtoShopWithdrawalRequestPageResult:
properties:
items:
description: 提现记录列表
items:
$ref: '#/components/schemas/DtoShopWithdrawalRequestItem'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoStandaloneIotCardResponse:
properties:
activated_at:
description: 激活时间
format: date-time
nullable: true
type: string
activation_status:
description: 激活状态 (0:未激活, 1:已激活)
type: integer
activation_status_name:
description: 激活状态名称(中文)
type: string
asset_status:
description: 业务状态 (1:在库, 2:已销售, 3:已换货, 4:已停用)
type: integer
asset_status_name:
description: 业务状态名称(中文)
type: string
authorized_enterprise_id:
description: 当前有效授权的企业ID,未授权时为 null
minimum: 0
nullable: true
type: integer
authorized_enterprise_name:
description: 当前有效授权的企业名称,未授权时为空字符串
type: string
batch_no:
description: 批次号
type: string
card_category:
description: 卡业务类型 (normal:普通卡, industry:行业卡)
type: string
carrier_id:
description: 运营商ID
minimum: 0
type: integer
carrier_name:
description: 运营商名称
type: string
carrier_type:
description: 运营商类型 (CMCC:中国移动, CUCC:中国联通, CTCC:中国电信, CBN:中国广电)
type: string
created_at:
description: 创建时间
format: date-time
type: string
current_month_start_date:
description: 本月开始日期
format: date-time
nullable: true
type: string
current_month_usage_mb:
description: 系统自然月累计流量(MB,不等于运营商周期口径)
type: number
data_usage_mb:
description: 累计流量使用(MB)
type: integer
device_virtual_no:
description: 绑定设备的虚拟号(未绑定时为空字符串)
type: string
enable_polling:
description: 是否参与轮询
type: boolean
gateway_card_imei:
description: 插拔卡业务 IMEI(由 Gateway 卡状态接口同步,非设备自身 IMEI,无业务含义,仅供查看)
type: string
gateway_extend:
description: Gateway 卡状态扩展字段,原样返回上游 extend,用于展示运营商侧实际停机原因
type: string
generation:
description: 资产世代编号(初始值1,每次换货转新后+1)
type: integer
iccid:
description: ICCID
type: string
id:
description: 卡ID
minimum: 0
type: integer
imsi:
description: IMSI
type: string
last_data_check_at:
description: 最后流量检查时间
format: date-time
nullable: true
type: string
last_gateway_reading_mb:
description: 运营商当前周期累计流量读数(MB,展示运营商口径时使用)
type: number
last_month_total_mb:
description: 上月流量总量(MB)
type: number
last_real_name_check_at:
description: 最后实名检查时间
format: date-time
nullable: true
type: string
msisdn:
description: 卡接入号
type: string
network_status:
description: 网络状态 (0:停机, 1:开机)
type: integer
network_status_name:
description: 网络状态名称(中文)
type: string
real_name_status:
description: 实名状态 (0:未实名, 1:已实名)
type: integer
real_name_status_name:
description: 实名状态名称(中文)
type: string
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
type: string
series_id:
description: 套餐系列ID
minimum: 0
nullable: true
type: integer
series_name:
description: 套餐系列名称
type: string
shop_id:
description: 店铺ID
minimum: 0
nullable: true
type: integer
shop_name:
description: 店铺名称
type: string
status:
description: 状态 (1:在库, 2:已分销, 3:已激活, 4:已停用)
type: integer
status_name:
description: 状态名称(中文)
type: string
supplier:
description: 供应商
type: string
updated_at:
description: 更新时间
format: date-time
type: string
virtual_no:
description: 卡虚拟号(用于客服查找资产)
type: string
type: object
DtoSwitchCardRequest:
properties:
target_iccid:
description: 目标卡 ICCID
type: string
required:
- target_iccid
type: object
DtoTriggerBatchReq:
properties:
card_ids:
description: 卡ID列表,最多1000个
items:
minimum: 0
type: integer
nullable: true
type: array
task_type:
description: 任务类型
type: string
type: object
DtoTriggerByConditionReq:
properties:
card_status:
description: 卡状态筛选
type: string
card_type:
description: 卡类型筛选
type: string
carrier_code:
description: 运营商代码筛选
type: string
enable_polling:
description: 是否启用轮询筛选
nullable: true
type: boolean
limit:
description: 限制数量,最多1000
type: integer
package_ids:
description: 套餐ID列表筛选
items:
minimum: 0
type: integer
nullable: true
type: array
shop_id:
description: 店铺ID筛选
minimum: 0
nullable: true
type: integer
task_type:
description: 任务类型
type: string
type: object
DtoTriggerDataCleanupReq:
properties:
table_name:
description: 表名,为空则清理所有
type: string
type: object
DtoTriggerSingleReq:
properties:
card_id:
description: 卡ID
minimum: 0
type: integer
task_type:
description: 任务类型
type: string
type: object
DtoUnbindCardFromDeviceResponse:
properties:
message:
description: 提示信息
type: string
type: object
DtoUpdateAccountParams:
properties:
password:
description: 密码
maxLength: 32
minLength: 8
nullable: true
type: string
phone:
description: 手机号
maxLength: 11
minLength: 11
nullable: true
type: string
status:
description: 状态 (0:禁用, 1:启用)
maximum: 1
minimum: 0
nullable: true
type: integer
username:
description: 用户名
maxLength: 50
minLength: 3
nullable: true
type: string
type: object
DtoUpdateAssetPackageExpiresAtRequest:
properties:
expires_at:
description: 新的套餐过期时间,格式:YYYY-MM-DD HH:MM:SS 或 RFC3339
type: string
required:
- expires_at
type: object
DtoUpdateAssetPackageUsageRequest:
properties:
data_usage_mb:
description: 新的套餐真实已用量(MB)
minimum: 0
nullable: true
type: integer
required:
- data_usage_mb
type: object
DtoUpdateAssetPollingStatusRequest:
properties:
enable_polling:
description: 是否启用轮询 (true:启用, false:禁用)
type: boolean
type: object
DtoUpdateAssetPollingStatusResponse:
properties:
asset_id:
description: 资产ID
minimum: 0
type: integer
asset_type:
description: 资产类型 (card:IoT卡, device:设备)
type: string
enable_polling:
description: 更新后的轮询状态 (true:已启用, false:已禁用)
type: boolean
type: object
DtoUpdateAssetRealnamePolicyRequest:
properties:
realname_policy:
description: 实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
enum:
- none
- before_order
- after_order
type: string
required:
- realname_policy
type: object
DtoUpdateAssetRealnamePolicyResponse:
properties:
asset_id:
description: 资产ID
minimum: 0
type: integer
asset_type:
description: 资产类型 (card:IoT卡, device:设备)
type: string
realname_policy:
description: 更新后的实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)
type: string
type: object
DtoUpdateAssetRealnameStatusRequest:
properties:
real_name_status:
description: 实名状态 (0:未实名, 1:已实名)
enum:
- "0"
- "1"
type: integer
required:
- real_name_status
type: object
DtoUpdateAssetRealnameStatusResponse:
properties:
asset_id:
description: 资产ID
minimum: 0
type: integer
asset_type:
description: 资产类型 (card:IoT卡)
type: string
first_realname_at:
description: 首次实名时间(仅已实名时可能有值)
format: date-time
nullable: true
type: string
real_name_status:
description: 更新后的实名状态 (0:未实名, 1:已实名)
type: integer
real_name_status_name:
description: 实名状态名称(中文)
type: string
type: object
DtoUpdateAuthorizationRemarkReq:
properties:
remark:
description: 备注(最多500字)
type: string
type: object
DtoUpdateCarrierParams:
properties:
carrier_name:
description: 运营商名称
maxLength: 100
minLength: 1
nullable: true
type: string
data_reset_day:
description: 上游流量重置日(1-28),运营商每月清零网关计数器的日期
maximum: 28
minimum: 1
nullable: true
type: integer
description:
description: 运营商描述
maxLength: 500
nullable: true
type: string
realname_link_template:
description: 实名链接模板URL,支持 {iccid}/{msisdn}/{virtual_no} 占位符
maxLength: 500
nullable: true
type: string
realname_link_type:
description: 实名链接类型 none-不支持 template-模板URL gateway-Gateway接口
nullable: true
type: string
type: object
DtoUpdateCarrierStatusParams:
properties:
status:
description: 状态 (1:启用, 0:禁用)
type: integer
required:
- status
type: object
DtoUpdateDataCleanupConfigParams:
properties:
batch_size:
description: 每批删除条数
nullable: true
type: integer
description:
description: 配置说明
nullable: true
type: string
enabled:
description: 是否启用:0-禁用,1-启用
nullable: true
type: integer
retention_days:
description: 保留天数
nullable: true
type: integer
type: object
DtoUpdateEnterprisePasswordReq:
properties:
password:
description: 新密码
maximum: 20
minimum: 6
type: string
required:
- password
type: object
DtoUpdateEnterpriseReq:
properties:
address:
description: 详细地址
maximum: 255
nullable: true
type: string
business_license:
description: 营业执照号
maximum: 100
nullable: true
type: string
city:
description: 城市
maximum: 50
nullable: true
type: string
contact_name:
description: 联系人姓名
maximum: 50
nullable: true
type: string
contact_phone:
description: 联系人电话
maximum: 20
nullable: true
type: string
district:
description: 区县
maximum: 50
nullable: true
type: string
enterprise_code:
description: 企业编号
maximum: 50
nullable: true
type: string
enterprise_name:
description: 企业名称
maximum: 100
nullable: true
type: string
legal_person:
description: 法人代表
maximum: 50
nullable: true
type: string
owner_shop_id:
description: 归属店铺ID
minimum: 0
nullable: true
type: integer
province:
description: 省份
maximum: 50
nullable: true
type: string
type: object
DtoUpdateEnterpriseStatusReq:
properties:
status:
description: 状态(0=禁用, 1=启用)
enum:
- "0"
- "1"
type: integer
required:
- status
type: object
DtoUpdatePackageParams:
properties:
calendar_type:
description: 套餐周期类型 (natural_month:自然月, by_day:按天)
nullable: true
type: string
clear_suggested_retail_price:
description: 是否清空建议售价并恢复为未配置状态
type: boolean
cost_price:
description: 成本价(分)
minimum: 0
nullable: true
type: integer
data_reset_cycle:
description: 流量重置周期 (daily:每日, monthly:每月, yearly:每年, none:不重置)
nullable: true
type: string
duration_days:
description: 套餐天数(calendar_type=by_day时必填)
maximum: 3650
minimum: 1
nullable: true
type: integer
duration_months:
description: 套餐时长(月数)
maximum: 120
minimum: 1
nullable: true
type: integer
enable_virtual_data:
description: 是否启用虚流量
nullable: true
type: boolean
expiry_base:
description: 到期时间基准 (from_activation:实名激活时起算, from_purchase:购买时起算)
nullable: true
type: string
is_gift:
description: 是否赠送套餐
nullable: true
type: boolean
package_name:
description: 套餐名称
maxLength: 255
minLength: 1
nullable: true
type: string
package_type:
description: 套餐类型 (formal:正式套餐, addon:附加套餐)
nullable: true
type: string
real_data_mb:
description: 真流量额度(MB)
minimum: 0
nullable: true
type: integer
series_id:
description: 套餐系列ID
minimum: 0
nullable: true
type: integer
suggested_retail_price:
description: 建议售价原始值(分,普通可售套餐留空表示未配置,赠送套餐必须显式为0)
minimum: 0
nullable: true
type: integer
virtual_data_mb:
description: 虚流量额度(MB)
minimum: 0
nullable: true
type: integer
type: object
DtoUpdatePackageSeriesParams:
properties:
description:
description: 描述
maxLength: 500
nullable: true
type: string
enable_one_time_commission:
description: 是否启用一次性佣金
nullable: true
type: boolean
one_time_commission_config:
$ref: '#/components/schemas/DtoSeriesOneTimeCommissionConfigDTO'
series_name:
description: 系列名称
maxLength: 255
minLength: 1
nullable: true
type: string
type: object
DtoUpdatePackageSeriesStatusParams:
properties:
status:
description: 状态 (0:禁用, 1:启用)
type: integer
required:
- status
type: object
DtoUpdatePackageShelfStatusParams:
properties:
shelf_status:
description: 上架状态 (1:上架, 2:下架)
type: integer
required:
- shelf_status
type: object
DtoUpdatePackageStatusParams:
properties:
status:
description: 状态 (0:禁用, 1:启用)
type: integer
required:
- status
type: object
DtoUpdatePasswordParams:
properties:
new_password:
description: 新密码(8-32位)
maxLength: 32
minLength: 8
type: string
required:
- new_password
type: object
DtoUpdatePermissionParams:
properties:
parent_id:
description: 父权限ID
minimum: 0
nullable: true
type: integer
perm_code:
description: 权限编码
maxLength: 100
minLength: 1
nullable: true
type: string
perm_name:
description: 权限名称
maxLength: 50
minLength: 1
nullable: true
type: string
platform:
description: 适用端口 (all:全部, web:Web后台, h5:H5端)
nullable: true
type: string
sort:
description: 排序值
minimum: 0
nullable: true
type: integer
status:
description: 状态 (0:禁用, 1:启用)
maximum: 1
minimum: 0
nullable: true
type: integer
url:
description: 请求路径
maxLength: 255
nullable: true
type: string
type: object
DtoUpdatePollingAlertRuleParams:
properties:
alert_level:
description: 告警级别
nullable: true
type: string
cooldown_minutes:
description: 冷却时间(分钟)
nullable: true
type: integer
notify_channels:
description: 通知渠道
nullable: true
type: string
rule_name:
description: 规则名称
nullable: true
type: string
status:
description: 状态 (0:禁用, 1:启用)
nullable: true
type: integer
threshold:
description: 阈值
nullable: true
type: number
type: object
DtoUpdatePollingConcurrencyReq:
properties:
max_concurrency:
description: 最大并发数(1-1000)
type: integer
type: object
DtoUpdatePollingConfigParams:
properties:
card_category:
description: 卡业务类型 (normal:普通卡, industry:行业卡)
nullable: true
type: string
card_condition:
description: 卡状态条件 (not_real_name:未实名, real_name:已实名, activated:已激活, suspended:已停用)
nullable: true
type: string
card_status_check_interval:
description: 卡状态检查间隔(秒),NULL表示不检查,最小30秒
minimum: 30
nullable: true
type: integer
carddata_check_interval:
description: 流量检查间隔(秒),NULL表示不检查,最小60秒
minimum: 60
nullable: true
type: integer
carrier_id:
description: 运营商ID(可选,精确匹配)
minimum: 0
nullable: true
type: integer
config_name:
description: 配置名称
maxLength: 100
minLength: 1
nullable: true
type: string
description:
description: 配置说明
maxLength: 500
nullable: true
type: string
package_check_interval:
description: 套餐检查间隔(秒),NULL表示不检查,最小60秒
minimum: 60
nullable: true
type: integer
priority:
description: 优先级(数字越小优先级越高)
maximum: 1000
minimum: 1
nullable: true
type: integer
protect_check_interval:
description: 保护期一致性检查间隔(秒),NULL表示不检查,最小30秒
minimum: 30
nullable: true
type: integer
realname_check_interval:
description: 实名检查间隔(秒),NULL表示不检查,最小30秒
minimum: 30
nullable: true
type: integer
type: object
DtoUpdatePollingConfigStatusParams:
properties:
status:
description: 状态 (1:启用, 0:禁用)
type: integer
required:
- status
type: object
DtoUpdateRetailPriceParams:
properties:
retail_price:
description: 零售价原始值(分,普通可售套餐不允许显式0)
minimum: 0
type: integer
required:
- retail_price
type: object
DtoUpdateRoleParams:
properties:
role_desc:
description: 角色描述
maxLength: 255
nullable: true
type: string
role_name:
description: 角色名称
maxLength: 50
minLength: 1
nullable: true
type: string
status:
description: 状态 (0:禁用, 1:启用)
maximum: 1
minimum: 0
nullable: true
type: integer
type: object
DtoUpdateRoleStatusParams:
properties:
status:
description: 状态 (0:禁用, 1:启用)
nullable: true
type: integer
type: object
DtoUpdateShopParams:
properties:
address:
description: 详细地址
maxLength: 255
type: string
city:
description: 城市
maxLength: 50
type: string
contact_name:
description: 联系人姓名
maxLength: 50
type: string
contact_phone:
description: 联系人电话
maxLength: 11
minLength: 11
type: string
district:
description: 区县
maxLength: 50
type: string
province:
description: 省份
maxLength: 50
type: string
shop_name:
description: 店铺名称
maxLength: 100
minLength: 1
type: string
status:
description: 状态 (0:禁用, 1:启用)
type: integer
required:
- shop_name
- status
type: object
DtoUpdateShopSeriesGrantParams:
properties:
commission_tiers:
description: 梯度模式阶梯配置
items:
$ref: '#/components/schemas/DtoGrantCommissionTierItem'
type: array
enable_force_recharge:
description: 是否启用代理强充
nullable: true
type: boolean
force_recharge_amount:
description: 代理强充金额(分)
nullable: true
type: integer
one_time_commission_amount:
description: 固定模式佣金金额(分)
nullable: true
type: integer
type: object
DtoUpdateStatusParams:
properties:
status:
description: 状态(0:禁用,1:启用)
maximum: 1
minimum: 0
type: integer
required:
- status
type: object
DtoUpdateWechatConfigParams:
properties:
ali_app_id:
description: 支付宝应用ID
maxLength: 100
nullable: true
type: string
ali_notify_url:
description: 支付宝异步通知地址
maxLength: 500
nullable: true
type: string
ali_pay_expire_minutes:
description: 支付过期分钟数
maximum: 1440
minimum: 1
nullable: true
type: integer
ali_private_key:
description: 支付宝应用私钥(PEM格式)
nullable: true
type: string
ali_production:
description: 是否生产环境 (true:生产, false:沙箱)
nullable: true
type: boolean
ali_public_key:
description: 支付宝公钥(PEM格式,用于验签)
nullable: true
type: string
ali_return_url:
description: 支付宝同步跳转地址
maxLength: 500
nullable: true
type: string
description:
description: 配置描述
maxLength: 500
nullable: true
type: string
fy_api_url:
description: 富友API地址
maxLength: 500
nullable: true
type: string
fy_ins_cd:
description: 富友机构号
maxLength: 50
nullable: true
type: string
fy_mchnt_cd:
description: 富友商户号
maxLength: 50
nullable: true
type: string
fy_notify_url:
description: 富友支付回调地址
maxLength: 500
nullable: true
type: string
fy_private_key:
description: 富友私钥(PEM格式)
nullable: true
type: string
fy_public_key:
description: 富友公钥(PEM格式)
nullable: true
type: string
fy_term_id:
description: 富友终端号
maxLength: 50
nullable: true
type: string
miniapp_app_id:
description: 小程序AppID
maxLength: 100
nullable: true
type: string
miniapp_app_secret:
description: 小程序AppSecret
maxLength: 200
nullable: true
type: string
name:
description: 配置名称
maxLength: 100
minLength: 1
nullable: true
type: string
oa_aes_key:
description: 公众号AES加密Key
maxLength: 200
nullable: true
type: string
oa_app_id:
description: 公众号AppID
maxLength: 100
nullable: true
type: string
oa_app_secret:
description: 公众号AppSecret
maxLength: 200
nullable: true
type: string
oa_oauth_redirect_url:
description: OAuth回调地址
maxLength: 500
nullable: true
type: string
oa_token:
description: 公众号Token
maxLength: 200
nullable: true
type: string
provider_type:
description: 支付渠道类型 (wechat:微信直连v3, wechat_v2:微信直连v2, fuiou:富友)
nullable: true
type: string
wx_api_v2_key:
description: 微信APIv2密钥
maxLength: 200
nullable: true
type: string
wx_api_v3_key:
description: 微信APIv3密钥
maxLength: 200
nullable: true
type: string
wx_cert_content:
description: 微信支付证书内容(PEM格式)
nullable: true
type: string
wx_key_content:
description: 微信支付密钥内容(PEM格式)
nullable: true
type: string
wx_mch_id:
description: 微信商户号
maxLength: 100
nullable: true
type: string
wx_notify_url:
description: 微信支付回调地址
maxLength: 500
nullable: true
type: string
wx_serial_no:
description: 微信证书序列号
maxLength: 200
nullable: true
type: string
type: object
DtoUserInfo:
properties:
enterprise_id:
description: 企业ID
minimum: 0
type: integer
enterprise_name:
description: 企业名称
type: string
id:
description: 用户ID
minimum: 0
type: integer
phone:
description: 手机号
type: string
shop_id:
description: 店铺ID
minimum: 0
type: integer
shop_name:
description: 店铺名称
type: string
user_type:
description: 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
type: integer
user_type_name:
description: 用户类型名称
type: string
username:
description: 用户名
type: string
type: object
DtoVerifyAssetRequest:
properties:
identifier:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
required:
- identifier
type: object
DtoVerifyAssetResponse:
properties:
asset_token:
description: 资产令牌(5分钟有效)
type: string
expires_in:
description: 过期时间(秒)
type: integer
miniapp_app_id:
description: 当前生效的小程序 AppID
type: string
oa_app_id:
description: 当前生效的公众号 AppID
type: string
type: object
DtoWalletDetailResponse:
properties:
balance:
description: 可用余额(分)
type: integer
frozen_balance:
description: 冻结余额(分)
type: integer
resource_id:
description: 资源ID
minimum: 0
type: integer
resource_type:
description: 资源类型 (iot_card:物联网卡, device:设备)
type: string
updated_at:
description: 更新时间
type: string
wallet_id:
description: 钱包ID
minimum: 0
type: integer
type: object
DtoWalletTransactionItem:
properties:
amount:
description: 变动金额(分)
type: integer
balance_after:
description: 变动后余额(分)
type: integer
created_at:
description: 创建时间
type: string
remark:
description: 备注
type: string
transaction_id:
description: 流水ID
minimum: 0
type: integer
type:
description: 流水类型
type: string
type: object
DtoWalletTransactionListResponse:
properties:
items:
description: 流水列表
items:
$ref: '#/components/schemas/DtoWalletTransactionItem'
nullable: true
type: array
page:
description: 页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoWechatAppIDResponse:
properties:
app_id:
description: 当前生效的公众号 AppID
type: string
type: object
DtoWechatConfigListResponse:
properties:
items:
description: 配置列表
items:
$ref: '#/components/schemas/DtoWechatConfigResponse'
nullable: true
type: array
page:
description: 当前页
type: integer
size:
description: 每页数量
type: integer
total:
description: 总数
type: integer
type: object
DtoWechatConfigResponse:
properties:
ali_app_id:
description: 支付宝应用ID
type: string
ali_notify_url:
description: 支付宝异步通知地址
type: string
ali_pay_expire_minutes:
description: 支付过期分钟数
type: integer
ali_private_key:
description: 支付宝应用私钥(配置状态)
type: string
ali_production:
description: 是否生产环境
type: boolean
ali_public_key:
description: 支付宝公钥(配置状态)
type: string
ali_return_url:
description: 支付宝同步跳转地址
type: string
created_at:
description: 创建时间
type: string
description:
description: 配置描述
type: string
fy_api_url:
description: 富友API地址
type: string
fy_ins_cd:
description: 富友机构号
type: string
fy_mchnt_cd:
description: 富友商户号
type: string
fy_notify_url:
description: 富友支付回调地址
type: string
fy_private_key:
description: 富友私钥(配置状态)
type: string
fy_public_key:
description: 富友公钥(配置状态)
type: string
fy_term_id:
description: 富友终端号
type: string
id:
description: 配置ID
minimum: 0
type: integer
is_active:
description: 是否激活
type: boolean
miniapp_app_id:
description: 小程序AppID
type: string
miniapp_app_secret:
description: 小程序AppSecret(已脱敏)
type: string
name:
description: 配置名称
type: string
oa_aes_key:
description: 公众号AES加密Key(已脱敏)
type: string
oa_app_id:
description: 公众号AppID
type: string
oa_app_secret:
description: 公众号AppSecret(已脱敏)
type: string
oa_oauth_redirect_url:
description: OAuth回调地址
type: string
oa_token:
description: 公众号Token(已脱敏)
type: string
provider_type:
description: 支付渠道类型 (wechat:微信直连v3, wechat_v2:微信直连v2, fuiou:富友)
type: string
updated_at:
description: 更新时间
type: string
wx_api_v2_key:
description: 微信APIv2密钥(已脱敏)
type: string
wx_api_v3_key:
description: 微信APIv3密钥(已脱敏)
type: string
wx_cert_content:
description: 微信支付证书内容(配置状态)
type: string
wx_key_content:
description: 微信支付密钥内容(配置状态)
type: string
wx_mch_id:
description: 微信商户号
type: string
wx_notify_url:
description: 微信支付回调地址
type: string
wx_serial_no:
description: 微信证书序列号
type: string
type: object
DtoWechatLoginRequest:
properties:
asset_token:
description: A1返回的资产令牌
type: string
code:
description: 微信OAuth授权码
type: string
required:
- code
- asset_token
type: object
DtoWechatLoginResponse:
properties:
is_new_user:
description: 是否新创建用户
type: boolean
need_bind_phone:
description: 是否需要绑定手机号
type: boolean
token:
description: 登录JWT令牌
type: string
type: object
DtoWithdrawalApprovalResp:
properties:
id:
description: 提现申请ID
minimum: 0
type: integer
processed_at:
description: 处理时间
type: string
status:
description: 状态 (1:待审核, 2:已通过, 3:已拒绝, 4:已到账)
type: integer
status_name:
description: 状态名称
type: string
withdrawal_no:
description: 提现单号
type: string
type: object
DtoWithdrawalRequestItem:
properties:
account_name:
description: 收款账户名称
type: string
account_number:
description: 收款账号
type: string
actual_amount:
description: 实际到账金额(分)
type: integer
amount:
description: 提现金额(分)
type: integer
applicant_id:
description: 申请人账号ID
minimum: 0
type: integer
applicant_name:
description: 申请人用户名
type: string
bank_name:
description: 银行名称
type: string
created_at:
description: 申请时间
type: string
fee:
description: 手续费(分)
type: integer
fee_rate:
description: 手续费比率(基点,100=1%)
type: integer
id:
description: 提现申请ID
minimum: 0
type: integer
payment_type:
description: 放款类型 (manual:人工打款)
type: string
processed_at:
description: 处理时间
type: string
processor_id:
description: 处理人账号ID
minimum: 0
nullable: true
type: integer
processor_name:
description: 处理人用户名
type: string
reject_reason:
description: 拒绝原因
type: string
remark:
description: 备注
type: string
shop_hierarchy:
description: 店铺层级路径
type: string
shop_id:
description: 店铺ID
minimum: 0
type: integer
shop_name:
description: 店铺名称
type: string
status:
description: 状态 (1:待审核, 2:已通过, 3:已拒绝, 4:已到账)
type: integer
status_name:
description: 状态名称
type: string
withdrawal_method:
description: 提现方式 (alipay:支付宝, wechat:微信, bank:银行卡)
type: string
withdrawal_no:
description: 提现单号
type: string
type: object
DtoWithdrawalRequestPageResult:
properties:
items:
description: 提现申请列表
items:
$ref: '#/components/schemas/DtoWithdrawalRequestItem'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
DtoWithdrawalSettingItem:
properties:
arrival_days:
description: 到账天数
type: integer
created_at:
description: 创建时间
type: string
creator_id:
description: 创建人ID
minimum: 0
type: integer
creator_name:
description: 创建人用户名
type: string
daily_withdrawal_limit:
description: 每日提现次数限制
type: integer
fee_rate:
description: 手续费比率(基点,100=1%)
type: integer
id:
description: 配置ID
minimum: 0
type: integer
is_active:
description: 是否生效
type: boolean
min_withdrawal_amount:
description: 最低提现金额(分)
type: integer
type: object
DtoWithdrawalSettingPageResult:
properties:
items:
description: 配置列表
items:
$ref: '#/components/schemas/DtoWithdrawalSettingItem'
nullable: true
type: array
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
ErrorResponse:
properties:
code:
description: 错误码
example: 1001
type: integer
data:
description: 错误详情(可选)
type: object
msg:
description: 错误消息
example: 参数验证失败
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- timestamp
type: object
GatewayRealnameLinkResp:
properties:
url:
description: 实名认证跳转链接(HTTPS URL)
type: string
type: object
GatewaySlotInfo:
properties:
cardStatus:
description: 卡状态(准备、正常、停机)
type: string
extend:
description: 扩展字段(广电国网特殊参数)
type: string
iccid:
description: 卡槽中的 ICCID
type: string
isActive:
description: 是否为当前使用的卡槽(0:否, 1:是)
type: integer
slotNo:
description: 卡槽编号
type: integer
type: object
GatewaySlotInfoResp:
properties:
extend:
description: 扩展字段(广电国网特殊参数)
type: string
imei:
description: 设备 IMEI
type: string
slots:
description: 卡槽信息列表
items:
$ref: '#/components/schemas/GatewaySlotInfo'
nullable: true
type: array
type: object
ModelPermission:
properties:
available_for_role_types:
type: string
creator:
minimum: 0
type: integer
parent_id:
minimum: 0
nullable: true
type: integer
perm_code:
type: string
perm_name:
type: string
perm_type:
type: integer
platform:
type: string
sort:
type: integer
status:
type: integer
updater:
minimum: 0
type: integer
url:
type: string
type: object
RoutesHealthResponse:
properties:
service:
description: 服务名称
type: string
status:
description: 健康状态
type: string
type: object
securitySchemes:
AgentOpenAPIAccount:
description: 代理账号标识,填写代理登录平台使用的用户名或手机号,例如 agent001。
in: header
name: X-Agent-Account
type: apiKey
AgentOpenAPINonce:
description: 调用方每次请求自行生成的随机串,不需要平台提前分配;同一账号在 5 分钟内不可重复。
in: header
name: X-Agent-Nonce
type: apiKey
AgentOpenAPIPassword:
description: 代理账号当前登录密码,同时作为 HMAC-SHA256 签名密钥;密码变更后必须使用新密码签名。
in: header
name: X-Agent-Password
type: apiKey
AgentOpenAPISign:
description: 调用方按签名规则实时计算的 HMAC-SHA256 小写十六进制签名,不是固定值。
in: header
name: X-Agent-Sign
type: apiKey
AgentOpenAPITimestamp:
description: 调用方生成的请求发起时间,支持 Unix 秒、Unix 毫秒或 RFC3339 时间,必须与签名原文 timestamp 行一致。
in: header
name: X-Agent-Timestamp
type: apiKey
BearerAuth:
bearerFormat: JWT
scheme: bearer
type: http
info:
title: Admin API
version: "1.0"
openapi: 3.0.3
paths:
/api/admin/accounts:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 用户名模糊查询
in: query
name: username
schema:
description: 用户名模糊查询
maxLength: 50
type: string
- description: 手机号模糊查询
in: query
name: phone
schema:
description: 手机号模糊查询
maxLength: 20
type: string
- description: 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
in: query
name: user_type
schema:
description: 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
maximum: 4
minimum: 1
nullable: true
type: integer
- description: 状态 (0:禁用, 1:启用)
in: query
name: status
schema:
description: 状态 (0:禁用, 1:启用)
maximum: 1
minimum: 0
nullable: true
type: integer
- description: 店铺ID筛选
in: query
name: shop_id
schema:
description: 店铺ID筛选
minimum: 1
nullable: true
type: integer
- description: 企业ID筛选
in: query
name: enterprise_id
schema:
description: 企业ID筛选
minimum: 1
nullable: true
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAccountPageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 查询账号列表
tags:
- 账号管理
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateAccountRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAccountResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建账号
tags:
- 账号管理
/api/admin/accounts/{account_id}/roles/{role_id}:
delete:
parameters:
- description: 账号ID
in: path
name: account_id
required: true
schema:
description: 账号ID
minimum: 0
type: integer
- description: 角色ID
in: path
name: role_id
required: true
schema:
description: 角色ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 移除账号角色
tags:
- 账号管理
/api/admin/accounts/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除账号
tags:
- 账号管理
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAccountResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取账号详情
tags:
- 账号管理
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateAccountParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAccountResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新账号
tags:
- 账号管理
/api/admin/accounts/{id}/password:
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdatePasswordParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 修改账号密码
tags:
- 账号管理
/api/admin/accounts/{id}/roles:
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAccountRolesResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取账号角色
tags:
- 账号管理
post:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAssignRolesParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
items:
$ref: '#/components/schemas/DtoAccountRoleResponse'
type: array
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 为账号分配角色
tags:
- 账号管理
/api/admin/accounts/{id}/status:
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateStatusParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 修改账号状态
tags:
- 账号管理
/api/admin/agent-recharges:
get:
parameters:
- description: 页码,默认1
in: query
name: page
schema:
description: 页码,默认1
minimum: 1
type: integer
- description: 每页条数,默认20,最大100
in: query
name: page_size
schema:
description: 每页条数,默认20,最大100
maximum: 100
minimum: 1
type: integer
- description: 按店铺ID过滤
in: query
name: shop_id
schema:
description: 按店铺ID过滤
minimum: 0
nullable: true
type: integer
- description: 按状态过滤 (1:待支付, 2:已支付, 3:已完成, 4:已关闭, 5:已退款)
in: query
name: status
schema:
description: 按状态过滤 (1:待支付, 2:已支付, 3:已完成, 4:已关闭, 5:已退款)
nullable: true
type: integer
- description: 创建时间起始日期(YYYY-MM-DD)
in: query
name: start_date
schema:
description: 创建时间起始日期(YYYY-MM-DD)
type: string
- description: 创建时间截止日期(YYYY-MM-DD)
in: query
name: end_date
schema:
description: 创建时间截止日期(YYYY-MM-DD)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAgentRechargeListResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 查询代理充值订单列表
tags:
- 代理预充值
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateAgentRechargeRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAgentRechargeResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建代理充值订单
tags:
- 代理预充值
/api/admin/agent-recharges/{id}:
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAgentRechargeResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 查询代理充值订单详情
tags:
- 代理预充值
/api/admin/agent-recharges/{id}/offline-pay:
post:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAgentOfflinePayParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAgentRechargeResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 确认线下充值
tags:
- 代理预充值
/api/admin/asset-allocation-records:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 分配类型 (allocate:分配, recall:回收)
in: query
name: allocation_type
schema:
description: 分配类型 (allocate:分配, recall:回收)
enum:
- allocate
- recall
type: string
- description: 资产类型 (iot_card:物联网卡, device:设备)
in: query
name: asset_type
schema:
description: 资产类型 (iot_card:物联网卡, device:设备)
enum:
- iot_card
- device
type: string
- description: 资产标识符(ICCID或设备号,模糊查询)
in: query
name: asset_identifier
schema:
description: 资产标识符(ICCID或设备号,模糊查询)
maxLength: 50
type: string
- description: 分配单号(精确匹配)
in: query
name: allocation_no
schema:
description: 分配单号(精确匹配)
maxLength: 50
type: string
- description: 来源店铺ID
in: query
name: from_shop_id
schema:
description: 来源店铺ID
minimum: 0
nullable: true
type: integer
- description: 目标店铺ID
in: query
name: to_shop_id
schema:
description: 目标店铺ID
minimum: 0
nullable: true
type: integer
- description: 操作人ID
in: query
name: operator_id
schema:
description: 操作人ID
minimum: 0
nullable: true
type: integer
- description: 创建时间起始
in: query
name: created_at_start
schema:
description: 创建时间起始
format: date-time
nullable: true
type: string
- description: 创建时间结束
in: query
name: created_at_end
schema:
description: 创建时间结束
format: date-time
nullable: true
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoListAssetAllocationRecordResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 分配记录列表
tags:
- 资产分配记录
/api/admin/asset-allocation-records/{id}:
get:
parameters:
- description: 记录ID
in: path
name: id
required: true
schema:
description: 记录ID
minimum: 1
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetAllocationRecordDetailResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 分配记录详情
tags:
- 资产分配记录
/api/admin/assets/{identifier}/current-package:
get:
parameters:
- description: 资产标识符(ICCID 或 VirtualNo)
in: path
name: identifier
required: true
schema:
description: 资产标识符(ICCID 或 VirtualNo)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetPackageResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 当前生效套餐
tags:
- 资产管理
/api/admin/assets/{identifier}/deactivate:
patch:
description: 将资产状态设置为停用(不可逆)。仅支持库存中或已售出的资产。
parameters:
- description: 资产标识符(ICCID 或 VirtualNo)
in: path
name: identifier
required: true
schema:
description: 资产标识符(ICCID 或 VirtualNo)
type: string
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 停用资产
tags:
- 资产管理
/api/admin/assets/{identifier}/operation-logs:
get:
description: 通过资产标识符查询审计日志,支持分页和操作类型/结果状态筛选。
parameters:
- description: 页码(默认1)
in: query
name: page
schema:
description: 页码(默认1)
minimum: 1
type: integer
- description: 每页条数(默认20,最大100)
in: query
name: page_size
schema:
description: 每页条数(默认20,最大100)
maximum: 100
minimum: 1
type: integer
- description: 操作类型(如 device_stop、card_allocate)
in: query
name: operation_type
schema:
description: 操作类型(如 device_stop、card_allocate)
type: string
- description: 执行结果 (success:成功, failed:失败, denied:拒绝)
in: query
name: result_status
schema:
description: 执行结果 (success:成功, failed:失败, denied:拒绝)
type: string
- description: 资产标识符(虚拟号/ICCID/IMEI/SN/MSISDN)
in: path
name: identifier
required: true
schema:
description: 资产标识符(虚拟号/ICCID/IMEI/SN/MSISDN)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetOperationLogListResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 资产操作审计日志
tags:
- 资产管理
/api/admin/assets/{identifier}/orders:
get:
description: 查询资产本代历史订单,支持 include_previous=true 参数通过换货链追溯前代订单(最多10代)。
parameters:
- description: 页码(默认1)
in: query
name: page
schema:
description: 页码(默认1)
minimum: 1
type: integer
- description: 每页条数(默认20,最大100)
in: query
name: page_size
schema:
description: 每页条数(默认20,最大100)
maximum: 100
minimum: 1
type: integer
- description: 是否包含前代订单,默认false
in: query
name: include_previous
schema:
description: 是否包含前代订单,默认false
type: boolean
- description: 资产标识符(ICCID 或 VirtualNo)
in: path
name: identifier
required: true
schema:
description: 资产标识符(ICCID 或 VirtualNo)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetOrdersResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 资产历史订单
tags:
- 资产管理
/api/admin/assets/{identifier}/packages:
get:
description: 查询该资产所有套餐记录,含虚流量换算结果。支持分页与 status 状态筛选。
parameters:
- description: 页码(默认1)
in: query
name: page
schema:
description: 页码(默认1)
minimum: 1
type: integer
- description: 每页条数(默认50,最大100)
in: query
name: page_size
schema:
description: 每页条数(默认50,最大100)
maximum: 100
minimum: 1
type: integer
- description: 套餐状态 (0:待生效, 1:生效中, 2:已用完, 3:已过期, 4:已失效)
in: query
name: status
schema:
description: 套餐状态 (0:待生效, 1:生效中, 2:已用完, 3:已过期, 4:已失效)
maximum: 4
minimum: 0
nullable: true
type: integer
- description: 资产标识符(虚拟号/ICCID/IMEI/SN/MSISDN)
in: path
name: identifier
required: true
schema:
description: 资产标识符(虚拟号/ICCID/IMEI/SN/MSISDN)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetPackagesResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 资产套餐列表
tags:
- 资产管理
/api/admin/assets/{identifier}/packages/{package_usage_id}/expires-at:
patch:
description: 修改指定资产下某条套餐使用记录的过期时间。仅账号ID为2的账号可调用。
parameters:
- description: 资产标识符(虚拟号/ICCID/IMEI/SN/MSISDN)
in: path
name: identifier
required: true
schema:
description: 资产标识符(虚拟号/ICCID/IMEI/SN/MSISDN)
type: string
- description: 套餐使用记录ID
in: path
name: package_usage_id
required: true
schema:
description: 套餐使用记录ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateAssetPackageExpiresAtRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetPackageResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 修改资产套餐过期时间
tags:
- 资产管理
/api/admin/assets/{identifier}/packages/{package_usage_id}/used-data:
patch:
description: 修改指定资产下某条套餐使用记录的真实已用量(MB)。仅账号ID为2的账号可调用。
parameters:
- description: 资产标识符(虚拟号/ICCID/IMEI/SN/MSISDN)
in: path
name: identifier
required: true
schema:
description: 资产标识符(虚拟号/ICCID/IMEI/SN/MSISDN)
type: string
- description: 套餐使用记录ID
in: path
name: package_usage_id
required: true
schema:
description: 套餐使用记录ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateAssetPackageUsageRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetPackageResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 修改资产套餐已用量
tags:
- 资产管理
/api/admin/assets/{identifier}/polling-status:
patch:
description: 启用或禁用指定资产(IoT卡或设备)的定期状态轮询。
parameters:
- description: 资产标识符(ICCID 或 VirtualNo)
in: path
name: identifier
required: true
schema:
description: 资产标识符(ICCID 或 VirtualNo)
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateAssetPollingStatusRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoUpdateAssetPollingStatusResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新资产轮询状态
tags:
- 资产管理
/api/admin/assets/{identifier}/realname-mode:
patch:
description: 更新指定资产(IoT卡或设备)的实名认证策略,支持 none/before_order/after_order 三种模式。
parameters:
- description: 资产标识符(ICCID 或 VirtualNo)
in: path
name: identifier
required: true
schema:
description: 资产标识符(ICCID 或 VirtualNo)
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateAssetRealnamePolicyRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoUpdateAssetRealnamePolicyResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新资产实名认证策略
tags:
- 资产管理
/api/admin/assets/{identifier}/realname-status:
patch:
description: 手动将指定卡资产标记为已实名或未实名。状态更新后会触发停复机评估,并在标记为已实名时触发待实名套餐激活。
parameters:
- description: 资产标识符(ICCID 或 VirtualNo)
in: path
name: identifier
required: true
schema:
description: 资产标识符(ICCID 或 VirtualNo)
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateAssetRealnameStatusRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoUpdateAssetRealnameStatusResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 手动更新卡实名状态
tags:
- 资产管理
/api/admin/assets/{identifier}/realtime-status:
get:
description: 查询资产实时状态。卡类型:读取 DB/Redis 持久化状态;设备类型:实时调用 Gateway sync-info 接口获取最新数据,Gateway 失败不阻断主流程(DeviceRealtime.gateway_msg 返回失败原因)。
parameters:
- description: 资产标识符(ICCID 或 VirtualNo)
in: path
name: identifier
required: true
schema:
description: 资产标识符(ICCID 或 VirtualNo)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetRealtimeStatusResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 资产实时状态
tags:
- 资产管理
/api/admin/assets/{identifier}/refresh:
post:
description: 主动调网关同步最新状态。设备有30秒冷却期。
parameters:
- description: 资产标识符(ICCID 或 VirtualNo)
in: path
name: identifier
required: true
schema:
description: 资产标识符(ICCID 或 VirtualNo)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetRealtimeStatusResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 刷新资产状态
tags:
- 资产管理
/api/admin/assets/{identifier}/start:
post:
description: 设备批量复机;单卡手动复机。
parameters:
- description: 资产标识符(ICCID 或 VirtualNo)
in: path
name: identifier
required: true
schema:
description: 资产标识符(ICCID 或 VirtualNo)
type: string
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 复机
tags:
- 资产管理
/api/admin/assets/{identifier}/stop:
post:
description: 设备批量停机设备下所有已实名卡;单卡手动停机。
parameters:
- description: 资产标识符(ICCID 或 VirtualNo)
in: path
name: identifier
required: true
schema:
description: 资产标识符(ICCID 或 VirtualNo)
type: string
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 停机
tags:
- 资产管理
/api/admin/assets/{identifier}/wallet:
get:
description: 查询指定卡或设备的钱包余额概况。企业账号禁止调用。
parameters:
- description: 资产标识符(ICCID 或 VirtualNo)
in: path
name: identifier
required: true
schema:
description: 资产标识符(ICCID 或 VirtualNo)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetWalletResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 资产钱包概况
tags:
- 资产管理
/api/admin/assets/{identifier}/wallet/transactions:
get:
description: 分页查询指定资产的钱包收支流水,含充值/扣款来源编号。企业账号禁止调用。
parameters:
- description: 页码,默认1
in: query
name: page
schema:
description: 页码,默认1
type: integer
- description: 每页数量,默认20,最大100
in: query
name: page_size
schema:
description: 每页数量,默认20,最大100
type: integer
- description: 交易类型过滤:recharge/deduct/refund/exchange
in: query
name: transaction_type
schema:
description: 交易类型过滤:recharge/deduct/refund/exchange
nullable: true
type: string
- description: 开始时间(RFC3339)
in: query
name: start_time
schema:
description: 开始时间(RFC3339)
format: date-time
nullable: true
type: string
- description: 结束时间(RFC3339)
in: query
name: end_time
schema:
description: 结束时间(RFC3339)
format: date-time
nullable: true
type: string
- description: 资产标识符(ICCID 或 VirtualNo)
in: path
name: identifier
required: true
schema:
description: 资产标识符(ICCID 或 VirtualNo)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetWalletTransactionListResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 资产钱包流水列表
tags:
- 资产管理
/api/admin/assets/resolve/{identifier}:
get:
description: 通过虚拟号/ICCID/IMEI/SN/MSISDN 解析设备或卡的完整详情。企业账号禁止调用。
parameters:
- description: 资产标识符(虚拟号/ICCID/IMEI/SN/MSISDN)
in: path
name: identifier
required: true
schema:
description: 资产标识符(虚拟号/ICCID/IMEI/SN/MSISDN)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetResolveResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 解析资产
tags:
- 资产管理
/api/admin/authorizations:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 按企业ID筛选
in: query
name: enterprise_id
schema:
description: 按企业ID筛选
minimum: 0
nullable: true
type: integer
- description: 按ICCID模糊查询
in: query
name: iccid
schema:
description: 按ICCID模糊查询
type: string
- description: 授权人类型:2=平台,3=代理
in: query
name: authorizer_type
schema:
description: 授权人类型:2=平台,3=代理
nullable: true
type: integer
- description: 状态:0=已回收,1=有效
in: query
name: status
schema:
description: 状态:0=已回收,1=有效
nullable: true
type: integer
- description: 授权时间起(格式:2006-01-02)
in: query
name: start_time
schema:
description: 授权时间起(格式:2006-01-02)
type: string
- description: 授权时间止(格式:2006-01-02)
in: query
name: end_time
schema:
description: 授权时间止(格式:2006-01-02)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAuthorizationListResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 授权记录列表
tags:
- 授权记录管理
/api/admin/authorizations/{id}:
get:
parameters:
- description: 授权记录ID
in: path
name: id
required: true
schema:
description: 授权记录ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAuthorizationItem'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 授权记录详情
tags:
- 授权记录管理
/api/admin/authorizations/{id}/remark:
put:
parameters:
- description: 授权记录ID
in: path
name: id
required: true
schema:
description: 授权记录ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateAuthorizationRemarkReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAuthorizationItem'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 修改授权备注
tags:
- 授权记录管理
/api/admin/carriers:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 运营商类型 (CMCC:中国移动, CUCC:中国联通, CTCC:中国电信, CBN:中国广电)
in: query
name: carrier_type
schema:
description: 运营商类型 (CMCC:中国移动, CUCC:中国联通, CTCC:中国电信, CBN:中国广电)
nullable: true
type: string
- description: 运营商名称(模糊搜索)
in: query
name: carrier_name
schema:
description: 运营商名称(模糊搜索)
maxLength: 100
nullable: true
type: string
- description: 状态 (1:启用, 0:禁用)
in: query
name: status
schema:
description: 状态 (1:启用, 0:禁用)
nullable: true
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoCarrierPageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 运营商列表
tags:
- 运营商管理
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateCarrierRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoCarrierResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建运营商
tags:
- 运营商管理
/api/admin/carriers/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除运营商
tags:
- 运营商管理
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoCarrierResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取运营商详情
tags:
- 运营商管理
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateCarrierParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoCarrierResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新运营商
tags:
- 运营商管理
/api/admin/carriers/{id}/status:
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateCarrierStatusParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新运营商状态
tags:
- 运营商管理
/api/admin/commission-records/{id}/resolve:
post:
parameters:
- description: 佣金记录ID
in: path
name: id
required: true
schema:
description: 佣金记录ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCommissionRecordResolveRequest'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 修正待审佣金记录
tags:
- 代理商资金管理
/api/admin/commission/withdrawal-requests:
get:
parameters:
- description: 页码(默认1)
in: query
name: page
schema:
description: 页码(默认1)
minimum: 1
type: integer
- description: 每页数量(默认20,最大100)
in: query
name: page_size
schema:
description: 每页数量(默认20,最大100)
maximum: 100
minimum: 1
type: integer
- description: 状态 (1:待审核, 2:已通过, 3:已拒绝, 4:已到账)
in: query
name: status
schema:
description: 状态 (1:待审核, 2:已通过, 3:已拒绝, 4:已到账)
maximum: 4
minimum: 1
nullable: true
type: integer
- description: 提现单号(精确查询)
in: query
name: withdrawal_no
schema:
description: 提现单号(精确查询)
maxLength: 50
type: string
- description: 店铺名称(模糊查询)
in: query
name: shop_name
schema:
description: 店铺名称(模糊查询)
maxLength: 100
type: string
- description: 申请开始时间(格式:2006-01-02 15:04:05)
in: query
name: start_time
schema:
description: 申请开始时间(格式:2006-01-02 15:04:05)
type: string
- description: 申请结束时间(格式:2006-01-02 15:04:05)
in: query
name: end_time
schema:
description: 申请结束时间(格式:2006-01-02 15:04:05)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWithdrawalRequestPageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 提现申请列表
tags:
- 佣金提现审批
/api/admin/commission/withdrawal-requests/{id}/approve:
post:
parameters:
- description: 提现申请ID
in: path
name: id
required: true
schema:
description: 提现申请ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoApproveWithdrawalReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWithdrawalApprovalResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 审批通过提现申请
tags:
- 佣金提现审批
/api/admin/commission/withdrawal-requests/{id}/reject:
post:
parameters:
- description: 提现申请ID
in: path
name: id
required: true
schema:
description: 提现申请ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoRejectWithdrawalReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWithdrawalApprovalResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 拒绝提现申请
tags:
- 佣金提现审批
/api/admin/commission/withdrawal-settings:
get:
parameters:
- description: 页码(默认1)
in: query
name: page
schema:
description: 页码(默认1)
minimum: 1
type: integer
- description: 每页数量(默认20,最大100)
in: query
name: page_size
schema:
description: 每页数量(默认20,最大100)
maximum: 100
minimum: 1
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWithdrawalSettingPageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 提现配置列表
tags:
- 提现配置管理
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateWithdrawalSettingReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWithdrawalSettingItem'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 新增提现配置
tags:
- 提现配置管理
/api/admin/commission/withdrawal-settings/current:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWithdrawalSettingItem'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取当前生效的提现配置
tags:
- 提现配置管理
/api/admin/data-cleanup-configs:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoDataCleanupConfigListResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取数据清理配置列表
tags:
- 轮询管理-数据清理
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateDataCleanupConfigReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoDataCleanupConfigResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建数据清理配置
tags:
- 轮询管理-数据清理
/api/admin/data-cleanup-configs/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除数据清理配置
tags:
- 轮询管理-数据清理
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoDataCleanupConfigResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取数据清理配置详情
tags:
- 轮询管理-数据清理
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateDataCleanupConfigParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新数据清理配置
tags:
- 轮询管理-数据清理
/api/admin/data-cleanup-logs:
get:
parameters:
- description: 表名筛选
in: query
name: table_name
schema:
description: 表名筛选
type: string
- description: 页码
in: query
name: page
schema:
description: 页码
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoDataCleanupLogListResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取数据清理日志列表
tags:
- 轮询管理-数据清理
/api/admin/data-cleanup/preview:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoDataCleanupPreviewResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 预览待清理数据
tags:
- 轮询管理-数据清理
/api/admin/data-cleanup/progress:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoDataCleanupProgressResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取数据清理进度
tags:
- 轮询管理-数据清理
/api/admin/data-cleanup/trigger:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoTriggerDataCleanupReq'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 手动触发数据清理
tags:
- 轮询管理-数据清理
/api/admin/devices:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 虚拟号(模糊查询)
in: query
name: virtual_no
schema:
description: 虚拟号(模糊查询)
maxLength: 100
type: string
- description: 设备IMEI(模糊查询)
in: query
name: imei
schema:
description: 设备IMEI(模糊查询)
maxLength: 20
type: string
- description: 设备名称(模糊查询)
in: query
name: device_name
schema:
description: 设备名称(模糊查询)
maxLength: 255
type: string
- description: 归属状态 (1:在库, 2:已分销)
in: query
name: status
schema:
description: 归属状态 (1:在库, 2:已分销)
maximum: 2
minimum: 1
nullable: true
type: integer
- description: 激活状态 (0:未激活, 1:已激活;需有生效中主套餐且任意绑定卡已实名)
in: query
name: activation_status
schema:
description: 激活状态 (0:未激活, 1:已激活;需有生效中主套餐且任意绑定卡已实名)
maximum: 1
minimum: 0
nullable: true
type: integer
- description: 店铺ID(兼容旧参数,单选;NULL表示平台库存)
in: query
name: shop_id
schema:
description: 店铺ID(兼容旧参数,单选;NULL表示平台库存)
minimum: 0
nullable: true
type: integer
- description: 店铺ID列表(多选)
in: query
name: shop_ids
schema:
description: 店铺ID列表(多选)
items:
minimum: 0
type: integer
type: array
- description: 套餐系列ID
in: query
name: series_id
schema:
description: 套餐系列ID
minimum: 0
nullable: true
type: integer
- description: 批次号
in: query
name: batch_no
schema:
description: 批次号
maxLength: 100
type: string
- description: 设备类型
in: query
name: device_type
schema:
description: 设备类型
maxLength: 50
type: string
- description: 制造商(模糊查询)
in: query
name: manufacturer
schema:
description: 制造商(模糊查询)
maxLength: 255
type: string
- description: 创建时间起始
in: query
name: created_at_start
schema:
description: 创建时间起始
format: date-time
nullable: true
type: string
- description: 创建时间结束
in: query
name: created_at_end
schema:
description: 创建时间结束
format: date-time
nullable: true
type: string
- description: 是否有生效中的套餐(true:有生效中主套餐, false:无生效中主套餐)
in: query
name: has_active_package
schema:
description: 是否有生效中的套餐(true:有生效中主套餐, false:无生效中主套餐)
nullable: true
type: boolean
- description: 关键字搜索,匹配虚拟号或IMEI(模糊查询,与virtual_no/imei独立)
in: query
name: keyword
schema:
description: 关键字搜索,匹配虚拟号或IMEI(模糊查询,与virtual_no/imei独立)
maxLength: 100
type: string
- description: 按有效授权企业ID过滤(只返回当前授权给该企业的设备)
in: query
name: authorized_enterprise_id
schema:
description: 按有效授权企业ID过滤(只返回当前授权给该企业的设备)
minimum: 0
nullable: true
type: integer
- description: 企业授权状态过滤 (true:已授权给某企业, false:未授权任何企业)
in: query
name: is_authorized_to_enterprise
schema:
description: 企业授权状态过滤 (true:已授权给某企业, false:未授权任何企业)
nullable: true
type: boolean
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoListDeviceResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 设备列表
tags:
- 设备管理
/api/admin/devices/{virtual_no}:
delete:
description: 仅平台用户可操作。删除设备时自动解绑所有卡(卡不会被删除)。
parameters:
- description: 设备虚拟号
in: path
name: virtual_no
required: true
schema:
description: 设备虚拟号
type: string
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除设备
tags:
- 设备管理
/api/admin/devices/{virtual_no}/cards:
get:
parameters:
- description: 设备虚拟号
in: path
name: virtual_no
required: true
schema:
description: 设备虚拟号
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoListDeviceCardsResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取设备绑定的卡列表
tags:
- 设备管理
post:
description: 仅平台用户可操作。用于导入后调整卡绑定关系(补卡、换卡)。
parameters:
- description: 设备虚拟号
in: path
name: virtual_no
required: true
schema:
description: 设备虚拟号
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoBindCardToDeviceRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoBindCardToDeviceResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 绑定卡到设备
tags:
- 设备管理
/api/admin/devices/{virtual_no}/cards/{iccid}:
delete:
description: 仅平台用户可操作。解绑不改变卡的 shop_id。
parameters:
- description: 设备虚拟号
in: path
name: virtual_no
required: true
schema:
description: 设备虚拟号
type: string
- description: IoT卡ICCID
in: path
name: iccid
required: true
schema:
description: IoT卡ICCID
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoUnbindCardFromDeviceResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 解绑设备上的卡
tags:
- 设备管理
/api/admin/devices/allocate:
post:
description: 分配设备给直属下级店铺。分配时自动同步绑定的所有卡的 shop_id。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAllocateDevicesRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAllocateDevicesResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 批量分配设备
tags:
- 设备管理
/api/admin/devices/by-identifier/{identifier}/gateway-slots:
get:
description: 通过虚拟号/IMEI/SN 查询设备卡槽信息。设备必须已配置 IMEI。
parameters:
- description: 设备标识符(支持虚拟号/IMEI/SN)
in: path
name: identifier
required: true
schema:
description: 设备标识符(支持虚拟号/IMEI/SN)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/GatewaySlotInfoResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 查询卡槽信息
tags:
- 设备管理
/api/admin/devices/by-identifier/{identifier}/reboot:
post:
description: 通过虚拟号/IMEI/SN 重启设备。设备必须已配置 IMEI。
parameters:
- description: 设备标识符(支持虚拟号/IMEI/SN)
in: path
name: identifier
required: true
schema:
description: 设备标识符(支持虚拟号/IMEI/SN)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoEmptyResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 重启设备
tags:
- 设备管理
/api/admin/devices/by-identifier/{identifier}/reset:
post:
description: 通过虚拟号/IMEI/SN 恢复设备出厂设置。设备必须已配置 IMEI。
parameters:
- description: 设备标识符(支持虚拟号/IMEI/SN)
in: path
name: identifier
required: true
schema:
description: 设备标识符(支持虚拟号/IMEI/SN)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoEmptyResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 恢复出厂
tags:
- 设备管理
/api/admin/devices/by-identifier/{identifier}/speed-limit:
put:
description: 通过虚拟号/IMEI/SN 设置设备限速。设备必须已配置 IMEI。
parameters:
- description: 设备标识符(支持虚拟号/IMEI/SN)
in: path
name: identifier
required: true
schema:
description: 设备标识符(支持虚拟号/IMEI/SN)
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoSetSpeedLimitRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoEmptyResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 设置限速
tags:
- 设备管理
/api/admin/devices/by-identifier/{identifier}/switch-card:
post:
description: 通过虚拟号/IMEI/SN 切换设备当前使用的卡。设备必须已配置 IMEI。
parameters:
- description: 设备标识符(支持虚拟号/IMEI/SN)
in: path
name: identifier
required: true
schema:
description: 设备标识符(支持虚拟号/IMEI/SN)
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoSwitchCardRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoEmptyResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 切卡
tags:
- 设备管理
/api/admin/devices/by-identifier/{identifier}/switch-mode:
post:
description: 通过虚拟号/IMEI/SN 设置设备切卡模式(0:自动切卡, 1:手动切卡)。设备必须已配置 IMEI,且必须指定一张系统内状态正常并已实名的目标卡资产ID。
parameters:
- description: 设备标识符(支持虚拟号/IMEI/SN)
in: path
name: identifier
required: true
schema:
description: 设备标识符(支持虚拟号/IMEI/SN)
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoSetSwitchModeRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoEmptyResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 设置切卡模式
tags:
- 设备管理
/api/admin/devices/by-identifier/{identifier}/wifi:
put:
description: 通过虚拟号/IMEI/SN 设置设备 WiFi。设备必须已配置 IMEI。
parameters:
- description: 设备标识符(支持虚拟号/IMEI/SN)
in: path
name: identifier
required: true
schema:
description: 设备标识符(支持虚拟号/IMEI/SN)
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoSetWiFiRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoEmptyResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 设置 WiFi
tags:
- 设备管理
/api/admin/devices/import:
post:
description: |-
仅平台用户可操作。文件格式已从 CSV 升级为 Excel (.xlsx)。
### 完整导入流程
1. **获取上传 URL**: 调用 `POST /api/admin/storage/upload-url`
2. **上传 Excel 文件**: 使用预签名 URL 上传文件到对象存储
3. **调用本接口**: 使用返回的 `file_key` 提交导入任务
### Excel 文件格式
- 文件格式:仅支持 .xlsx (Excel 2007+)
- 必须包含列(首行为表头):
- `virtual_no`: 设备虚拟号(**必填**,全局唯一;**为空的行记为失败,不再静默跳过**)
- `sn`: 设备 SN
- `device_name`: 设备名称
- `device_model`: 设备型号
- `device_type`: 设备类型
- `imei`: 设备 IMEI
- `manufacturer`: 制造商
- `max_sim_slots`: 最大插槽数(默认4,范围1-4)
- `iccid_1` ~ `iccid_4`: 固定槽位的卡 ICCID(`iccid_1`=槽1,`iccid_2`=槽2,`iccid_3`=槽3,`iccid_4`=槽4;卡必须已存在且未绑定)
- 槽位规则:中间留空不会触发前移补位;如果 `max_sim_slots=2`,则 `iccid_3`、`iccid_4` 必须留空,否则该行失败
- 固定列顺序:`virtual_no`、`sn`、`device_name`、`device_model`、`device_type`、`imei`、`manufacturer`、`max_sim_slots`、`iccid_1`、`iccid_2`、`iccid_3`、`iccid_4`
- 列格式:设置为文本格式(避免长数字被转为科学记数法)
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoImportDeviceRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoImportDeviceResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 批量导入设备
tags:
- 设备管理
/api/admin/devices/import/tasks:
get:
description: 仅平台用户可操作。
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:失败)
in: query
name: status
schema:
description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:失败)
maximum: 4
minimum: 1
nullable: true
type: integer
- description: 批次号(模糊查询)
in: query
name: batch_no
schema:
description: 批次号(模糊查询)
maxLength: 100
type: string
- description: 创建时间起始
in: query
name: start_time
schema:
description: 创建时间起始
format: date-time
nullable: true
type: string
- description: 创建时间结束
in: query
name: end_time
schema:
description: 创建时间结束
format: date-time
nullable: true
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoListDeviceImportTaskResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 导入任务列表
tags:
- 设备管理
/api/admin/devices/import/tasks/{id}:
get:
description: 仅平台用户可操作。包含跳过和失败记录的详细信息。
parameters:
- description: 任务ID
in: path
name: id
required: true
schema:
description: 任务ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoDeviceImportTaskDetailResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 导入任务详情
tags:
- 设备管理
/api/admin/devices/recall:
post:
description: 从直属下级店铺回收设备。回收时自动同步绑定的所有卡的 shop_id。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoRecallDevicesRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoRecallDevicesResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 批量回收设备
tags:
- 设备管理
/api/admin/devices/series-binding:
patch:
description: 批量设置或清除设备与套餐系列分配的关联关系。series_id 为目标套餐系列ID,0表示清除关联。支持 selection_type=list/range/filter:list 传 device_ids(兼容旧请求,不传 selection_type 时默认按 device_ids 处理),range 传 virtual_no_start/virtual_no_end,filter 按筛选条件选择完整结果,不受列表分页限制。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoBatchSetDeviceSeriesBindngRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoBatchSetDeviceSeriesBindngResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 批量设置设备的套餐系列绑定
tags:
- 设备管理
/api/admin/enterprises:
get:
parameters:
- description: 页码(默认1)
in: query
name: page
schema:
description: 页码(默认1)
minimum: 1
type: integer
- description: 每页数量(默认20,最大100)
in: query
name: page_size
schema:
description: 每页数量(默认20,最大100)
maximum: 100
minimum: 1
type: integer
- description: 企业名称(模糊查询)
in: query
name: enterprise_name
schema:
description: 企业名称(模糊查询)
type: string
- description: 登录手机号(模糊查询)
in: query
name: login_phone
schema:
description: 登录手机号(模糊查询)
type: string
- description: 联系人电话(模糊查询)
in: query
name: contact_phone
schema:
description: 联系人电话(模糊查询)
type: string
- description: 归属店铺ID
in: query
name: owner_shop_id
schema:
description: 归属店铺ID
minimum: 0
nullable: true
type: integer
- description: 状态(0=禁用, 1=启用)
in: query
name: status
schema:
description: 状态(0=禁用, 1=启用)
nullable: true
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoEnterprisePageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 查询企业客户列表
tags:
- 企业客户管理
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateEnterpriseReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoCreateEnterpriseResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 新增企业客户
tags:
- 企业客户管理
/api/admin/enterprises/{id}:
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateEnterpriseReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoEnterpriseItem'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 编辑企业信息
tags:
- 企业客户管理
/api/admin/enterprises/{id}/allocate-cards:
post:
parameters:
- description: 企业ID
in: path
name: id
required: true
schema:
description: 企业ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAllocateCardsReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAllocateCardsResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 授权卡给企业
tags:
- 企业卡授权
/api/admin/enterprises/{id}/allocate-devices:
post:
parameters:
- description: 企业ID
in: path
name: id
required: true
schema:
description: 企业ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAllocateDevicesReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAllocateDevicesResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 授权设备给企业
tags:
- 企业设备授权
/api/admin/enterprises/{id}/cards:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 卡状态
in: query
name: status
schema:
description: 卡状态
nullable: true
type: integer
- description: 运营商ID
in: query
name: carrier_id
schema:
description: 运营商ID
minimum: 0
nullable: true
type: integer
- description: ICCID(模糊查询)
in: query
name: iccid
schema:
description: ICCID(模糊查询)
type: string
- description: 卡虚拟号(模糊查询)
in: query
name: virtual_no
schema:
description: 卡虚拟号(模糊查询)
type: string
- description: 手机号(模糊查询)
in: query
name: msisdn
schema:
description: 手机号(模糊查询)
type: string
- description: 企业ID
in: path
name: id
required: true
schema:
description: 企业ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoEnterpriseCardPageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 企业卡列表
tags:
- 企业卡授权
/api/admin/enterprises/{id}/devices:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
type: integer
- description: 虚拟号(模糊搜索)
in: query
name: virtual_no
schema:
description: 虚拟号(模糊搜索)
type: string
- description: 企业ID
in: path
name: id
required: true
schema:
description: 企业ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoEnterpriseDeviceListResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 企业设备列表
tags:
- 企业设备授权
/api/admin/enterprises/{id}/password:
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateEnterprisePasswordReq'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 修改企业账号密码
tags:
- 企业客户管理
/api/admin/enterprises/{id}/recall-cards:
post:
parameters:
- description: 企业ID
in: path
name: id
required: true
schema:
description: 企业ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoRecallCardsReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoRecallCardsResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 回收卡授权
tags:
- 企业卡授权
/api/admin/enterprises/{id}/recall-devices:
post:
parameters:
- description: 企业ID
in: path
name: id
required: true
schema:
description: 企业ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoRecallDevicesReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoRecallDevicesResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 撤销设备授权
tags:
- 企业设备授权
/api/admin/enterprises/{id}/status:
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateEnterpriseStatusReq'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 启用/禁用企业
tags:
- 企业客户管理
/api/admin/exchanges:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 换货状态 (1:待填写信息, 2:待发货, 3:已发货待确认, 4:已完成, 5:已取消)
in: query
name: status
schema:
description: 换货状态 (1:待填写信息, 2:待发货, 3:已发货待确认, 4:已完成, 5:已取消)
maximum: 5
minimum: 1
nullable: true
type: integer
- description: 换货流程类型 (shipping:物流换货, direct:直接换货)
in: query
name: flow_type
schema:
description: 换货流程类型 (shipping:物流换货, direct:直接换货)
enum:
- shipping
- direct
type: string
- description: 资产标识符搜索(旧资产/新资产标识符模糊匹配)
in: query
name: identifier
schema:
description: 资产标识符搜索(旧资产/新资产标识符模糊匹配)
maxLength: 100
type: string
- description: 创建时间起始
in: query
name: created_at_start
schema:
description: 创建时间起始
format: date-time
nullable: true
type: string
- description: 创建时间结束
in: query
name: created_at_end
schema:
description: 创建时间结束
format: date-time
nullable: true
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoExchangeListResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取换货单列表
tags:
- 换货管理
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateExchangeRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoExchangeOrderResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建换货单
tags:
- 换货管理
/api/admin/exchanges/{id}:
get:
parameters:
- description: 换货单ID
in: path
name: id
required: true
schema:
description: 换货单ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoExchangeOrderResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取换货单详情
tags:
- 换货管理
/api/admin/exchanges/{id}/cancel:
post:
parameters:
- description: 换货单ID
in: path
name: id
required: true
schema:
description: 换货单ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoExchangeCancelParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 取消换货
tags:
- 换货管理
/api/admin/exchanges/{id}/complete:
post:
parameters:
- description: 换货单ID
in: path
name: id
required: true
schema:
description: 换货单ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 确认换货完成
tags:
- 换货管理
/api/admin/exchanges/{id}/renew:
post:
parameters:
- description: 换货单ID
in: path
name: id
required: true
schema:
description: 换货单ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 旧资产转新
tags:
- 换货管理
/api/admin/exchanges/{id}/ship:
post:
parameters:
- description: 换货单ID
in: path
name: id
required: true
schema:
description: 换货单ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoExchangeShipParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoExchangeOrderResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 换货发货
tags:
- 换货管理
/api/admin/export-tasks:
get:
description: 支持按 scene/status/time 过滤,分页默认 20,最大 100。
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 导出场景 (device:设备, iot_card:IoT卡, order:订单)
in: query
name: scene
schema:
description: 导出场景 (device:设备, iot_card:IoT卡, order:订单)
type: string
- description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:已失败, 5:已取消)
in: query
name: status
schema:
description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:已失败, 5:已取消)
maximum: 5
minimum: 1
nullable: true
type: integer
- description: 创建时间起始
in: query
name: start_time
schema:
description: 创建时间起始
format: date-time
nullable: true
type: string
- description: 创建时间结束
in: query
name: end_time
schema:
description: 创建时间结束
format: date-time
nullable: true
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoListExportTaskResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 导出任务列表
tags:
- 导出任务
post:
description: 创建统一导出任务,支持场景 scene=device/iot_card/order 和格式 format=xlsx/csv。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateExportTaskRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoCreateExportTaskResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建导出任务
tags:
- 导出任务
/api/admin/export-tasks/{id}:
get:
description: 已完成任务返回 download_url,链接固定有效期 24 小时。
parameters:
- description: 任务ID
in: path
name: id
required: true
schema:
description: 任务ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoExportTaskDetailResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 导出任务详情
tags:
- 导出任务
/api/admin/export-tasks/{id}/cancel:
post:
description: 支持取消待处理/处理中任务;已完成/已失败/已取消任务不可取消。
parameters:
- description: 任务ID
in: path
name: id
required: true
schema:
description: 任务ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoCancelExportTaskResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 取消导出任务
tags:
- 导出任务
/api/admin/iot-cards/{iccid}/realname-link:
get:
parameters:
- description: ICCID
in: path
name: iccid
required: true
schema:
description: ICCID
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/GatewayRealnameLinkResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取实名认证链接
tags:
- IoT卡管理
/api/admin/iot-cards/import:
post:
description: |-
仅平台用户可操作。
## ⚠️ 接口变更说明(BREAKING CHANGE)
本接口已从 `multipart/form-data` 改为 `application/json`。
文件格式从 CSV 升级为 Excel (.xlsx),解决长数字被转为科学记数法的问题。
### 完整导入流程
1. **获取上传 URL**: 调用 `POST /api/admin/storage/upload-url`
2. **上传 Excel 文件**: 使用预签名 URL 上传文件到对象存储
3. **调用本接口**: 使用返回的 `file_key` 提交导入任务
### 请求示例
```json
{
"carrier_id": 1,
"batch_no": "BATCH-2025-01",
"file_key": "imports/2025/01/24/abc123.xlsx"
}
```
### Excel 文件格式
- 文件格式:仅支持 .xlsx (Excel 2007+)
- 必填列(表头关键字):
- `ICCID`(或:卡号 / 号码)
- `MSISDN`(或:接入号 / 手机号 / 电话)
- `virtual_no`(或:VirtualNo / 虚拟号 / 设备号)—— **必填,缺少此列将导致整批导入失败**
- 首行为表头(可选,但建议包含)
- 列格式:设置为文本格式(避免长数字被转为科学记数法)
#### virtual_no 导入规则
- `virtual_no` 为必填字段,**不可为空**;为空的行记为失败并报告原因
- Excel 缺少 `virtual_no` 列时,整批导入直接失败(返回"Excel 文件缺少 virtual_no 列,请使用最新模板")
- `virtual_no` 与系统已有值重复时,该行记为失败
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoImportIotCardRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoImportIotCardResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 批量导入IoT卡(ICCID+MSISDN)
tags:
- IoT卡管理
/api/admin/iot-cards/import-tasks:
get:
description: 仅平台用户可操作。
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:失败)
in: query
name: status
schema:
description: 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:失败)
maximum: 4
minimum: 1
nullable: true
type: integer
- description: 运营商ID
in: query
name: carrier_id
schema:
description: 运营商ID
minimum: 0
nullable: true
type: integer
- description: 批次号(模糊查询)
in: query
name: batch_no
schema:
description: 批次号(模糊查询)
maxLength: 100
type: string
- description: 创建时间起始
in: query
name: start_time
schema:
description: 创建时间起始
format: date-time
nullable: true
type: string
- description: 创建时间结束
in: query
name: end_time
schema:
description: 创建时间结束
format: date-time
nullable: true
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoListImportTaskResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 导入任务列表
tags:
- IoT卡管理
/api/admin/iot-cards/import-tasks/{id}:
get:
description: 仅平台用户可操作。
parameters:
- description: 任务ID
in: path
name: id
required: true
schema:
description: 任务ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoImportTaskDetailResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 导入任务详情
tags:
- IoT卡管理
/api/admin/iot-cards/series-binding:
patch:
description: 批量设置或清除卡与套餐系列分配的关联关系。series_id 为目标套餐系列ID,0表示清除关联。支持 selection_type=list/range/filter:list 传 iccids(兼容旧请求,不传 selection_type 时默认按 iccids 处理),range 传 iccid_start/iccid_end,filter 按筛选条件选择完整结果,不受列表分页限制。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoBatchSetCardSeriesBindngRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoBatchSetCardSeriesBindngResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 批量设置卡的套餐系列绑定
tags:
- IoT卡管理
/api/admin/iot-cards/standalone:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 状态 (1:在库, 2:已分销, 3:已激活, 4:已停用)
in: query
name: status
schema:
description: 状态 (1:在库, 2:已分销, 3:已激活, 4:已停用)
maximum: 4
minimum: 1
nullable: true
type: integer
- description: 运营商ID
in: query
name: carrier_id
schema:
description: 运营商ID
minimum: 0
nullable: true
type: integer
- description: 分销商ID(兼容旧参数,单选)
in: query
name: shop_id
schema:
description: 分销商ID(兼容旧参数,单选)
minimum: 0
nullable: true
type: integer
- description: 分销商ID列表(多选)
in: query
name: shop_ids
schema:
description: 分销商ID列表(多选)
items:
minimum: 0
type: integer
type: array
- description: 套餐系列ID
in: query
name: series_id
schema:
description: 套餐系列ID
minimum: 0
nullable: true
type: integer
- description: ICCID(模糊查询)
in: query
name: iccid
schema:
description: ICCID(模糊查询)
maxLength: 20
type: string
- description: 卡虚拟号(模糊查询)
in: query
name: virtual_no
schema:
description: 卡虚拟号(模糊查询)
maxLength: 100
type: string
- description: 卡接入号(模糊查询)
in: query
name: msisdn
schema:
description: 卡接入号(模糊查询)
maxLength: 20
type: string
- description: 是否为独立卡(true:仅返回未绑定设备的卡, false:仅返回已绑定设备的卡, 不传:返回全部)
in: query
name: is_standalone
schema:
description: 是否为独立卡(true:仅返回未绑定设备的卡, false:仅返回已绑定设备的卡, 不传:返回全部)
nullable: true
type: boolean
- description: 批次号
in: query
name: batch_no
schema:
description: 批次号
maxLength: 100
type: string
- description: 套餐ID
in: query
name: package_id
schema:
description: 套餐ID
minimum: 0
nullable: true
type: integer
- description: 是否已分销 (true:已分销, false:未分销)
in: query
name: is_distributed
schema:
description: 是否已分销 (true:已分销, false:未分销)
nullable: true
type: boolean
- description: 是否有换卡记录 (true:有换卡记录, false:无换卡记录)
in: query
name: is_replaced
schema:
description: 是否有换卡记录 (true:有换卡记录, false:无换卡记录)
nullable: true
type: boolean
- description: 是否有生效中的套餐 (true:有生效中套餐, false:无生效中套餐, 不传:不过滤)
in: query
name: has_active_package
schema:
description: 是否有生效中的套餐 (true:有生效中套餐, false:无生效中套餐, 不传:不过滤)
nullable: true
type: boolean
- description: ICCID起始号
in: query
name: iccid_start
schema:
description: ICCID起始号
maxLength: 20
type: string
- description: ICCID结束号
in: query
name: iccid_end
schema:
description: ICCID结束号
maxLength: 20
type: string
- description: 运营商名称(模糊查询)
in: query
name: carrier_name
schema:
description: 运营商名称(模糊查询)
maxLength: 100
type: string
- description: 关键字搜索,匹配ICCID或卡虚拟号(模糊查询,与iccid/virtual_no独立)
in: query
name: keyword
schema:
description: 关键字搜索,匹配ICCID或卡虚拟号(模糊查询,与iccid/virtual_no独立)
maxLength: 100
type: string
- description: 网络状态 (0:停机, 1:开机)
in: query
name: network_status
schema:
description: 网络状态 (0:停机, 1:开机)
maximum: 1
minimum: 0
nullable: true
type: integer
- description: 按有效授权企业ID过滤(只返回当前授权给该企业的卡)
in: query
name: authorized_enterprise_id
schema:
description: 按有效授权企业ID过滤(只返回当前授权给该企业的卡)
minimum: 0
nullable: true
type: integer
- description: 企业授权状态过滤 (true:已授权给某企业, false:未授权任何企业)
in: query
name: is_authorized_to_enterprise
schema:
description: 企业授权状态过滤 (true:已授权给某企业, false:未授权任何企业)
nullable: true
type: boolean
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoListStandaloneIotCardResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 单卡列表(未绑定设备)
tags:
- IoT卡管理
/api/admin/iot-cards/standalone/allocate:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAllocateStandaloneCardsRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAllocateStandaloneCardsResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 批量分配单卡
tags:
- IoT卡管理
/api/admin/iot-cards/standalone/recall:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoRecallStandaloneCardsRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoRecallStandaloneCardsResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 批量回收单卡
tags:
- IoT卡管理
/api/admin/orders:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 支付状态 (1:待支付, 2:已支付, 3:已取消, 4:已退款)
in: query
name: payment_status
schema:
description: 支付状态 (1:待支付, 2:已支付, 3:已取消, 4:已退款)
maximum: 4
minimum: 1
nullable: true
type: integer
- description: 支付方式 (wallet:钱包支付, wechat:微信支付, alipay:支付宝支付, offline:线下支付)
in: query
name: payment_method
schema:
description: 支付方式 (wallet:钱包支付, wechat:微信支付, alipay:支付宝支付, offline:线下支付)
type: string
- description: 订单类型 (single_card:单卡购买, device:设备购买)
in: query
name: order_type
schema:
description: 订单类型 (single_card:单卡购买, device:设备购买)
type: string
- description: 所属代理商ID(销售来源店铺ID)
in: query
name: seller_shop_id
schema:
description: 所属代理商ID(销售来源店铺ID)
minimum: 1
nullable: true
type: integer
- description: 订单号(精确查询)
in: query
name: order_no
schema:
description: 订单号(精确查询)
maxLength: 30
type: string
- description: 订单角色 (self_purchase:自己购买, purchased_by_parent:上级代理购买, purchased_by_platform:平台代购, purchase_for_subordinate:给下级购买)
in: query
name: purchase_role
schema:
description: 订单角色 (self_purchase:自己购买, purchased_by_parent:上级代理购买, purchased_by_platform:平台代购, purchase_for_subordinate:给下级购买)
type: string
- description: 创建时间起始
in: query
name: start_time
schema:
description: 创建时间起始
format: date-time
nullable: true
type: string
- description: 创建时间结束
in: query
name: end_time
schema:
description: 创建时间结束
format: date-time
nullable: true
type: string
- description: 是否已过期 (true:已过期, false:未过期)
in: query
name: is_expired
schema:
description: 是否已过期 (true:已过期, false:未过期)
nullable: true
type: boolean
- description: 资产标识符(支持 ICCID/VirtualNo/IMEI/SN/MSISDN,按资产解析后查询对应订单)
in: query
name: identifier
schema:
description: 资产标识符(支持 ICCID/VirtualNo/IMEI/SN/MSISDN,按资产解析后查询对应订单)
maxLength: 100
type: string
- description: 买家手机号精确查询
in: query
name: buyer_phone
schema:
description: 买家手机号精确查询
maxLength: 20
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoOrderListResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取订单列表
tags:
- 订单管理
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateAdminOrderRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoOrderResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建订单
tags:
- 订单管理
/api/admin/orders/{id}:
get:
parameters:
- description: 订单ID
in: path
name: id
required: true
schema:
description: 订单ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoOrderResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取订单详情
tags:
- 订单管理
/api/admin/orders/{id}/cancel:
post:
parameters:
- description: 订单ID
in: path
name: id
required: true
schema:
description: 订单ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 取消订单
tags:
- 订单管理
/api/admin/orders/purchase-check:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoPurchaseCheckRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPurchaseCheckResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 套餐购买预检
tags:
- 订单管理
/api/admin/package-series:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 系列名称(模糊搜索)
in: query
name: series_name
schema:
description: 系列名称(模糊搜索)
maxLength: 255
nullable: true
type: string
- description: 状态 (0:禁用, 1:启用)
in: query
name: status
schema:
description: 状态 (0:禁用, 1:启用)
nullable: true
type: integer
- description: 是否启用一次性佣金
in: query
name: enable_one_time_commission
schema:
description: 是否启用一次性佣金
nullable: true
type: boolean
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPackageSeriesPageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 套餐系列列表
tags:
- 套餐系列管理
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreatePackageSeriesRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPackageSeriesResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建套餐系列
tags:
- 套餐系列管理
/api/admin/package-series/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除套餐系列
tags:
- 套餐系列管理
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPackageSeriesResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取套餐系列详情
tags:
- 套餐系列管理
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdatePackageSeriesParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPackageSeriesResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新套餐系列
tags:
- 套餐系列管理
/api/admin/package-series/{id}/status:
patch:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdatePackageSeriesStatusParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新套餐系列状态
tags:
- 套餐系列管理
/api/admin/package-usage/{id}/daily-records:
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPackageUsageDetailResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取套餐流量详单
tags:
- 套餐使用记录
/api/admin/packages:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 套餐名称(模糊搜索)
in: query
name: package_name
schema:
description: 套餐名称(模糊搜索)
maxLength: 255
nullable: true
type: string
- description: 套餐系列ID
in: query
name: series_id
schema:
description: 套餐系列ID
minimum: 0
nullable: true
type: integer
- description: 状态 (0:禁用, 1:启用)
in: query
name: status
schema:
description: 状态 (0:禁用, 1:启用)
nullable: true
type: integer
- description: 上架状态 (1:上架, 2:下架)
in: query
name: shelf_status
schema:
description: 上架状态 (1:上架, 2:下架)
nullable: true
type: integer
- description: 套餐类型 (formal:正式套餐, addon:附加套餐)
in: query
name: package_type
schema:
description: 套餐类型 (formal:正式套餐, addon:附加套餐)
nullable: true
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPackagePageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 套餐列表
tags:
- 套餐管理
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreatePackageRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPackageResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建套餐
tags:
- 套餐管理
/api/admin/packages/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除套餐
tags:
- 套餐管理
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPackageResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取套餐详情
tags:
- 套餐管理
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdatePackageParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPackageResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新套餐
tags:
- 套餐管理
/api/admin/packages/{id}/retail-price:
patch:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateRetailPriceParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 修改零售价(代理)
tags:
- 套餐管理
/api/admin/packages/{id}/shelf:
patch:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdatePackageShelfStatusParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新套餐上架状态
tags:
- 套餐管理
/api/admin/packages/{id}/status:
patch:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdatePackageStatusParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新套餐状态
tags:
- 套餐管理
/api/admin/permissions:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 权限名称模糊查询
in: query
name: perm_name
schema:
description: 权限名称模糊查询
maxLength: 50
type: string
- description: 权限编码模糊查询
in: query
name: perm_code
schema:
description: 权限编码模糊查询
maxLength: 100
type: string
- description: 权限类型 (1:菜单, 2:按钮)
in: query
name: perm_type
schema:
description: 权限类型 (1:菜单, 2:按钮)
maximum: 2
minimum: 1
nullable: true
type: integer
- description: 适用端口 (all:全部, web:Web后台, h5:H5端)
in: query
name: platform
schema:
description: 适用端口 (all:全部, web:Web后台, h5:H5端)
type: string
- description: 可用角色类型 (1:平台角色, 2:客户角色)
in: query
name: available_for_role_type
schema:
description: 可用角色类型 (1:平台角色, 2:客户角色)
maximum: 2
minimum: 1
nullable: true
type: integer
- description: 父权限ID
in: query
name: parent_id
schema:
description: 父权限ID
minimum: 0
nullable: true
type: integer
- description: 状态 (0:禁用, 1:启用)
in: query
name: status
schema:
description: 状态 (0:禁用, 1:启用)
maximum: 1
minimum: 0
nullable: true
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPermissionPageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 权限列表
tags:
- 权限
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreatePermissionRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPermissionResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建权限
tags:
- 权限
/api/admin/permissions/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除权限
tags:
- 权限
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPermissionResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取权限详情
tags:
- 权限
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdatePermissionParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPermissionResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新权限
tags:
- 权限
/api/admin/permissions/tree:
get:
parameters:
- description: 可用角色类型 (1:平台角色, 2:客户角色)
in: query
name: available_for_role_type
schema:
description: 可用角色类型 (1:平台角色, 2:客户角色)
maximum: 2
minimum: 1
nullable: true
type: integer
- description: 状态 (0:禁用, 1:启用)
in: query
name: status
schema:
description: 状态 (0:禁用, 1:启用)
maximum: 1
minimum: 0
nullable: true
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
items:
$ref: '#/components/schemas/DtoPermissionTreeNode'
type: array
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取权限树
tags:
- 权限
/api/admin/polling-alert-history/polling-alert-history:
get:
parameters:
- description: 规则ID
in: query
name: rule_id
schema:
description: 规则ID
minimum: 0
nullable: true
type: integer
- description: 页码
in: query
name: page
schema:
description: 页码
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingAlertHistoryListResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取轮询告警历史
tags:
- 轮询管理-告警
/api/admin/polling-alert-rules:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingAlertRuleListResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取轮询告警规则列表
tags:
- 轮询管理-告警
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreatePollingAlertRuleReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingAlertRuleResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建轮询告警规则
tags:
- 轮询管理-告警
/api/admin/polling-alert-rules/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除轮询告警规则
tags:
- 轮询管理-告警
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingAlertRuleResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取轮询告警规则详情
tags:
- 轮询管理-告警
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdatePollingAlertRuleParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新轮询告警规则
tags:
- 轮询管理-告警
/api/admin/polling-concurrency:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingConcurrencyListResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取轮询并发配置列表
tags:
- 轮询管理-并发控制
/api/admin/polling-concurrency/{task_type}:
get:
parameters:
- description: 任务类型
in: path
name: task_type
required: true
schema:
description: 任务类型
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingConcurrencyResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取指定任务类型的并发配置
tags:
- 轮询管理-并发控制
put:
parameters:
- description: 任务类型
in: path
name: task_type
required: true
schema:
description: 任务类型
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdatePollingConcurrencyReq'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新轮询并发配置
tags:
- 轮询管理-并发控制
/api/admin/polling-concurrency/reset:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoResetPollingConcurrencyReq'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 重置轮询并发计数
tags:
- 轮询管理-并发控制
/api/admin/polling-configs:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 状态 (1:启用, 0:禁用)
in: query
name: status
schema:
description: 状态 (1:启用, 0:禁用)
nullable: true
type: integer
- description: 卡状态条件
in: query
name: card_condition
schema:
description: 卡状态条件
nullable: true
type: string
- description: 卡业务类型
in: query
name: card_category
schema:
description: 卡业务类型
nullable: true
type: string
- description: 运营商ID
in: query
name: carrier_id
schema:
description: 运营商ID
minimum: 0
nullable: true
type: integer
- description: 配置名称(模糊搜索)
in: query
name: config_name
schema:
description: 配置名称(模糊搜索)
maxLength: 100
nullable: true
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingConfigPageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取轮询配置列表
tags:
- 轮询配置管理
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreatePollingConfigRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingConfigResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建轮询配置
tags:
- 轮询配置管理
/api/admin/polling-configs/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除轮询配置
tags:
- 轮询配置管理
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingConfigResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取轮询配置详情
tags:
- 轮询配置管理
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdatePollingConfigParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingConfigResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新轮询配置
tags:
- 轮询配置管理
/api/admin/polling-configs/{id}/status:
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdatePollingConfigStatusParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新轮询配置状态
tags:
- 轮询配置管理
/api/admin/polling-configs/enabled:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
items:
$ref: '#/components/schemas/DtoPollingConfigResponse'
type: array
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取所有启用的配置
tags:
- 轮询配置管理
/api/admin/polling-manual-trigger/batch:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoTriggerBatchReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoManualTriggerLogResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 批量手动触发
tags:
- 轮询管理-手动触发
/api/admin/polling-manual-trigger/by-condition:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoTriggerByConditionReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoManualTriggerLogResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 条件筛选触发
tags:
- 轮询管理-手动触发
/api/admin/polling-manual-trigger/cancel:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCancelTriggerReq'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 取消手动触发任务
tags:
- 轮询管理-手动触发
/api/admin/polling-manual-trigger/history:
get:
parameters:
- description: 任务类型筛选
in: query
name: task_type
schema:
description: 任务类型筛选
type: string
- description: 页码
in: query
name: page
schema:
description: 页码
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoManualTriggerLogListResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取手动触发历史
tags:
- 轮询管理-手动触发
/api/admin/polling-manual-trigger/single:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoTriggerSingleReq'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 单卡手动触发
tags:
- 轮询管理-手动触发
/api/admin/polling-manual-trigger/status:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoManualTriggerStatusResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取手动触发状态
tags:
- 轮询管理-手动触发
/api/admin/polling-stats:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingOverviewResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取轮询总览统计
tags:
- 轮询管理-监控
/api/admin/polling-stats/init-progress:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingInitProgressResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取轮询初始化进度
tags:
- 轮询管理-监控
/api/admin/polling-stats/queues:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingQueueStatusListResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取轮询队列状态
tags:
- 轮询管理-监控
/api/admin/polling-stats/tasks:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPollingTaskStatsListResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取轮询任务统计
tags:
- 轮询管理-监控
/api/admin/refunds:
get:
parameters:
- description: 页码(默认1)
in: query
name: page
schema:
description: 页码(默认1)
minimum: 1
type: integer
- description: 每页数量(默认20,最大100)
in: query
name: page_size
schema:
description: 每页数量(默认20,最大100)
maximum: 100
minimum: 1
type: integer
- description: 状态 (1:待审批, 2:已通过, 3:已拒绝, 4:已退回)
in: query
name: status
schema:
description: 状态 (1:待审批, 2:已通过, 3:已拒绝, 4:已退回)
maximum: 4
minimum: 1
nullable: true
type: integer
- description: 关联订单ID
in: query
name: order_id
schema:
description: 关联订单ID
minimum: 0
nullable: true
type: integer
- description: 店铺ID
in: query
name: shop_id
schema:
description: 店铺ID
minimum: 0
nullable: true
type: integer
- description: 资产标识精确检索(ICCID 或 设备虚拟号,非空时精确匹配)
in: query
name: asset_identifier
schema:
description: 资产标识精确检索(ICCID 或 设备虚拟号,非空时精确匹配)
maxLength: 100
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoRefundListResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 退款申请列表
tags:
- 退款管理
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateRefundRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoRefundResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建退款申请
tags:
- 退款管理
/api/admin/refunds/{id}:
get:
parameters:
- description: 退款申请ID
in: path
name: id
required: true
schema:
description: 退款申请ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoRefundResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 退款申请详情
tags:
- 退款管理
/api/admin/refunds/{id}/approve:
post:
parameters:
- description: 退款申请ID
in: path
name: id
required: true
schema:
description: 退款申请ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoApproveRefundRequest'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 审批通过退款申请
tags:
- 退款管理
/api/admin/refunds/{id}/reject:
post:
parameters:
- description: 退款申请ID
in: path
name: id
required: true
schema:
description: 退款申请ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoRejectRefundRequest'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 审批拒绝退款申请
tags:
- 退款管理
/api/admin/refunds/{id}/resubmit:
post:
parameters:
- description: 退款申请ID
in: path
name: id
required: true
schema:
description: 退款申请ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoResubmitRefundRequest'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 重新提交退款申请
tags:
- 退款管理
/api/admin/refunds/{id}/return:
post:
parameters:
- description: 退款申请ID
in: path
name: id
required: true
schema:
description: 退款申请ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoReturnRefundRequest'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 退回退款申请
tags:
- 退款管理
/api/admin/roles:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 角色名称模糊查询
in: query
name: role_name
schema:
description: 角色名称模糊查询
maxLength: 50
type: string
- description: 角色类型 (1:平台角色, 2:客户角色)
in: query
name: role_type
schema:
description: 角色类型 (1:平台角色, 2:客户角色)
maximum: 2
minimum: 1
nullable: true
type: integer
- description: 状态 (0:禁用, 1:启用)
in: query
name: status
schema:
description: 状态 (0:禁用, 1:启用)
maximum: 1
minimum: 0
nullable: true
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoRolePageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 角色列表
tags:
- 角色
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateRoleRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoRoleResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建角色
tags:
- 角色
/api/admin/roles/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除角色
tags:
- 角色
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoRoleResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取角色详情
tags:
- 角色
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateRoleParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoRoleResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新角色
tags:
- 角色
/api/admin/roles/{id}/permissions:
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
items:
$ref: '#/components/schemas/ModelPermission'
type: array
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取角色权限
tags:
- 角色
post:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAssignPermissionsParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 分配权限
tags:
- 角色
/api/admin/roles/{id}/status:
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateRoleStatusParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新角色状态
tags:
- 角色
/api/admin/roles/{role_id}/permissions:
delete:
parameters:
- description: 角色ID
in: path
name: role_id
required: true
schema:
description: 角色ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoBatchRemovePermissionsRequest'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 批量移除权限
tags:
- 角色
/api/admin/roles/{role_id}/permissions/{perm_id}:
delete:
parameters:
- description: 角色ID
in: path
name: role_id
required: true
schema:
description: 角色ID
minimum: 0
type: integer
- description: 权限ID
in: path
name: perm_id
required: true
schema:
description: 权限ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 移除权限
tags:
- 角色
/api/admin/shop-package-batch-allocations:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoBatchAllocatePackagesRequest'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 批量分配套餐
tags:
- 批量套餐分配
/api/admin/shop-package-batch-pricing:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoBatchUpdateCostPriceRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoBatchUpdateCostPriceResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 批量调价
tags:
- 批量套餐调价
/api/admin/shop-series-grants:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 过滤被授权店铺ID
in: query
name: shop_id
schema:
description: 过滤被授权店铺ID
minimum: 0
nullable: true
type: integer
- description: 过滤套餐系列ID
in: query
name: series_id
schema:
description: 过滤套餐系列ID
minimum: 0
nullable: true
type: integer
- description: 过滤分配者店铺ID
in: query
name: allocator_shop_id
schema:
description: 过滤分配者店铺ID
minimum: 0
nullable: true
type: integer
- description: 过滤状态 0=禁用 1=启用
in: query
name: status
schema:
description: 过滤状态 0=禁用 1=启用
nullable: true
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoShopSeriesGrantPageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 查询代理系列授权列表
tags:
- 代理系列授权
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateShopSeriesGrantRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoShopSeriesGrantResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建代理系列授权
tags:
- 代理系列授权
/api/admin/shop-series-grants/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除代理系列授权
tags:
- 代理系列授权
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoShopSeriesGrantResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 查询代理系列授权详情
tags:
- 代理系列授权
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateShopSeriesGrantParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoShopSeriesGrantResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新代理系列授权
tags:
- 代理系列授权
/api/admin/shop-series-grants/{id}/packages:
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoManageGrantPackagesParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoShopSeriesGrantResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 管理授权套餐(新增/更新/删除)
tags:
- 代理系列授权
/api/admin/shops:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 店铺名称模糊查询
in: query
name: shop_name
schema:
description: 店铺名称模糊查询
maxLength: 100
type: string
- description: 店铺编号模糊查询
in: query
name: shop_code
schema:
description: 店铺编号模糊查询
maxLength: 50
type: string
- description: 上级店铺ID
in: query
name: parent_id
schema:
description: 上级店铺ID
minimum: 1
nullable: true
type: integer
- description: 店铺层级 (1-7级)
in: query
name: level
schema:
description: 店铺层级 (1-7级)
maximum: 7
minimum: 1
nullable: true
type: integer
- description: 状态 (0:禁用, 1:启用)
in: query
name: status
schema:
description: 状态 (0:禁用, 1:启用)
nullable: true
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoShopPageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 店铺列表
tags:
- 店铺管理
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateShopRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoShopResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建店铺
tags:
- 店铺管理
/api/admin/shops/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除店铺
tags:
- 店铺管理
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateShopParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoShopResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新店铺
tags:
- 店铺管理
/api/admin/shops/{shop_id}/commission-daily-stats:
get:
parameters:
- description: 开始日期(YYYY-MM-DD)
in: query
name: start_date
schema:
description: 开始日期(YYYY-MM-DD)
nullable: true
type: string
- description: 结束日期(YYYY-MM-DD)
in: query
name: end_date
schema:
description: 结束日期(YYYY-MM-DD)
nullable: true
type: string
- description: 查询天数(默认30天)
in: query
name: days
schema:
description: 查询天数(默认30天)
maximum: 365
minimum: 1
nullable: true
type: integer
- description: 店铺ID
in: path
name: shop_id
required: true
schema:
description: 店铺ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
items:
$ref: '#/components/schemas/DtoDailyCommissionStatsResponse'
type: array
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 代理商每日佣金统计
tags:
- 代理商资金管理
/api/admin/shops/{shop_id}/commission-records:
get:
parameters:
- description: 页码(默认1)
in: query
name: page
schema:
description: 页码(默认1)
minimum: 1
type: integer
- description: 每页数量(默认20,最大100)
in: query
name: page_size
schema:
description: 每页数量(默认20,最大100)
maximum: 100
minimum: 1
type: integer
- description: 佣金来源 (cost_diff:成本价差, one_time:一次性佣金, tier_bonus(已废弃):梯度奖励)
in: query
name: commission_source
schema:
description: 佣金来源 (cost_diff:成本价差, one_time:一次性佣金, tier_bonus(已废弃):梯度奖励)
type: string
- description: ICCID(模糊查询)
in: query
name: iccid
schema:
description: ICCID(模糊查询)
maxLength: 50
type: string
- description: 设备虚拟号(模糊查询)
in: query
name: virtual_no
schema:
description: 设备虚拟号(模糊查询)
maxLength: 50
type: string
- description: 订单号(模糊查询)
in: query
name: order_no
schema:
description: 订单号(模糊查询)
maxLength: 50
type: string
- description: 店铺ID
in: path
name: shop_id
required: true
schema:
description: 店铺ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoShopCommissionRecordPageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 代理商佣金明细
tags:
- 代理商资金管理
/api/admin/shops/{shop_id}/commission-stats:
get:
parameters:
- description: 开始时间
in: query
name: start_time
schema:
description: 开始时间
nullable: true
type: string
- description: 结束时间
in: query
name: end_time
schema:
description: 结束时间
nullable: true
type: string
- description: 店铺ID
in: path
name: shop_id
required: true
schema:
description: 店铺ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoCommissionStatsResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 代理商佣金统计
tags:
- 代理商资金管理
/api/admin/shops/{shop_id}/main-wallet/transactions:
get:
parameters:
- description: 页码(默认1)
in: query
name: page
schema:
description: 页码(默认1)
minimum: 1
type: integer
- description: 每页数量(默认20,最大100)
in: query
name: page_size
schema:
description: 每页数量(默认20,最大100)
maximum: 100
minimum: 1
type: integer
- description: 交易类型过滤(recharge:充值入账, deduct:套餐扣款, refund:退款)
in: query
name: transaction_type
schema:
description: 交易类型过滤(recharge:充值入账, deduct:套餐扣款, refund:退款)
maxLength: 50
type: string
- description: 开始日期(YYYY-MM-DD)
in: query
name: start_date
schema:
description: 开始日期(YYYY-MM-DD)
type: string
- description: 结束日期(YYYY-MM-DD)
in: query
name: end_date
schema:
description: 结束日期(YYYY-MM-DD)
type: string
- description: 资产标识精确检索(ICCID 或 设备虚拟号,非空时精确匹配)
in: query
name: asset_identifier
schema:
description: 资产标识精确检索(ICCID 或 设备虚拟号,非空时精确匹配)
maxLength: 100
type: string
- description: 店铺ID
in: path
name: shop_id
required: true
schema:
description: 店铺ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoMainWalletTransactionListResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 代理商预充值钱包流水
tags:
- 代理商资金管理
/api/admin/shops/{shop_id}/roles:
get:
parameters:
- description: 店铺ID
in: path
name: shop_id
required: true
schema:
description: 店铺ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoShopRolesResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 查询店铺默认角色
tags:
- 店铺管理
post:
parameters:
- description: 店铺ID
in: path
name: shop_id
required: true
schema:
description: 店铺ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAssignShopRolesRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoShopRolesResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 分配店铺默认角色
tags:
- 店铺管理
/api/admin/shops/{shop_id}/roles/{role_id}:
delete:
parameters:
- description: 店铺ID
in: path
name: shop_id
required: true
schema:
description: 店铺ID
minimum: 0
type: integer
- description: 角色ID
in: path
name: role_id
required: true
schema:
description: 角色ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除店铺默认角色
tags:
- 店铺管理
/api/admin/shops/{shop_id}/withdrawal-requests:
get:
parameters:
- description: 页码(默认1)
in: query
name: page
schema:
description: 页码(默认1)
minimum: 1
type: integer
- description: 每页数量(默认20,最大100)
in: query
name: page_size
schema:
description: 每页数量(默认20,最大100)
maximum: 100
minimum: 1
type: integer
- description: 提现单号(精确查询)
in: query
name: withdrawal_no
schema:
description: 提现单号(精确查询)
maxLength: 50
type: string
- description: 申请开始时间(格式:2006-01-02 15:04:05)
in: query
name: start_time
schema:
description: 申请开始时间(格式:2006-01-02 15:04:05)
type: string
- description: 申请结束时间(格式:2006-01-02 15:04:05)
in: query
name: end_time
schema:
description: 申请结束时间(格式:2006-01-02 15:04:05)
type: string
- description: 店铺ID
in: path
name: shop_id
required: true
schema:
description: 店铺ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoShopWithdrawalRequestPageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 代理商提现记录
tags:
- 代理商资金管理
post:
parameters:
- description: 店铺ID
in: path
name: shop_id
required: true
schema:
description: 店铺ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateMyWithdrawalReq'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoCreateMyWithdrawalResp'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 发起提现申请
tags:
- 代理商资金管理
/api/admin/shops/cascade:
get:
parameters:
- description: 店铺名称(模糊查询)
in: query
name: shop_name
schema:
description: 店铺名称(模糊查询)
maxLength: 100
type: string
- description: 上级店铺ID(不传则查询顶级店铺)
in: query
name: parent_id
schema:
description: 上级店铺ID(不传则查询顶级店铺)
minimum: 1
nullable: true
type: integer
- description: 是否排除当前账号自身店铺,默认false
in: query
name: exclude_self
schema:
description: 是否排除当前账号自身店铺,默认false
type: boolean
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
items:
$ref: '#/components/schemas/DtoShopCascadeItem'
type: array
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 店铺联级查询
tags:
- 店铺管理
/api/admin/shops/fund-summary:
get:
parameters:
- description: 页码(默认1)
in: query
name: page
schema:
description: 页码(默认1)
minimum: 1
type: integer
- description: 每页数量(默认20,最大100)
in: query
name: page_size
schema:
description: 每页数量(默认20,最大100)
maximum: 100
minimum: 1
type: integer
- description: 店铺名称(模糊查询)
in: query
name: shop_name
schema:
description: 店铺名称(模糊查询)
maxLength: 100
type: string
- description: 主账号用户名(模糊查询)
in: query
name: username
schema:
description: 主账号用户名(模糊查询)
maxLength: 50
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoShopFundSummaryPageResult'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 代理商资金概况
tags:
- 代理商资金管理
/api/admin/storage/batch-download-urls:
post:
description: |-
## 文件展示流程
本接口用于批量获取对象存储文件的预签名下载 URL。由于存储桶为私有访问,文件不能直接通过路径访问,必须通过预签名 URL 才能展示。
### 为什么需要这个接口
对象存储使用私有 Bucket,文件路径(file_key)本身无法直接访问。前端持有的 file_key 只是文件标识,需要通过本接口换取带签名的临时访问 URL,才能在 `
` 或下载链接中使用。
### 完整使用流程
1. **业务接口返回 file_key**(存储在数据库中的文件路径标识)
2. **调用本接口** 传入所有需要展示的 file_key 列表
3. **使用返回的 URL** 直接赋值给 `
` 或下载链接,图片/文件内容直接从对象存储加载,不经过后端
### 列表页批量展示示例
```javascript
// 假设列表数据中每条记录有 avatar_key 字段
const listData = await api.get('/customers');
// 收集所有 file_key(过滤掉空值)
const fileKeys = listData.map(item => item.avatar_key).filter(Boolean);
// 一次性换取所有下载 URL
const { data } = await api.post('/storage/batch-download-urls', {
file_keys: fileKeys
});
// 渲染时通过 map 取对应 URL
listData.forEach(item => {
item.avatarUrl = data.urls[item.avatar_key] ?? '';
});
```
### 单个文件展示示例
```javascript
// 详情页只有一个文件时,也走批量接口(保持一致)
const { data } = await api.post('/storage/batch-download-urls', {
file_keys: [record.license_key]
});
const licenseUrl = data.urls[record.license_key];
```
### 前端缓存建议
预签名 URL 有效期 **24 小时**,建议在内存中缓存,避免同一页面重复请求:
```javascript
const urlCache = new Map(); // key: file_key, value: { url, expireAt }
async function getFileUrl(fileKey) {
const cached = urlCache.get(fileKey);
if (cached && cached.expireAt > Date.now()) {
return cached.url;
}
const { data } = await api.post('/storage/batch-download-urls', {
file_keys: [fileKey]
});
const url = data.urls[fileKey];
urlCache.set(fileKey, { url, expireAt: Date.now() + data.expires_in * 1000 * 0.9 });
return url;
}
```
### 注意事项
- 单次请求最多 **50 个** file_key
- 预签名 URL 有效期 **24 小时**,过期后需重新获取
- file_key 不存在时对应的 URL 生成会失败,整个请求返回错误
- 图片/文件内容直接从对象存储加载到浏览器,**不经过后端**,不消耗服务器带宽
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoGetBatchDownloadURLsRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoGetBatchDownloadURLsResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 批量获取文件下载预签名 URL
tags:
- 对象存储
/api/admin/storage/upload-url:
post:
description: |-
## 文件上传流程
本接口用于获取对象存储的预签名上传 URL,实现前端直传文件到对象存储。
### 完整流程
1. **调用本接口** 获取预签名 URL 和 file_key
2. **使用预签名 URL 上传文件** 发起 PUT 请求直接上传到对象存储
3. **调用业务接口** 使用 file_key 调用相关业务接口(如 ICCID 导入)
### 前端上传示例
```javascript
// 1. 获取预签名 URL
const { data } = await api.post('/storage/upload-url', {
file_name: 'cards.xlsx',
content_type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
purpose: 'iot_import'
});
// 2. 上传文件到对象存储
await fetch(data.upload_url, {
method: 'PUT',
headers: { 'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' },
body: file
});
// 3. 调用业务接口
await api.post('/iot-cards/import', {
carrier_id: 1,
batch_no: 'BATCH-2025-01',
file_key: data.file_key
});
```
### purpose 可选值
| 值 | 说明 | 生成路径格式 |
|---|------|-------------|
| iot_import | ICCID/设备导入 (Excel) | imports/YYYY/MM/DD/uuid.xlsx |
| export | 数据导出 | exports/YYYY/MM/DD/uuid.xlsx |
| attachment | 附件上传 | attachments/YYYY/MM/DD/uuid.ext |
### 注意事项
- 预签名 URL 有效期 **15 分钟**,请及时使用
- 上传时 Content-Type 需与请求时一致
- file_key 在上传成功后永久有效,用于后续业务接口调用
- 上传失败时可重新调用本接口获取新的 URL
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoGetUploadURLRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoGetUploadURLResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取文件上传预签名 URL
tags:
- 对象存储
/api/admin/super-admin/operation-password:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoSetOperationPasswordRequest'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 设置/修改全局操作密码
tags:
- 超级管理员
/api/admin/super-admin/operation-password/status:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoOperationPasswordStatusResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 查询操作密码是否已设置
tags:
- 超级管理员
/api/admin/wechat-configs:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 支付渠道类型 (wechat:微信直连v3, wechat_v2:微信直连v2, fuiou:富友)
in: query
name: provider_type
schema:
description: 支付渠道类型 (wechat:微信直连v3, wechat_v2:微信直连v2, fuiou:富友)
nullable: true
type: string
- description: 是否激活 (true:已激活, false:未激活)
in: query
name: is_active
schema:
description: 是否激活 (true:已激活, false:未激活)
nullable: true
type: boolean
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWechatConfigListResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取支付配置列表
tags:
- 微信支付配置管理
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoCreateWechatConfigRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWechatConfigResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建支付配置
tags:
- 微信支付配置管理
/api/admin/wechat-configs/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 删除支付配置
tags:
- 微信支付配置管理
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWechatConfigResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取支付配置详情
tags:
- 微信支付配置管理
put:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoUpdateWechatConfigParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWechatConfigResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新支付配置
tags:
- 微信支付配置管理
/api/admin/wechat-configs/{id}/activate:
post:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWechatConfigResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 激活支付配置
tags:
- 微信支付配置管理
/api/admin/wechat-configs/{id}/deactivate:
post:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWechatConfigResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 停用支付配置
tags:
- 微信支付配置管理
/api/admin/wechat-configs/active:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWechatConfigResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取当前生效的支付配置
tags:
- 微信支付配置管理
/api/auth/login:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoLoginRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoLoginResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
summary: 统一登录(后台+H5)
tags:
- 统一认证
/api/auth/logout:
post:
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 统一登出
tags:
- 统一认证
/api/auth/me:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoUserInfo'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取用户信息
tags:
- 统一认证
/api/auth/password:
put:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoChangePasswordRequest'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 修改密码
tags:
- 统一认证
/api/auth/refresh-token:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoRefreshTokenRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoRefreshTokenResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
summary: 刷新 Token
tags:
- 统一认证
/api/c/v1/asset/info:
get:
parameters:
- description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
in: query
name: identifier
required: true
schema:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetInfoResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 资产信息
tags:
- 个人客户 - 资产
/api/c/v1/asset/package-history:
get:
parameters:
- description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
in: query
name: identifier
required: true
schema:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
- description: 套餐类型 (formal:正式套餐, addon:加油包)
in: query
name: package_type
schema:
description: 套餐类型 (formal:正式套餐, addon:加油包)
nullable: true
type: string
- description: 套餐状态 (0:待生效, 1:生效中, 2:已用完, 3:已过期, 4:已失效)
in: query
name: status
schema:
description: 套餐状态 (0:待生效, 1:生效中, 2:已用完, 3:已过期, 4:已失效)
maximum: 4
minimum: 0
nullable: true
type: integer
- description: 页码
in: query
name: page
required: true
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
required: true
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetPackageHistoryResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 资产套餐历史
tags:
- 个人客户 - 资产
/api/c/v1/asset/packages:
get:
parameters:
- description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
in: query
name: identifier
required: true
schema:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetPackageListResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 资产可购套餐列表
tags:
- 个人客户 - 资产
/api/c/v1/asset/refresh:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAssetRefreshRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAssetRefreshResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 资产刷新
tags:
- 个人客户 - 资产
/api/c/v1/auth/bind-phone:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoBindPhoneRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoBindPhoneResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 绑定手机号
tags:
- 个人客户 - 认证
/api/c/v1/auth/change-phone:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoChangePhoneRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoChangePhoneResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更换手机号
tags:
- 个人客户 - 认证
/api/c/v1/auth/logout:
post:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoLogoutResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 退出登录
tags:
- 个人客户 - 认证
/api/c/v1/auth/miniapp-login:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoMiniappLoginRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWechatLoginResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
summary: 小程序登录
tags:
- 个人客户 - 认证
/api/c/v1/auth/send-code:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoClientSendCodeRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoClientSendCodeResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
summary: 发送验证码
tags:
- 个人客户 - 认证
/api/c/v1/auth/verify-asset:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoVerifyAssetRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoVerifyAssetResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
summary: 资产验证
tags:
- 个人客户 - 认证
/api/c/v1/auth/wechat-login:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoWechatLoginRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWechatLoginResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
summary: 公众号登录
tags:
- 个人客户 - 认证
/api/c/v1/device/cards:
get:
parameters:
- description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
in: query
name: identifier
required: true
schema:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoDeviceCardListResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取设备卡列表
tags:
- 个人客户 - 设备
/api/c/v1/device/factory-reset:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoDeviceFactoryResetRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoDeviceOperationResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 恢复出厂设置
tags:
- 个人客户 - 设备
/api/c/v1/device/reboot:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoDeviceRebootRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoDeviceOperationResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 设备重启
tags:
- 个人客户 - 设备
/api/c/v1/device/switch-card:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoDeviceSwitchCardRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoDeviceSwitchCardResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 设备切卡
tags:
- 个人客户 - 设备
/api/c/v1/device/wifi:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoDeviceWifiRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoDeviceOperationResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 设备WiFi配置
tags:
- 个人客户 - 设备
/api/c/v1/exchange/{id}/shipping-info:
post:
parameters:
- description: 换货单ID
in: path
name: id
required: true
schema:
description: 换货单ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoClientShippingInfoParams'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 提交收货信息
tags:
- 个人客户 - 换货
/api/c/v1/exchange/pending:
get:
parameters:
- description: 资产标识符(ICCID/虚拟号/IMEI/SN)
in: query
name: identifier
required: true
schema:
description: 资产标识符(ICCID/虚拟号/IMEI/SN)
maxLength: 100
minLength: 1
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoClientExchangePendingResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 查询待处理换货单
tags:
- 个人客户 - 换货
/api/c/v1/orders:
get:
parameters:
- description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
in: query
name: identifier
required: true
schema:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
- description: 支付状态 (1:待支付, 2:已支付, 3:已取消, 4:已退款)
in: query
name: payment_status
schema:
description: 支付状态 (1:待支付, 2:已支付, 3:已取消, 4:已退款)
maximum: 4
minimum: 1
nullable: true
type: integer
- description: 页码
in: query
name: page
required: true
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
required: true
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoClientOrderListResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 订单列表
tags:
- 个人客户 - 订单
/api/c/v1/orders/{id}:
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoClientOrderDetailResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 订单详情
tags:
- 个人客户 - 订单
/api/c/v1/orders/{id}/pay:
post:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoClientPayOrderParams'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoClientPayOrderResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 订单支付
tags:
- 个人客户 - 订单
/api/c/v1/orders/create:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoClientCreateOrderRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoClientCreateOrderResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建订单
tags:
- 个人客户 - 订单
/api/c/v1/profile:
get:
description: 获取当前登录客户的个人资料
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/AppPersonalCustomerDTO'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取个人资料
tags:
- 个人客户 - 账户
put:
description: 更新当前登录客户的昵称和头像
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AppUpdateProfileRequest'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 更新个人资料
tags:
- 个人客户 - 账户
/api/c/v1/realname/link:
get:
parameters:
- description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
in: query
name: identifier
required: true
schema:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
- description: 物联网卡ICCID
in: query
name: iccid
schema:
description: 物联网卡ICCID
maxLength: 30
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoRealnimeLinkResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取实名认证链接
tags:
- 个人客户 - 实名
/api/c/v1/recharge-orders:
get:
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
type: integer
- description: 状态过滤 (0:待支付, 1:已支付, 2:已关闭, 3:已退款)
in: query
name: status
schema:
description: 状态过滤 (0:待支付, 1:已支付, 2:已关闭, 3:已退款)
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 充值订单列表
tags:
- 个人客户 - 充值订单
/api/c/v1/recharge-orders/{id}:
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 充值订单详情
tags:
- 个人客户 - 充值订单
/api/c/v1/wallet/detail:
get:
parameters:
- description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
in: query
name: identifier
required: true
schema:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWalletDetailResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 钱包详情
tags:
- 个人客户 - 钱包
/api/c/v1/wallet/recharge:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoClientCreateRechargeRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoClientRechargeResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 创建充值订单
tags:
- 个人客户 - 钱包
/api/c/v1/wallet/recharge-check:
get:
parameters:
- description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
in: query
name: identifier
required: true
schema:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoClientRechargeCheckResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 充值前校验
tags:
- 个人客户 - 钱包
/api/c/v1/wallet/recharges:
get:
parameters:
- description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
in: query
name: identifier
required: true
schema:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
- description: 充值状态 (0:待支付, 1:已支付, 2:已关闭)
in: query
name: status
schema:
description: 充值状态 (0:待支付, 1:已支付, 2:已关闭)
maximum: 2
minimum: 0
nullable: true
type: integer
- description: 页码
in: query
name: page
required: true
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
required: true
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoClientRechargeListResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 充值记录列表
tags:
- 个人客户 - 钱包
/api/c/v1/wallet/transactions:
get:
parameters:
- description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
in: query
name: identifier
required: true
schema:
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
maxLength: 50
minLength: 1
type: string
- description: 流水类型
in: query
name: transaction_type
schema:
description: 流水类型
maxLength: 50
type: string
- description: 开始时间
in: query
name: start_time
schema:
description: 开始时间
maxLength: 32
type: string
- description: 结束时间
in: query
name: end_time
schema:
description: 结束时间
maxLength: 32
type: string
- description: 页码
in: query
name: page
required: true
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
required: true
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWalletTransactionListResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 钱包流水列表
tags:
- 个人客户 - 钱包
/api/c/v1/wechat/appid:
get:
description: 用于 C 端免登录场景获取当前生效微信配置中的公众号 AppID,响应仅返回 app_id 字段
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoWechatAppIDResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
summary: 获取当前生效的公众号 AppID
tags:
- 个人客户 - 微信
/api/c/v1/wechat/jssdk-config:
get:
description: 前端调用 wx.config() 初始化微信 JS-SDK 时所需的签名参数,需传入当前页面完整 URL
parameters:
- description: '当前页面完整 URL(含协议和路径,不含 # 及其后内容)'
in: query
name: url
required: true
schema:
description: '当前页面完整 URL(含协议和路径,不含 # 及其后内容)'
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoJSSDKConfigResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
summary: 获取微信 JSSDK 签名配置
tags:
- 个人客户 - 微信
/api/callback/alipay:
post:
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
summary: 支付宝回调
tags:
- 支付回调
/api/callback/fuiou-pay:
post:
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
summary: 富友支付回调
tags:
- 支付回调
/api/callback/wechat-pay:
post:
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
summary: 微信支付回调
tags:
- 支付回调
/api/open/v1/cards/realname-status:
get:
description: |-
认证方式:
1. 每个请求必须携带 Header:X-Agent-Account、X-Agent-Password、X-Agent-Timestamp、X-Agent-Nonce、X-Agent-Sign。
2. Header 字段说明:
- X-Agent-Account:代理账号标识,填写代理登录平台使用的用户名或手机号,例如 agent001;该值由平台开通代理账号时提供,必须与签名原文 account 行完全一致。
- X-Agent-Password:代理账号当前登录密码,由代理账号持有人提供;该值同时作为 HMAC-SHA256 签名密钥,密码变更后必须使用新密码签名。
- X-Agent-Timestamp:请求发起时间,由调用方生成,支持 Unix 秒、Unix 毫秒或 RFC3339 时间,例如 1715400000、1715400000000 或 2024-05-11T10:00:00+08:00;必须与签名原文 timestamp 行完全一致。
- X-Agent-Nonce:请求随机串,由调用方每次请求自行生成,例如 UUID、雪花 ID 或“时间戳+随机数”;不需要平台提前分配,同一账号在 5 分钟内不可重复。
- X-Agent-Sign:请求签名,由调用方按下方规则实时计算得到,不是平台分配的固定值;只要 method、path、query、body、timestamp、nonce、account 或 password 任意一个变化,签名都会变化。
3. X-Agent-Timestamp 超出允许时间窗口会认证失败;客户端服务器时间应保持同步。
4. X-Agent-Nonce 重复会被判定为重放请求。
5. 签名原文按 7 行拼接,行尾使用 \n,最后一行后不追加换行:
METHOD
PATH
canonical_query
body_sha256
timestamp
nonce
account
6. METHOD 使用大写 HTTP 方法;PATH 只取请求路径,例如 /api/open/v1/cards/status,不包含域名和 query。
7. canonical_query 为 query 参数规范化结果:排除 sign 字段,参数名升序;同名多值按值升序;key 和 value 使用 URL QueryEscape 编码后用 key=value 拼接,多个参数用 & 连接;无 query 时为空字符串。
8. body_sha256 为原始请求 body 字节的 SHA256 小写十六进制值;GET 或空 body 使用空字符串的 SHA256;POST JSON 请求必须用最终发送的 body 字符串计算,签名和请求发送的 body 必须完全一致。
9. X-Agent-Sign = hex(HMAC-SHA256(password, sign_payload)),password 为 X-Agent-Password 的原始值,结果使用小写十六进制。
Node.js 签名示例:
```javascript
const crypto = require("crypto");
function queryEscape(value) {
return new URLSearchParams({ v: String(value) }).toString().slice(2);
}
function canonicalQuery(params) {
return Object.entries(params || {})
.filter(([key]) => key.toLowerCase() !== "sign")
.flatMap(([key, value]) => {
const values = Array.isArray(value) ? value : [value];
return values.sort().map((item) => [key, item]);
})
.sort(([aKey, aValue], [bKey, bValue]) => {
if (aKey === bKey) return String(aValue).localeCompare(String(bValue));
return aKey.localeCompare(bKey);
})
.map(([key, value]) => queryEscape(key) + "=" + queryEscape(value))
.join("&");
}
function buildAgentSign({ method, path, query, body, timestamp, nonce, account, password }) {
const bodyText = body || "";
const bodyHash = crypto.createHash("sha256").update(bodyText).digest("hex");
const signPayload = [
method.toUpperCase(),
path,
canonicalQuery(query),
bodyHash,
timestamp,
nonce,
account,
].join("\n");
return crypto.createHmac("sha256", password).update(signPayload).digest("hex");
}
```
按 card_no 查询单卡实名状态。
parameters:
- description: 卡标识(支持 ICCID、虚拟号、MSISDN)
in: query
name: card_no
required: true
schema:
description: 卡标识(支持 ICCID、虚拟号、MSISDN)
maxLength: 100
minLength: 1
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAgentOpenAPIRealnameStatusResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- AgentOpenAPIAccount: []
AgentOpenAPINonce: []
AgentOpenAPIPassword: []
AgentOpenAPISign: []
AgentOpenAPITimestamp: []
summary: 查询单卡实名状态
tags:
- 代理开放接口
/api/open/v1/cards/resume:
post:
description: |-
认证方式:
1. 每个请求必须携带 Header:X-Agent-Account、X-Agent-Password、X-Agent-Timestamp、X-Agent-Nonce、X-Agent-Sign。
2. Header 字段说明:
- X-Agent-Account:代理账号标识,填写代理登录平台使用的用户名或手机号,例如 agent001;该值由平台开通代理账号时提供,必须与签名原文 account 行完全一致。
- X-Agent-Password:代理账号当前登录密码,由代理账号持有人提供;该值同时作为 HMAC-SHA256 签名密钥,密码变更后必须使用新密码签名。
- X-Agent-Timestamp:请求发起时间,由调用方生成,支持 Unix 秒、Unix 毫秒或 RFC3339 时间,例如 1715400000、1715400000000 或 2024-05-11T10:00:00+08:00;必须与签名原文 timestamp 行完全一致。
- X-Agent-Nonce:请求随机串,由调用方每次请求自行生成,例如 UUID、雪花 ID 或“时间戳+随机数”;不需要平台提前分配,同一账号在 5 分钟内不可重复。
- X-Agent-Sign:请求签名,由调用方按下方规则实时计算得到,不是平台分配的固定值;只要 method、path、query、body、timestamp、nonce、account 或 password 任意一个变化,签名都会变化。
3. X-Agent-Timestamp 超出允许时间窗口会认证失败;客户端服务器时间应保持同步。
4. X-Agent-Nonce 重复会被判定为重放请求。
5. 签名原文按 7 行拼接,行尾使用 \n,最后一行后不追加换行:
METHOD
PATH
canonical_query
body_sha256
timestamp
nonce
account
6. METHOD 使用大写 HTTP 方法;PATH 只取请求路径,例如 /api/open/v1/cards/status,不包含域名和 query。
7. canonical_query 为 query 参数规范化结果:排除 sign 字段,参数名升序;同名多值按值升序;key 和 value 使用 URL QueryEscape 编码后用 key=value 拼接,多个参数用 & 连接;无 query 时为空字符串。
8. body_sha256 为原始请求 body 字节的 SHA256 小写十六进制值;GET 或空 body 使用空字符串的 SHA256;POST JSON 请求必须用最终发送的 body 字符串计算,签名和请求发送的 body 必须完全一致。
9. X-Agent-Sign = hex(HMAC-SHA256(password, sign_payload)),password 为 X-Agent-Password 的原始值,结果使用小写十六进制。
Node.js 签名示例:
```javascript
const crypto = require("crypto");
function queryEscape(value) {
return new URLSearchParams({ v: String(value) }).toString().slice(2);
}
function canonicalQuery(params) {
return Object.entries(params || {})
.filter(([key]) => key.toLowerCase() !== "sign")
.flatMap(([key, value]) => {
const values = Array.isArray(value) ? value : [value];
return values.sort().map((item) => [key, item]);
})
.sort(([aKey, aValue], [bKey, bValue]) => {
if (aKey === bKey) return String(aValue).localeCompare(String(bValue));
return aKey.localeCompare(bKey);
})
.map(([key, value]) => queryEscape(key) + "=" + queryEscape(value))
.join("&");
}
function buildAgentSign({ method, path, query, body, timestamp, nonce, account, password }) {
const bodyText = body || "";
const bodyHash = crypto.createHash("sha256").update(bodyText).digest("hex");
const signPayload = [
method.toUpperCase(),
path,
canonicalQuery(query),
bodyHash,
timestamp,
nonce,
account,
].join("\n");
return crypto.createHmac("sha256", password).update(signPayload).digest("hex");
}
```
按 card_no 调用上游复机接口。调用前检查本地落库的 Gateway 卡状态扩展字段,仅当 gateway_extend 等于“机卡分离停机”时允许复机,否则返回“仅允许机卡分离状态下的卡复机”。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAgentOpenAPICardResumeRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAgentOpenAPICardResumeResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- AgentOpenAPIAccount: []
AgentOpenAPINonce: []
AgentOpenAPIPassword: []
AgentOpenAPISign: []
AgentOpenAPITimestamp: []
summary: 机卡分离卡复机
tags:
- 代理开放接口
/api/open/v1/cards/status:
get:
description: |-
认证方式:
1. 每个请求必须携带 Header:X-Agent-Account、X-Agent-Password、X-Agent-Timestamp、X-Agent-Nonce、X-Agent-Sign。
2. Header 字段说明:
- X-Agent-Account:代理账号标识,填写代理登录平台使用的用户名或手机号,例如 agent001;该值由平台开通代理账号时提供,必须与签名原文 account 行完全一致。
- X-Agent-Password:代理账号当前登录密码,由代理账号持有人提供;该值同时作为 HMAC-SHA256 签名密钥,密码变更后必须使用新密码签名。
- X-Agent-Timestamp:请求发起时间,由调用方生成,支持 Unix 秒、Unix 毫秒或 RFC3339 时间,例如 1715400000、1715400000000 或 2024-05-11T10:00:00+08:00;必须与签名原文 timestamp 行完全一致。
- X-Agent-Nonce:请求随机串,由调用方每次请求自行生成,例如 UUID、雪花 ID 或“时间戳+随机数”;不需要平台提前分配,同一账号在 5 分钟内不可重复。
- X-Agent-Sign:请求签名,由调用方按下方规则实时计算得到,不是平台分配的固定值;只要 method、path、query、body、timestamp、nonce、account 或 password 任意一个变化,签名都会变化。
3. X-Agent-Timestamp 超出允许时间窗口会认证失败;客户端服务器时间应保持同步。
4. X-Agent-Nonce 重复会被判定为重放请求。
5. 签名原文按 7 行拼接,行尾使用 \n,最后一行后不追加换行:
METHOD
PATH
canonical_query
body_sha256
timestamp
nonce
account
6. METHOD 使用大写 HTTP 方法;PATH 只取请求路径,例如 /api/open/v1/cards/status,不包含域名和 query。
7. canonical_query 为 query 参数规范化结果:排除 sign 字段,参数名升序;同名多值按值升序;key 和 value 使用 URL QueryEscape 编码后用 key=value 拼接,多个参数用 & 连接;无 query 时为空字符串。
8. body_sha256 为原始请求 body 字节的 SHA256 小写十六进制值;GET 或空 body 使用空字符串的 SHA256;POST JSON 请求必须用最终发送的 body 字符串计算,签名和请求发送的 body 必须完全一致。
9. X-Agent-Sign = hex(HMAC-SHA256(password, sign_payload)),password 为 X-Agent-Password 的原始值,结果使用小写十六进制。
Node.js 签名示例:
```javascript
const crypto = require("crypto");
function queryEscape(value) {
return new URLSearchParams({ v: String(value) }).toString().slice(2);
}
function canonicalQuery(params) {
return Object.entries(params || {})
.filter(([key]) => key.toLowerCase() !== "sign")
.flatMap(([key, value]) => {
const values = Array.isArray(value) ? value : [value];
return values.sort().map((item) => [key, item]);
})
.sort(([aKey, aValue], [bKey, bValue]) => {
if (aKey === bKey) return String(aValue).localeCompare(String(bValue));
return aKey.localeCompare(bKey);
})
.map(([key, value]) => queryEscape(key) + "=" + queryEscape(value))
.join("&");
}
function buildAgentSign({ method, path, query, body, timestamp, nonce, account, password }) {
const bodyText = body || "";
const bodyHash = crypto.createHash("sha256").update(bodyText).digest("hex");
const signPayload = [
method.toUpperCase(),
path,
canonicalQuery(query),
bodyHash,
timestamp,
nonce,
account,
].join("\n");
return crypto.createHmac("sha256", password).update(signPayload).digest("hex");
}
```
按 card_no 查询单卡状态,返回正常或停机以及停机原因。
parameters:
- description: 卡标识(支持 ICCID、虚拟号、MSISDN)
in: query
name: card_no
required: true
schema:
description: 卡标识(支持 ICCID、虚拟号、MSISDN)
maxLength: 100
minLength: 1
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAgentOpenAPICardStatusResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- AgentOpenAPIAccount: []
AgentOpenAPINonce: []
AgentOpenAPIPassword: []
AgentOpenAPISign: []
AgentOpenAPITimestamp: []
summary: 查询单卡状态
tags:
- 代理开放接口
/api/open/v1/cards/traffic:
get:
description: |-
认证方式:
1. 每个请求必须携带 Header:X-Agent-Account、X-Agent-Password、X-Agent-Timestamp、X-Agent-Nonce、X-Agent-Sign。
2. Header 字段说明:
- X-Agent-Account:代理账号标识,填写代理登录平台使用的用户名或手机号,例如 agent001;该值由平台开通代理账号时提供,必须与签名原文 account 行完全一致。
- X-Agent-Password:代理账号当前登录密码,由代理账号持有人提供;该值同时作为 HMAC-SHA256 签名密钥,密码变更后必须使用新密码签名。
- X-Agent-Timestamp:请求发起时间,由调用方生成,支持 Unix 秒、Unix 毫秒或 RFC3339 时间,例如 1715400000、1715400000000 或 2024-05-11T10:00:00+08:00;必须与签名原文 timestamp 行完全一致。
- X-Agent-Nonce:请求随机串,由调用方每次请求自行生成,例如 UUID、雪花 ID 或“时间戳+随机数”;不需要平台提前分配,同一账号在 5 分钟内不可重复。
- X-Agent-Sign:请求签名,由调用方按下方规则实时计算得到,不是平台分配的固定值;只要 method、path、query、body、timestamp、nonce、account 或 password 任意一个变化,签名都会变化。
3. X-Agent-Timestamp 超出允许时间窗口会认证失败;客户端服务器时间应保持同步。
4. X-Agent-Nonce 重复会被判定为重放请求。
5. 签名原文按 7 行拼接,行尾使用 \n,最后一行后不追加换行:
METHOD
PATH
canonical_query
body_sha256
timestamp
nonce
account
6. METHOD 使用大写 HTTP 方法;PATH 只取请求路径,例如 /api/open/v1/cards/status,不包含域名和 query。
7. canonical_query 为 query 参数规范化结果:排除 sign 字段,参数名升序;同名多值按值升序;key 和 value 使用 URL QueryEscape 编码后用 key=value 拼接,多个参数用 & 连接;无 query 时为空字符串。
8. body_sha256 为原始请求 body 字节的 SHA256 小写十六进制值;GET 或空 body 使用空字符串的 SHA256;POST JSON 请求必须用最终发送的 body 字符串计算,签名和请求发送的 body 必须完全一致。
9. X-Agent-Sign = hex(HMAC-SHA256(password, sign_payload)),password 为 X-Agent-Password 的原始值,结果使用小写十六进制。
Node.js 签名示例:
```javascript
const crypto = require("crypto");
function queryEscape(value) {
return new URLSearchParams({ v: String(value) }).toString().slice(2);
}
function canonicalQuery(params) {
return Object.entries(params || {})
.filter(([key]) => key.toLowerCase() !== "sign")
.flatMap(([key, value]) => {
const values = Array.isArray(value) ? value : [value];
return values.sort().map((item) => [key, item]);
})
.sort(([aKey, aValue], [bKey, bValue]) => {
if (aKey === bKey) return String(aValue).localeCompare(String(bValue));
return aKey.localeCompare(bKey);
})
.map(([key, value]) => queryEscape(key) + "=" + queryEscape(value))
.join("&");
}
function buildAgentSign({ method, path, query, body, timestamp, nonce, account, password }) {
const bodyText = body || "";
const bodyHash = crypto.createHash("sha256").update(bodyText).digest("hex");
const signPayload = [
method.toUpperCase(),
path,
canonicalQuery(query),
bodyHash,
timestamp,
nonce,
account,
].join("\n");
return crypto.createHmac("sha256", password).update(signPayload).digest("hex");
}
```
按 card_no 查询流量、当前套餐和待生效套餐。card_no 支持三种解析路径:1) ICCID/虚拟号/MSISDN 对应独立卡,查卡维度流量;2) 已绑定设备的卡,自动反查绑定设备,查设备维度流量(响应含 device_no);3) IMEI 或设备虚拟号,直接查设备维度流量(响应含 device_no)。
parameters:
- description: 卡标识(支持 ICCID、虚拟号、MSISDN)
in: query
name: card_no
required: true
schema:
description: 卡标识(支持 ICCID、虚拟号、MSISDN)
maxLength: 100
minLength: 1
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAgentOpenAPICardTrafficResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- AgentOpenAPIAccount: []
AgentOpenAPINonce: []
AgentOpenAPIPassword: []
AgentOpenAPISign: []
AgentOpenAPITimestamp: []
summary: 查询单卡或设备流量
tags:
- 代理开放接口
/api/open/v1/devices/reboot:
post:
description: |-
认证方式:
1. 每个请求必须携带 Header:X-Agent-Account、X-Agent-Password、X-Agent-Timestamp、X-Agent-Nonce、X-Agent-Sign。
2. Header 字段说明:
- X-Agent-Account:代理账号标识,填写代理登录平台使用的用户名或手机号,例如 agent001;该值由平台开通代理账号时提供,必须与签名原文 account 行完全一致。
- X-Agent-Password:代理账号当前登录密码,由代理账号持有人提供;该值同时作为 HMAC-SHA256 签名密钥,密码变更后必须使用新密码签名。
- X-Agent-Timestamp:请求发起时间,由调用方生成,支持 Unix 秒、Unix 毫秒或 RFC3339 时间,例如 1715400000、1715400000000 或 2024-05-11T10:00:00+08:00;必须与签名原文 timestamp 行完全一致。
- X-Agent-Nonce:请求随机串,由调用方每次请求自行生成,例如 UUID、雪花 ID 或“时间戳+随机数”;不需要平台提前分配,同一账号在 5 分钟内不可重复。
- X-Agent-Sign:请求签名,由调用方按下方规则实时计算得到,不是平台分配的固定值;只要 method、path、query、body、timestamp、nonce、account 或 password 任意一个变化,签名都会变化。
3. X-Agent-Timestamp 超出允许时间窗口会认证失败;客户端服务器时间应保持同步。
4. X-Agent-Nonce 重复会被判定为重放请求。
5. 签名原文按 7 行拼接,行尾使用 \n,最后一行后不追加换行:
METHOD
PATH
canonical_query
body_sha256
timestamp
nonce
account
6. METHOD 使用大写 HTTP 方法;PATH 只取请求路径,例如 /api/open/v1/cards/status,不包含域名和 query。
7. canonical_query 为 query 参数规范化结果:排除 sign 字段,参数名升序;同名多值按值升序;key 和 value 使用 URL QueryEscape 编码后用 key=value 拼接,多个参数用 & 连接;无 query 时为空字符串。
8. body_sha256 为原始请求 body 字节的 SHA256 小写十六进制值;GET 或空 body 使用空字符串的 SHA256;POST JSON 请求必须用最终发送的 body 字符串计算,签名和请求发送的 body 必须完全一致。
9. X-Agent-Sign = hex(HMAC-SHA256(password, sign_payload)),password 为 X-Agent-Password 的原始值,结果使用小写十六进制。
Node.js 签名示例:
```javascript
const crypto = require("crypto");
function queryEscape(value) {
return new URLSearchParams({ v: String(value) }).toString().slice(2);
}
function canonicalQuery(params) {
return Object.entries(params || {})
.filter(([key]) => key.toLowerCase() !== "sign")
.flatMap(([key, value]) => {
const values = Array.isArray(value) ? value : [value];
return values.sort().map((item) => [key, item]);
})
.sort(([aKey, aValue], [bKey, bValue]) => {
if (aKey === bKey) return String(aValue).localeCompare(String(bValue));
return aKey.localeCompare(bKey);
})
.map(([key, value]) => queryEscape(key) + "=" + queryEscape(value))
.join("&");
}
function buildAgentSign({ method, path, query, body, timestamp, nonce, account, password }) {
const bodyText = body || "";
const bodyHash = crypto.createHash("sha256").update(bodyText).digest("hex");
const signPayload = [
method.toUpperCase(),
path,
canonicalQuery(query),
bodyHash,
timestamp,
nonce,
account,
].join("\n");
return crypto.createHmac("sha256", password).update(signPayload).digest("hex");
}
```
按 device_no 远程重启设备。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAgentOpenAPIDeviceOperationRequest'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- AgentOpenAPIAccount: []
AgentOpenAPINonce: []
AgentOpenAPIPassword: []
AgentOpenAPISign: []
AgentOpenAPITimestamp: []
summary: 重启设备
tags:
- 代理开放接口
/api/open/v1/devices/reset:
post:
description: |-
认证方式:
1. 每个请求必须携带 Header:X-Agent-Account、X-Agent-Password、X-Agent-Timestamp、X-Agent-Nonce、X-Agent-Sign。
2. Header 字段说明:
- X-Agent-Account:代理账号标识,填写代理登录平台使用的用户名或手机号,例如 agent001;该值由平台开通代理账号时提供,必须与签名原文 account 行完全一致。
- X-Agent-Password:代理账号当前登录密码,由代理账号持有人提供;该值同时作为 HMAC-SHA256 签名密钥,密码变更后必须使用新密码签名。
- X-Agent-Timestamp:请求发起时间,由调用方生成,支持 Unix 秒、Unix 毫秒或 RFC3339 时间,例如 1715400000、1715400000000 或 2024-05-11T10:00:00+08:00;必须与签名原文 timestamp 行完全一致。
- X-Agent-Nonce:请求随机串,由调用方每次请求自行生成,例如 UUID、雪花 ID 或“时间戳+随机数”;不需要平台提前分配,同一账号在 5 分钟内不可重复。
- X-Agent-Sign:请求签名,由调用方按下方规则实时计算得到,不是平台分配的固定值;只要 method、path、query、body、timestamp、nonce、account 或 password 任意一个变化,签名都会变化。
3. X-Agent-Timestamp 超出允许时间窗口会认证失败;客户端服务器时间应保持同步。
4. X-Agent-Nonce 重复会被判定为重放请求。
5. 签名原文按 7 行拼接,行尾使用 \n,最后一行后不追加换行:
METHOD
PATH
canonical_query
body_sha256
timestamp
nonce
account
6. METHOD 使用大写 HTTP 方法;PATH 只取请求路径,例如 /api/open/v1/cards/status,不包含域名和 query。
7. canonical_query 为 query 参数规范化结果:排除 sign 字段,参数名升序;同名多值按值升序;key 和 value 使用 URL QueryEscape 编码后用 key=value 拼接,多个参数用 & 连接;无 query 时为空字符串。
8. body_sha256 为原始请求 body 字节的 SHA256 小写十六进制值;GET 或空 body 使用空字符串的 SHA256;POST JSON 请求必须用最终发送的 body 字符串计算,签名和请求发送的 body 必须完全一致。
9. X-Agent-Sign = hex(HMAC-SHA256(password, sign_payload)),password 为 X-Agent-Password 的原始值,结果使用小写十六进制。
Node.js 签名示例:
```javascript
const crypto = require("crypto");
function queryEscape(value) {
return new URLSearchParams({ v: String(value) }).toString().slice(2);
}
function canonicalQuery(params) {
return Object.entries(params || {})
.filter(([key]) => key.toLowerCase() !== "sign")
.flatMap(([key, value]) => {
const values = Array.isArray(value) ? value : [value];
return values.sort().map((item) => [key, item]);
})
.sort(([aKey, aValue], [bKey, bValue]) => {
if (aKey === bKey) return String(aValue).localeCompare(String(bValue));
return aKey.localeCompare(bKey);
})
.map(([key, value]) => queryEscape(key) + "=" + queryEscape(value))
.join("&");
}
function buildAgentSign({ method, path, query, body, timestamp, nonce, account, password }) {
const bodyText = body || "";
const bodyHash = crypto.createHash("sha256").update(bodyText).digest("hex");
const signPayload = [
method.toUpperCase(),
path,
canonicalQuery(query),
bodyHash,
timestamp,
nonce,
account,
].join("\n");
return crypto.createHmac("sha256", password).update(signPayload).digest("hex");
}
```
按 device_no 远程恢复设备出厂设置。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAgentOpenAPIDeviceOperationRequest'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- AgentOpenAPIAccount: []
AgentOpenAPINonce: []
AgentOpenAPIPassword: []
AgentOpenAPISign: []
AgentOpenAPITimestamp: []
summary: 恢复出厂设置
tags:
- 代理开放接口
/api/open/v1/devices/switch-card:
post:
description: |-
认证方式:
1. 每个请求必须携带 Header:X-Agent-Account、X-Agent-Password、X-Agent-Timestamp、X-Agent-Nonce、X-Agent-Sign。
2. Header 字段说明:
- X-Agent-Account:代理账号标识,填写代理登录平台使用的用户名或手机号,例如 agent001;该值由平台开通代理账号时提供,必须与签名原文 account 行完全一致。
- X-Agent-Password:代理账号当前登录密码,由代理账号持有人提供;该值同时作为 HMAC-SHA256 签名密钥,密码变更后必须使用新密码签名。
- X-Agent-Timestamp:请求发起时间,由调用方生成,支持 Unix 秒、Unix 毫秒或 RFC3339 时间,例如 1715400000、1715400000000 或 2024-05-11T10:00:00+08:00;必须与签名原文 timestamp 行完全一致。
- X-Agent-Nonce:请求随机串,由调用方每次请求自行生成,例如 UUID、雪花 ID 或“时间戳+随机数”;不需要平台提前分配,同一账号在 5 分钟内不可重复。
- X-Agent-Sign:请求签名,由调用方按下方规则实时计算得到,不是平台分配的固定值;只要 method、path、query、body、timestamp、nonce、account 或 password 任意一个变化,签名都会变化。
3. X-Agent-Timestamp 超出允许时间窗口会认证失败;客户端服务器时间应保持同步。
4. X-Agent-Nonce 重复会被判定为重放请求。
5. 签名原文按 7 行拼接,行尾使用 \n,最后一行后不追加换行:
METHOD
PATH
canonical_query
body_sha256
timestamp
nonce
account
6. METHOD 使用大写 HTTP 方法;PATH 只取请求路径,例如 /api/open/v1/cards/status,不包含域名和 query。
7. canonical_query 为 query 参数规范化结果:排除 sign 字段,参数名升序;同名多值按值升序;key 和 value 使用 URL QueryEscape 编码后用 key=value 拼接,多个参数用 & 连接;无 query 时为空字符串。
8. body_sha256 为原始请求 body 字节的 SHA256 小写十六进制值;GET 或空 body 使用空字符串的 SHA256;POST JSON 请求必须用最终发送的 body 字符串计算,签名和请求发送的 body 必须完全一致。
9. X-Agent-Sign = hex(HMAC-SHA256(password, sign_payload)),password 为 X-Agent-Password 的原始值,结果使用小写十六进制。
Node.js 签名示例:
```javascript
const crypto = require("crypto");
function queryEscape(value) {
return new URLSearchParams({ v: String(value) }).toString().slice(2);
}
function canonicalQuery(params) {
return Object.entries(params || {})
.filter(([key]) => key.toLowerCase() !== "sign")
.flatMap(([key, value]) => {
const values = Array.isArray(value) ? value : [value];
return values.sort().map((item) => [key, item]);
})
.sort(([aKey, aValue], [bKey, bValue]) => {
if (aKey === bKey) return String(aValue).localeCompare(String(bValue));
return aKey.localeCompare(bKey);
})
.map(([key, value]) => queryEscape(key) + "=" + queryEscape(value))
.join("&");
}
function buildAgentSign({ method, path, query, body, timestamp, nonce, account, password }) {
const bodyText = body || "";
const bodyHash = crypto.createHash("sha256").update(bodyText).digest("hex");
const signPayload = [
method.toUpperCase(),
path,
canonicalQuery(query),
bodyHash,
timestamp,
nonce,
account,
].join("\n");
return crypto.createHmac("sha256", password).update(signPayload).digest("hex");
}
```
按 device_no 将多卡设备切换到指定 ICCID 的卡。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAgentOpenAPIDeviceSwitchCardRequest'
responses:
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- AgentOpenAPIAccount: []
AgentOpenAPINonce: []
AgentOpenAPIPassword: []
AgentOpenAPISign: []
AgentOpenAPITimestamp: []
summary: 切网(多卡设备切换 ICCID)
tags:
- 代理开放接口
/api/open/v1/devices/traffic:
get:
description: |-
认证方式:
1. 每个请求必须携带 Header:X-Agent-Account、X-Agent-Password、X-Agent-Timestamp、X-Agent-Nonce、X-Agent-Sign。
2. Header 字段说明:
- X-Agent-Account:代理账号标识,填写代理登录平台使用的用户名或手机号,例如 agent001;该值由平台开通代理账号时提供,必须与签名原文 account 行完全一致。
- X-Agent-Password:代理账号当前登录密码,由代理账号持有人提供;该值同时作为 HMAC-SHA256 签名密钥,密码变更后必须使用新密码签名。
- X-Agent-Timestamp:请求发起时间,由调用方生成,支持 Unix 秒、Unix 毫秒或 RFC3339 时间,例如 1715400000、1715400000000 或 2024-05-11T10:00:00+08:00;必须与签名原文 timestamp 行完全一致。
- X-Agent-Nonce:请求随机串,由调用方每次请求自行生成,例如 UUID、雪花 ID 或“时间戳+随机数”;不需要平台提前分配,同一账号在 5 分钟内不可重复。
- X-Agent-Sign:请求签名,由调用方按下方规则实时计算得到,不是平台分配的固定值;只要 method、path、query、body、timestamp、nonce、account 或 password 任意一个变化,签名都会变化。
3. X-Agent-Timestamp 超出允许时间窗口会认证失败;客户端服务器时间应保持同步。
4. X-Agent-Nonce 重复会被判定为重放请求。
5. 签名原文按 7 行拼接,行尾使用 \n,最后一行后不追加换行:
METHOD
PATH
canonical_query
body_sha256
timestamp
nonce
account
6. METHOD 使用大写 HTTP 方法;PATH 只取请求路径,例如 /api/open/v1/cards/status,不包含域名和 query。
7. canonical_query 为 query 参数规范化结果:排除 sign 字段,参数名升序;同名多值按值升序;key 和 value 使用 URL QueryEscape 编码后用 key=value 拼接,多个参数用 & 连接;无 query 时为空字符串。
8. body_sha256 为原始请求 body 字节的 SHA256 小写十六进制值;GET 或空 body 使用空字符串的 SHA256;POST JSON 请求必须用最终发送的 body 字符串计算,签名和请求发送的 body 必须完全一致。
9. X-Agent-Sign = hex(HMAC-SHA256(password, sign_payload)),password 为 X-Agent-Password 的原始值,结果使用小写十六进制。
Node.js 签名示例:
```javascript
const crypto = require("crypto");
function queryEscape(value) {
return new URLSearchParams({ v: String(value) }).toString().slice(2);
}
function canonicalQuery(params) {
return Object.entries(params || {})
.filter(([key]) => key.toLowerCase() !== "sign")
.flatMap(([key, value]) => {
const values = Array.isArray(value) ? value : [value];
return values.sort().map((item) => [key, item]);
})
.sort(([aKey, aValue], [bKey, bValue]) => {
if (aKey === bKey) return String(aValue).localeCompare(String(bValue));
return aKey.localeCompare(bKey);
})
.map(([key, value]) => queryEscape(key) + "=" + queryEscape(value))
.join("&");
}
function buildAgentSign({ method, path, query, body, timestamp, nonce, account, password }) {
const bodyText = body || "";
const bodyHash = crypto.createHash("sha256").update(bodyText).digest("hex");
const signPayload = [
method.toUpperCase(),
path,
canonicalQuery(query),
bodyHash,
timestamp,
nonce,
account,
].join("\n");
return crypto.createHmac("sha256", password).update(signPayload).digest("hex");
}
```
按 device_no 查询设备套餐内流量、当前套餐和待生效套餐。device_no 支持虚拟号、IMEI。
parameters:
- description: 设备标识(支持虚拟号、IMEI)
in: query
name: device_no
required: true
schema:
description: 设备标识(支持虚拟号、IMEI)
maxLength: 100
minLength: 1
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAgentOpenAPIDeviceTrafficResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- AgentOpenAPIAccount: []
AgentOpenAPINonce: []
AgentOpenAPIPassword: []
AgentOpenAPISign: []
AgentOpenAPITimestamp: []
summary: 查询设备套餐内流量
tags:
- 代理开放接口
/api/open/v1/packages:
get:
description: |-
认证方式:
1. 每个请求必须携带 Header:X-Agent-Account、X-Agent-Password、X-Agent-Timestamp、X-Agent-Nonce、X-Agent-Sign。
2. Header 字段说明:
- X-Agent-Account:代理账号标识,填写代理登录平台使用的用户名或手机号,例如 agent001;该值由平台开通代理账号时提供,必须与签名原文 account 行完全一致。
- X-Agent-Password:代理账号当前登录密码,由代理账号持有人提供;该值同时作为 HMAC-SHA256 签名密钥,密码变更后必须使用新密码签名。
- X-Agent-Timestamp:请求发起时间,由调用方生成,支持 Unix 秒、Unix 毫秒或 RFC3339 时间,例如 1715400000、1715400000000 或 2024-05-11T10:00:00+08:00;必须与签名原文 timestamp 行完全一致。
- X-Agent-Nonce:请求随机串,由调用方每次请求自行生成,例如 UUID、雪花 ID 或“时间戳+随机数”;不需要平台提前分配,同一账号在 5 分钟内不可重复。
- X-Agent-Sign:请求签名,由调用方按下方规则实时计算得到,不是平台分配的固定值;只要 method、path、query、body、timestamp、nonce、account 或 password 任意一个变化,签名都会变化。
3. X-Agent-Timestamp 超出允许时间窗口会认证失败;客户端服务器时间应保持同步。
4. X-Agent-Nonce 重复会被判定为重放请求。
5. 签名原文按 7 行拼接,行尾使用 \n,最后一行后不追加换行:
METHOD
PATH
canonical_query
body_sha256
timestamp
nonce
account
6. METHOD 使用大写 HTTP 方法;PATH 只取请求路径,例如 /api/open/v1/cards/status,不包含域名和 query。
7. canonical_query 为 query 参数规范化结果:排除 sign 字段,参数名升序;同名多值按值升序;key 和 value 使用 URL QueryEscape 编码后用 key=value 拼接,多个参数用 & 连接;无 query 时为空字符串。
8. body_sha256 为原始请求 body 字节的 SHA256 小写十六进制值;GET 或空 body 使用空字符串的 SHA256;POST JSON 请求必须用最终发送的 body 字符串计算,签名和请求发送的 body 必须完全一致。
9. X-Agent-Sign = hex(HMAC-SHA256(password, sign_payload)),password 为 X-Agent-Password 的原始值,结果使用小写十六进制。
Node.js 签名示例:
```javascript
const crypto = require("crypto");
function queryEscape(value) {
return new URLSearchParams({ v: String(value) }).toString().slice(2);
}
function canonicalQuery(params) {
return Object.entries(params || {})
.filter(([key]) => key.toLowerCase() !== "sign")
.flatMap(([key, value]) => {
const values = Array.isArray(value) ? value : [value];
return values.sort().map((item) => [key, item]);
})
.sort(([aKey, aValue], [bKey, bValue]) => {
if (aKey === bKey) return String(aValue).localeCompare(String(bValue));
return aKey.localeCompare(bKey);
})
.map(([key, value]) => queryEscape(key) + "=" + queryEscape(value))
.join("&");
}
function buildAgentSign({ method, path, query, body, timestamp, nonce, account, password }) {
const bodyText = body || "";
const bodyHash = crypto.createHash("sha256").update(bodyText).digest("hex");
const signPayload = [
method.toUpperCase(),
path,
canonicalQuery(query),
bodyHash,
timestamp,
nonce,
account,
].join("\n");
return crypto.createHmac("sha256", password).update(signPayload).digest("hex");
}
```
分页查询当前账号可购买的套餐,返回套餐基础信息和价格。
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 套餐类型 (formal:正式套餐, addon:附加套餐)
in: query
name: package_type
schema:
description: 套餐类型 (formal:正式套餐, addon:附加套餐)
nullable: true
type: string
- description: 套餐系列ID
in: query
name: series_id
schema:
description: 套餐系列ID
minimum: 0
nullable: true
type: integer
- description: 套餐名称(模糊搜索)
in: query
name: package_name
schema:
description: 套餐名称(模糊搜索)
maxLength: 255
nullable: true
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAgentOpenAPIPackageItem'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- AgentOpenAPIAccount: []
AgentOpenAPINonce: []
AgentOpenAPIPassword: []
AgentOpenAPISign: []
AgentOpenAPITimestamp: []
summary: 查询套餐列表
tags:
- 代理开放接口
/api/open/v1/wallet/balance:
get:
description: |-
认证方式:
1. 每个请求必须携带 Header:X-Agent-Account、X-Agent-Password、X-Agent-Timestamp、X-Agent-Nonce、X-Agent-Sign。
2. Header 字段说明:
- X-Agent-Account:代理账号标识,填写代理登录平台使用的用户名或手机号,例如 agent001;该值由平台开通代理账号时提供,必须与签名原文 account 行完全一致。
- X-Agent-Password:代理账号当前登录密码,由代理账号持有人提供;该值同时作为 HMAC-SHA256 签名密钥,密码变更后必须使用新密码签名。
- X-Agent-Timestamp:请求发起时间,由调用方生成,支持 Unix 秒、Unix 毫秒或 RFC3339 时间,例如 1715400000、1715400000000 或 2024-05-11T10:00:00+08:00;必须与签名原文 timestamp 行完全一致。
- X-Agent-Nonce:请求随机串,由调用方每次请求自行生成,例如 UUID、雪花 ID 或“时间戳+随机数”;不需要平台提前分配,同一账号在 5 分钟内不可重复。
- X-Agent-Sign:请求签名,由调用方按下方规则实时计算得到,不是平台分配的固定值;只要 method、path、query、body、timestamp、nonce、account 或 password 任意一个变化,签名都会变化。
3. X-Agent-Timestamp 超出允许时间窗口会认证失败;客户端服务器时间应保持同步。
4. X-Agent-Nonce 重复会被判定为重放请求。
5. 签名原文按 7 行拼接,行尾使用 \n,最后一行后不追加换行:
METHOD
PATH
canonical_query
body_sha256
timestamp
nonce
account
6. METHOD 使用大写 HTTP 方法;PATH 只取请求路径,例如 /api/open/v1/cards/status,不包含域名和 query。
7. canonical_query 为 query 参数规范化结果:排除 sign 字段,参数名升序;同名多值按值升序;key 和 value 使用 URL QueryEscape 编码后用 key=value 拼接,多个参数用 & 连接;无 query 时为空字符串。
8. body_sha256 为原始请求 body 字节的 SHA256 小写十六进制值;GET 或空 body 使用空字符串的 SHA256;POST JSON 请求必须用最终发送的 body 字符串计算,签名和请求发送的 body 必须完全一致。
9. X-Agent-Sign = hex(HMAC-SHA256(password, sign_payload)),password 为 X-Agent-Password 的原始值,结果使用小写十六进制。
Node.js 签名示例:
```javascript
const crypto = require("crypto");
function queryEscape(value) {
return new URLSearchParams({ v: String(value) }).toString().slice(2);
}
function canonicalQuery(params) {
return Object.entries(params || {})
.filter(([key]) => key.toLowerCase() !== "sign")
.flatMap(([key, value]) => {
const values = Array.isArray(value) ? value : [value];
return values.sort().map((item) => [key, item]);
})
.sort(([aKey, aValue], [bKey, bValue]) => {
if (aKey === bKey) return String(aValue).localeCompare(String(bValue));
return aKey.localeCompare(bKey);
})
.map(([key, value]) => queryEscape(key) + "=" + queryEscape(value))
.join("&");
}
function buildAgentSign({ method, path, query, body, timestamp, nonce, account, password }) {
const bodyText = body || "";
const bodyHash = crypto.createHash("sha256").update(bodyText).digest("hex");
const signPayload = [
method.toUpperCase(),
path,
canonicalQuery(query),
bodyHash,
timestamp,
nonce,
account,
].join("\n");
return crypto.createHmac("sha256", password).update(signPayload).digest("hex");
}
```
查询当前账号预充值钱包余额。未开通钱包时返回 0。
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAgentOpenAPIWalletBalanceResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- AgentOpenAPIAccount: []
AgentOpenAPINonce: []
AgentOpenAPIPassword: []
AgentOpenAPISign: []
AgentOpenAPITimestamp: []
summary: 查询预充值钱包余额
tags:
- 代理开放接口
/api/open/v1/wallet/package-orders:
post:
description: |-
认证方式:
1. 每个请求必须携带 Header:X-Agent-Account、X-Agent-Password、X-Agent-Timestamp、X-Agent-Nonce、X-Agent-Sign。
2. Header 字段说明:
- X-Agent-Account:代理账号标识,填写代理登录平台使用的用户名或手机号,例如 agent001;该值由平台开通代理账号时提供,必须与签名原文 account 行完全一致。
- X-Agent-Password:代理账号当前登录密码,由代理账号持有人提供;该值同时作为 HMAC-SHA256 签名密钥,密码变更后必须使用新密码签名。
- X-Agent-Timestamp:请求发起时间,由调用方生成,支持 Unix 秒、Unix 毫秒或 RFC3339 时间,例如 1715400000、1715400000000 或 2024-05-11T10:00:00+08:00;必须与签名原文 timestamp 行完全一致。
- X-Agent-Nonce:请求随机串,由调用方每次请求自行生成,例如 UUID、雪花 ID 或“时间戳+随机数”;不需要平台提前分配,同一账号在 5 分钟内不可重复。
- X-Agent-Sign:请求签名,由调用方按下方规则实时计算得到,不是平台分配的固定值;只要 method、path、query、body、timestamp、nonce、account 或 password 任意一个变化,签名都会变化。
3. X-Agent-Timestamp 超出允许时间窗口会认证失败;客户端服务器时间应保持同步。
4. X-Agent-Nonce 重复会被判定为重放请求。
5. 签名原文按 7 行拼接,行尾使用 \n,最后一行后不追加换行:
METHOD
PATH
canonical_query
body_sha256
timestamp
nonce
account
6. METHOD 使用大写 HTTP 方法;PATH 只取请求路径,例如 /api/open/v1/cards/status,不包含域名和 query。
7. canonical_query 为 query 参数规范化结果:排除 sign 字段,参数名升序;同名多值按值升序;key 和 value 使用 URL QueryEscape 编码后用 key=value 拼接,多个参数用 & 连接;无 query 时为空字符串。
8. body_sha256 为原始请求 body 字节的 SHA256 小写十六进制值;GET 或空 body 使用空字符串的 SHA256;POST JSON 请求必须用最终发送的 body 字符串计算,签名和请求发送的 body 必须完全一致。
9. X-Agent-Sign = hex(HMAC-SHA256(password, sign_payload)),password 为 X-Agent-Password 的原始值,结果使用小写十六进制。
Node.js 签名示例:
```javascript
const crypto = require("crypto");
function queryEscape(value) {
return new URLSearchParams({ v: String(value) }).toString().slice(2);
}
function canonicalQuery(params) {
return Object.entries(params || {})
.filter(([key]) => key.toLowerCase() !== "sign")
.flatMap(([key, value]) => {
const values = Array.isArray(value) ? value : [value];
return values.sort().map((item) => [key, item]);
})
.sort(([aKey, aValue], [bKey, bValue]) => {
if (aKey === bKey) return String(aValue).localeCompare(String(bValue));
return aKey.localeCompare(bKey);
})
.map(([key, value]) => queryEscape(key) + "=" + queryEscape(value))
.join("&");
}
function buildAgentSign({ method, path, query, body, timestamp, nonce, account, password }) {
const bodyText = body || "";
const bodyHash = crypto.createHash("sha256").update(bodyText).digest("hex");
const signPayload = [
method.toUpperCase(),
path,
canonicalQuery(query),
bodyHash,
timestamp,
nonce,
account,
].join("\n");
return crypto.createHmac("sha256", password).update(signPayload).digest("hex");
}
```
使用预充值钱包为多张卡购买同一个套餐编码。每张卡独立下单,允许部分成功。
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DtoAgentOpenAPIWalletPackageOrderRequest'
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoAgentOpenAPIWalletPackageOrderResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- AgentOpenAPIAccount: []
AgentOpenAPINonce: []
AgentOpenAPIPassword: []
AgentOpenAPISign: []
AgentOpenAPITimestamp: []
summary: 钱包套餐购买
tags:
- 代理开放接口
/api/open/v1/wallet/transactions:
get:
description: |-
认证方式:
1. 每个请求必须携带 Header:X-Agent-Account、X-Agent-Password、X-Agent-Timestamp、X-Agent-Nonce、X-Agent-Sign。
2. Header 字段说明:
- X-Agent-Account:代理账号标识,填写代理登录平台使用的用户名或手机号,例如 agent001;该值由平台开通代理账号时提供,必须与签名原文 account 行完全一致。
- X-Agent-Password:代理账号当前登录密码,由代理账号持有人提供;该值同时作为 HMAC-SHA256 签名密钥,密码变更后必须使用新密码签名。
- X-Agent-Timestamp:请求发起时间,由调用方生成,支持 Unix 秒、Unix 毫秒或 RFC3339 时间,例如 1715400000、1715400000000 或 2024-05-11T10:00:00+08:00;必须与签名原文 timestamp 行完全一致。
- X-Agent-Nonce:请求随机串,由调用方每次请求自行生成,例如 UUID、雪花 ID 或“时间戳+随机数”;不需要平台提前分配,同一账号在 5 分钟内不可重复。
- X-Agent-Sign:请求签名,由调用方按下方规则实时计算得到,不是平台分配的固定值;只要 method、path、query、body、timestamp、nonce、account 或 password 任意一个变化,签名都会变化。
3. X-Agent-Timestamp 超出允许时间窗口会认证失败;客户端服务器时间应保持同步。
4. X-Agent-Nonce 重复会被判定为重放请求。
5. 签名原文按 7 行拼接,行尾使用 \n,最后一行后不追加换行:
METHOD
PATH
canonical_query
body_sha256
timestamp
nonce
account
6. METHOD 使用大写 HTTP 方法;PATH 只取请求路径,例如 /api/open/v1/cards/status,不包含域名和 query。
7. canonical_query 为 query 参数规范化结果:排除 sign 字段,参数名升序;同名多值按值升序;key 和 value 使用 URL QueryEscape 编码后用 key=value 拼接,多个参数用 & 连接;无 query 时为空字符串。
8. body_sha256 为原始请求 body 字节的 SHA256 小写十六进制值;GET 或空 body 使用空字符串的 SHA256;POST JSON 请求必须用最终发送的 body 字符串计算,签名和请求发送的 body 必须完全一致。
9. X-Agent-Sign = hex(HMAC-SHA256(password, sign_payload)),password 为 X-Agent-Password 的原始值,结果使用小写十六进制。
Node.js 签名示例:
```javascript
const crypto = require("crypto");
function queryEscape(value) {
return new URLSearchParams({ v: String(value) }).toString().slice(2);
}
function canonicalQuery(params) {
return Object.entries(params || {})
.filter(([key]) => key.toLowerCase() !== "sign")
.flatMap(([key, value]) => {
const values = Array.isArray(value) ? value : [value];
return values.sort().map((item) => [key, item]);
})
.sort(([aKey, aValue], [bKey, bValue]) => {
if (aKey === bKey) return String(aValue).localeCompare(String(bValue));
return aKey.localeCompare(bKey);
})
.map(([key, value]) => queryEscape(key) + "=" + queryEscape(value))
.join("&");
}
function buildAgentSign({ method, path, query, body, timestamp, nonce, account, password }) {
const bodyText = body || "";
const bodyHash = crypto.createHash("sha256").update(bodyText).digest("hex");
const signPayload = [
method.toUpperCase(),
path,
canonicalQuery(query),
bodyHash,
timestamp,
nonce,
account,
].join("\n");
return crypto.createHmac("sha256", password).update(signPayload).digest("hex");
}
```
分页查询当前账号预充值钱包流水。
parameters:
- description: 页码
in: query
name: page
schema:
description: 页码
minimum: 1
type: integer
- description: 每页数量
in: query
name: page_size
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- description: 交易类型过滤(recharge:充值入账, deduct:套餐扣款, refund:退款)
in: query
name: transaction_type
schema:
description: 交易类型过滤(recharge:充值入账, deduct:套餐扣款, refund:退款)
maxLength: 50
type: string
- description: 开始日期(YYYY-MM-DD)
in: query
name: start_date
schema:
description: 开始日期(YYYY-MM-DD)
type: string
- description: 结束日期(YYYY-MM-DD)
in: query
name: end_date
schema:
description: 结束日期(YYYY-MM-DD)
type: string
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoMainWalletTransactionItem'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- AgentOpenAPIAccount: []
AgentOpenAPINonce: []
AgentOpenAPIPassword: []
AgentOpenAPISign: []
AgentOpenAPITimestamp: []
summary: 查询预充值钱包流水
tags:
- 代理开放接口
/health:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/RoutesHealthResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
summary: 健康检查
tags:
- 系统
/ready:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/RoutesHealthResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
summary: 就绪检查
tags:
- 系统