fix: 订单列表兼容 leixing_id 与 ProductTypeID 商品类型筛选
This commit is contained in:
@@ -501,6 +501,19 @@ def pick_order_id(data):
|
||||
return str(data.get('OrderID') or data.get('dingdan_id') or '').strip()
|
||||
|
||||
|
||||
def pick_leixing_id(data):
|
||||
"""兼容前端 leixing_id 与 SDK 字段 ProductTypeID。"""
|
||||
val = data.get('leixing_id')
|
||||
if val is None or val == '':
|
||||
val = data.get('ProductTypeID')
|
||||
if val is None or val == '':
|
||||
return None
|
||||
try:
|
||||
return int(val)
|
||||
except (ValueError, TypeError):
|
||||
return None
|
||||
|
||||
|
||||
def pick_penalty_create_params(data):
|
||||
"""兼容罚单创建:SDK 字段名与旧版拼音字段名。"""
|
||||
penalized_id = str(data.get('PenalizedUserID') or data.get('beichufa_id') or '').strip()
|
||||
|
||||
Reference in New Issue
Block a user