From bae939f2cacbb31431acb88a50f5bc92eaaa9356 Mon Sep 17 00:00:00 2001 From: yinzijian Date: Thu, 30 Oct 2025 18:21:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=95=B0=E9=87=8F=E8=AE=A1?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yinzijian --- proto/phase_grpc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/proto/phase_grpc.py b/proto/phase_grpc.py index 0945028..3dadef8 100644 --- a/proto/phase_grpc.py +++ b/proto/phase_grpc.py @@ -150,7 +150,11 @@ def QueryCrossPhaseDiagnosis(citycode: int, crossid: str, date_list: List, tp: s response = stub.CrossPhaseDiagnosis(request_params, timeout=30) if response.code != 0: raise Exception(response.msg) - return MessageToDict(response.data), None + + data = MessageToDict(response.data) + if len(data) > 0: + data['total'] = len(data['values']) + return data, None except Exception as e: return None, e finally: