|
@@ -375,6 +375,7 @@ async def modify_institution_controller(
|
|
|
|
|
|
|
|
if institution_id and enterprise_id and (new_amount is not None or new_single_limit is not None):
|
|
if institution_id and enterprise_id and (new_amount is not None or new_single_limit is not None):
|
|
|
try:
|
|
try:
|
|
|
|
|
+ log.info(f"金额变更检测: grant_mode={grant_mode}, period_type={period_type}, new_amount={new_amount}, new_single_limit={new_single_limit}")
|
|
|
|
|
|
|
|
def _to_dict(obj):
|
|
def _to_dict(obj):
|
|
|
"""Alipay SDK 对象转 dict,已经是 dict 则直接返回"""
|
|
"""Alipay SDK 对象转 dict,已经是 dict 则直接返回"""
|
|
@@ -393,11 +394,13 @@ async def modify_institution_controller(
|
|
|
modify_standard_list = []
|
|
modify_standard_list = []
|
|
|
if detail_dict and detail_dict.get("standard_info_list"):
|
|
if detail_dict and detail_dict.get("standard_info_list"):
|
|
|
std_list = detail_dict["standard_info_list"]
|
|
std_list = detail_dict["standard_info_list"]
|
|
|
|
|
+ log.info(f"找到 standard_info_list, 数量={len(std_list) if isinstance(std_list, list) else 1}")
|
|
|
if not isinstance(std_list, list):
|
|
if not isinstance(std_list, list):
|
|
|
std_list = [std_list]
|
|
std_list = [std_list]
|
|
|
for std_obj in std_list:
|
|
for std_obj in std_list:
|
|
|
std = _to_dict(std_obj)
|
|
std = _to_dict(std_obj)
|
|
|
std_id = std.get("standard_id")
|
|
std_id = std.get("standard_id")
|
|
|
|
|
+ log.info(f"标准规则: std_id={std_id}, std={std}")
|
|
|
if not std_id:
|
|
if not std_id:
|
|
|
continue
|
|
continue
|
|
|
conditions = std.get("standard_condition_info_list") or []
|
|
conditions = std.get("standard_condition_info_list") or []
|
|
@@ -409,6 +412,7 @@ async def modify_institution_controller(
|
|
|
cond = _to_dict(cond_obj)
|
|
cond = _to_dict(cond_obj)
|
|
|
cond_factor = cond.get("rule_factor", "")
|
|
cond_factor = cond.get("rule_factor", "")
|
|
|
cond_id = cond.get("rule_id", "")
|
|
cond_id = cond.get("rule_id", "")
|
|
|
|
|
+ log.info(f"条件: rule_factor={cond_factor}, rule_id={cond_id}, cond={cond}")
|
|
|
|
|
|
|
|
# 周期限额变更
|
|
# 周期限额变更
|
|
|
if grant_mode == "period" and period_type:
|
|
if grant_mode == "period" and period_type:
|