From fe2041bcf575ba8a858e4b1098c9b5dd3ec2636b Mon Sep 17 00:00:00 2001 From: Break Date: Fri, 5 Jun 2026 14:20:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E5=8D=A1=E5=88=86=E7=A6=BB=E5=A4=8D?= =?UTF-8?q?=E6=9C=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/service/iot_card/stop_resume_service.go | 8 +++++--- pkg/constants/iot.go | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/service/iot_card/stop_resume_service.go b/internal/service/iot_card/stop_resume_service.go index 4e7f7e1..a0b9f3d 100644 --- a/internal/service/iot_card/stop_resume_service.go +++ b/internal/service/iot_card/stop_resume_service.go @@ -659,9 +659,11 @@ func (s *StopResumeService) resumeCardWithRetry(ctx context.Context, card *model time.Sleep(s.retryInterval) } - err := s.gatewayClient.StartCard(ctx, &gateway.CardOperationReq{ - CardNo: card.ICCID, - }) + req := &gateway.CardOperationReq{CardNo: card.ICCID} + if strings.TrimSpace(card.GatewayExtend) == constants.GatewayCardExtendMachineSeparated { + req.Extend = constants.GatewayCardStartExtendMachineSeparated + } + err := s.gatewayClient.StartCard(ctx, req) if err == nil { s.logger.Info("网关复机成功", zap.Uint("card_id", card.ID), diff --git a/pkg/constants/iot.go b/pkg/constants/iot.go index b24c2bf..0671fab 100644 --- a/pkg/constants/iot.go +++ b/pkg/constants/iot.go @@ -62,6 +62,7 @@ const ( GatewayCardStatusStopped = "停机" // 网关卡状态:停机 GatewayCardExtendPendingActivation = "待激活" // 网关扩展状态:待激活 GatewayCardExtendMachineSeparated = "机卡分离停机" // 网关扩展状态:机卡分离停机 + GatewayCardStartExtendMachineSeparated = "2" // 机卡分离复机时上传给运营商的 extend 值 ) // IoT 卡停机原因