修复设备WiFi上游请求参数
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m40s

This commit is contained in:
2026-04-27 15:19:23 +08:00
parent 66cec7515a
commit c3ae7fcfbc
10 changed files with 50 additions and 52 deletions

View File

@@ -116,7 +116,6 @@ func (s *Service) GatewaySetWiFi(ctx context.Context, identifier string, req *dt
nil,
map[string]any{
"identifier": identifier,
"card_no": req.CardNo,
"ssid": req.SSID,
"enabled": req.Enabled,
"password": req.Password,
@@ -129,11 +128,11 @@ func (s *Service) GatewaySetWiFi(ctx context.Context, identifier string, req *dt
return err
}
if err = s.gatewayClient.SetWiFi(ctx, &gateway.WiFiReq{
CardNo: req.CardNo,
DeviceID: imei,
SSID: req.SSID,
Password: req.Password,
Enabled: req.Enabled,
CardNo: imei,
Params: gateway.WiFiParams{
SSIDName: req.SSID,
SSIDPassword: req.Password,
},
}); err != nil {
s.logDeviceOperation(
ctx,
@@ -143,7 +142,7 @@ func (s *Service) GatewaySetWiFi(ctx context.Context, identifier string, req *dt
device,
map[string]any{"device": deviceSnapshot(device)},
map[string]any{
"card_no": req.CardNo,
"imei": imei,
"ssid": req.SSID,
"enabled": req.Enabled,
"password": req.Password,
@@ -164,7 +163,7 @@ func (s *Service) GatewaySetWiFi(ctx context.Context, identifier string, req *dt
device,
map[string]any{"device": deviceSnapshot(device)},
map[string]any{
"card_no": req.CardNo,
"imei": imei,
"ssid": req.SSID,
"enabled": req.Enabled,
"password": req.Password,