feat: 新增设备切卡模式接口 SetSwitchMode
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m32s

This commit is contained in:
2026-04-18 16:22:30 +08:00
parent 2b3a9cb33f
commit fd795d8742
7 changed files with 146 additions and 0 deletions

View File

@@ -871,6 +871,10 @@ components:
description: 套餐使用记录ID
minimum: 0
type: integer
paid_amount:
description: 购买实付金额(分),线下支付或无订单分配时为空
nullable: true
type: integer
priority:
description: 优先级
type: integer
@@ -6295,6 +6299,14 @@ components:
required:
- speed_limit
type: object
DtoSetSwitchModeRequest:
properties:
switch_mode:
description: 切卡模式 (0:自动切卡, 1:手动切卡)
type: integer
required:
- switch_mode
type: object
DtoSetWiFiRequest:
properties:
card_no:
@@ -12700,6 +12712,78 @@ paths:
summary: 切卡
tags:
- 设备管理
/api/admin/devices/by-identifier/{identifier}/switch-mode:
post:
description: 通过虚拟号/IMEI/SN 设置设备切卡模式0:自动切卡, 1:手动切卡)。设备必须已配置 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/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。