fix: 批量退款处理人ID默认138377,限制chuliid最长11位

batch_20260710 超长导致762单全部失败;与客服手机号字段一致。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-10 23:21:23 +08:00
parent 73f0ce36f2
commit 6689b7af00
2 changed files with 23 additions and 4 deletions

View File

@@ -24,6 +24,7 @@ from orders.models import Order, RefundRecord
from orders.services.merchant_refund_approve import (
MerchantRefundApproveError,
approve_merchant_refund_order,
normalize_processor_id,
)
from users.models import UserShangjia
@@ -49,8 +50,8 @@ class Command(BaseCommand):
help='仅处理商家昵称包含该关键字(可选,如 星阙)',
)
parser.add_argument(
'--processor', default='batch_script',
help='写入 RefundRecord.ProcessorID / Order.AssignedCS',
'--processor', default='138377',
help='写入 RefundRecord.ProcessorIDchuliid最长11位',
)
parser.add_argument(
'--tuikuan-liyou', default='批量同意退款',
@@ -74,7 +75,7 @@ class Command(BaseCommand):
min_count = int(options['min_count'] or 0)
merchant_id = (options['merchant_id'] or '').strip()
merchant_nicheng = (options['merchant_nicheng'] or '').strip()
processor = (options['processor'] or 'batch_script').strip()
processor = normalize_processor_id((options['processor'] or '').strip())
tuikuan_liyou = (options['tuikuan_liyou'] or '').strip()
do_execute = bool(options['execute'])
force = bool(options['force'])