卡不激活的问题

This commit is contained in:
2026-04-23 16:58:16 +08:00
parent a7f2c4480a
commit c250a47651
4 changed files with 82 additions and 22 deletions

View File

@@ -373,7 +373,7 @@ func (s *Service) updateCardNetworkStatus(ctx context.Context, enterpriseID, car
return errors.New(errors.CodeForbidden, "无权限操作此卡")
}
return s.db.WithContext(ctx).Model(&model.IotCard{}).
Where("id = ?", cardID).
Update("network_status", networkStatus).Error
return s.iotCardStore.UpdateFields(ctx, cardID, map[string]any{
"network_status": networkStatus,
})
}