fix(risk): restore upload-time rule center review

This commit is contained in:
caoxiaozhu
2026-06-15 20:20:55 +08:00
parent 8b952c9a26
commit 5747e85acf
2 changed files with 159 additions and 0 deletions

View File

@@ -941,6 +941,8 @@ class RiskRuleTemplateExecutor:
time_keys = (
"application_time",
"applicationTime",
"application_business_time",
"applicationBusinessTime",
"application_date",
"applicationDate",
"business_time",
@@ -975,6 +977,15 @@ class RiskRuleTemplateExecutor:
if isinstance(nested, dict):
sources.append(nested)
for source_dict in sources:
business_time_context = source_dict.get("business_time_context")
if isinstance(business_time_context, dict):
start_date = str(business_time_context.get("start_date") or "").strip()
end_date = str(business_time_context.get("end_date") or start_date).strip()
display_value = str(business_time_context.get("display_value") or "").strip()
if display_value:
values.append(display_value)
elif start_date:
values.append(f"{start_date}{end_date or start_date}")
for key in time_keys:
value = source_dict.get(key)
if value not in (None, ""):