From d60bdb14a228cab73133a88ad88fbef1daef01d5 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 14 Apr 2026 14:48:45 +0800 Subject: [PATCH] bugfix --- wwwroot/cron/switch_bizdate.dspy | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/wwwroot/cron/switch_bizdate.dspy b/wwwroot/cron/switch_bizdate.dspy index 2dd4010..8614985 100644 --- a/wwwroot/cron/switch_bizdate.dspy +++ b/wwwroot/cron/switch_bizdate.dspy @@ -1,8 +1,14 @@ ip = request['client_ip'] if ip not in ['127.0.0.1']: return ip + async with get_sor_context(request._run_ns, 'appbase') as sor: - curdate = curDateString() - sql = """update params set params_value = ${curdate}$ where params_name='business_date'""" - await sor.sqlExe(sql, {'curdate': curdate}) - return 'OK' + try: + curdate = curDateString() + sql = """update params set params_value = ${curdate}$ where params_name='business_date'""" + await sor.sqlExe(sql, {'curdate': curdate}) + return 'OK' + except Exception as e: + exception(f'{e}') + raise e +