From 8c0887e705bf5a2f0f45a850a5afc48c1f5dfbf8 Mon Sep 17 00:00:00 2001 From: liuxiaoqing Date: Wed, 20 Aug 2025 11:24:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(alibabacloud=5Fsample):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 完善了 time_out 为 'all' 时的查询条件 -增加了 verify_status 为 'all' 时的通用查询条件 - 优化了 SQL 查询语句的生成逻辑 --- alibabacloud_sample/dataservice.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/alibabacloud_sample/dataservice.py b/alibabacloud_sample/dataservice.py index 54911d8..ecc7a5e 100644 --- a/alibabacloud_sample/dataservice.py +++ b/alibabacloud_sample/dataservice.py @@ -203,8 +203,10 @@ class DataService: """ if time_out != 'all': sql += " date('now', '-"+time_out+" day') >= date(verify_time) and verify_status == 'success' " - else: + elif verify_status != 'all': sql += " verify_status = '" + verify_status+"'" + else: + sql += " 1 = 1 " if start_date is not None: sql += " and verify_time >= '" + start_date + "'" if end_date is not None: