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:
@@ -103,3 +103,15 @@ func (s *Service) GatewayResetDevice(ctx context.Context, identifier string) err
|
||||
DeviceID: imei,
|
||||
})
|
||||
}
|
||||
|
||||
// GatewaySwitchMode 通过标识符设置设备切卡模式
|
||||
func (s *Service) GatewaySwitchMode(ctx context.Context, identifier string, req *dto.SetSwitchModeRequest) error {
|
||||
imei, err := s.getDeviceIMEI(ctx, identifier)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return s.gatewayClient.SwitchMode(ctx, &gateway.SwitchModeReq{
|
||||
CardNo: imei,
|
||||
SwitchMode: req.SwitchMode,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user