From f733d403b329d7bc42446559b6a3fa3a5e37b6df Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 30 Dec 2025 17:48:53 +0800 Subject: [PATCH] bugfix --- wwwroot/cron/index.ui | 6 ++++++ wwwroot/cron/switch_bizdate.dspy | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 wwwroot/cron/index.ui create mode 100644 wwwroot/cron/switch_bizdate.dspy diff --git a/wwwroot/cron/index.ui b/wwwroot/cron/index.ui new file mode 100644 index 0000000..ea97406 --- /dev/null +++ b/wwwroot/cron/index.ui @@ -0,0 +1,6 @@ +{ + "widgettype":"Text", + "options":{ + "text":"oops" + } +} diff --git a/wwwroot/cron/switch_bizdate.dspy b/wwwroot/cron/switch_bizdate.dspy new file mode 100644 index 0000000..b6cb4eb --- /dev/null +++ b/wwwroot/cron/switch_bizdate.dspy @@ -0,0 +1,7 @@ +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})