feat: 新增设备切卡模式接口 SetSwitchMode
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m32s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m32s
This commit is contained in:
@@ -69,6 +69,14 @@ func (c *Client) RebootDevice(ctx context.Context, req *DeviceOperationReq) erro
|
||||
return err
|
||||
}
|
||||
|
||||
// SwitchMode 设置设备切卡模式
|
||||
// 切换设备卡槽的自动/手动模式,0=自动切卡,1=手动切卡
|
||||
// POST /device/SwitchMode
|
||||
func (c *Client) SwitchMode(ctx context.Context, req *SwitchModeReq) error {
|
||||
_, err := c.doRequest(ctx, "/device/SwitchMode", req)
|
||||
return err
|
||||
}
|
||||
|
||||
// SyncDeviceInfo 同步查询设备信息(直接返回,无需回调)
|
||||
// 与异步 /device/info 的区别:直接返回全量数据,无需 callbackUrl
|
||||
// POST /device/sync-info
|
||||
|
||||
@@ -159,6 +159,13 @@ type DeviceOperationReq struct {
|
||||
Extend string `json:"extend,omitempty" description:"扩展字段(广电国网特殊参数)"`
|
||||
}
|
||||
|
||||
// SwitchModeReq 是设置设备切卡模式的请求
|
||||
type SwitchModeReq struct {
|
||||
CardNo string `json:"cardNo" validate:"required" required:"true" description:"设备编号(IMEI)"`
|
||||
SwitchMode int `json:"switch_mode" description:"切卡模式(0:自动切卡, 1:手动切卡)"`
|
||||
CallbackURL string `json:"callbackUrl,omitempty" description:"异步回调通知地址"`
|
||||
}
|
||||
|
||||
// SlotInfo 是单个卡槽信息
|
||||
type SlotInfo struct {
|
||||
SlotNo int `json:"slotNo" description:"卡槽编号"`
|
||||
|
||||
Reference in New Issue
Block a user