fix(alibabacloud_sample): 修复数据查询逻辑

- 完善了 time_out 为 'all' 时的查询条件
-增加了 verify_status 为 'all' 时的通用查询条件
- 优化了 SQL 查询语句的生成逻辑
This commit is contained in:
liuxiaoqing 2025-08-20 11:24:02 +08:00
parent e133b6b99a
commit 8c0887e705

View File

@ -203,8 +203,10 @@ class DataService:
""" """
if time_out != 'all': if time_out != 'all':
sql += " date('now', '-"+time_out+" day') >= date(verify_time) and verify_status == 'success' " sql += " date('now', '-"+time_out+" day') >= date(verify_time) and verify_status == 'success' "
else: elif verify_status != 'all':
sql += " verify_status = '" + verify_status+"'" sql += " verify_status = '" + verify_status+"'"
else:
sql += " 1 = 1 "
if start_date is not None: if start_date is not None:
sql += " and verify_time >= '" + start_date + "'" sql += " and verify_time >= '" + start_date + "'"
if end_date is not None: if end_date is not None: