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})