ming #1

Merged
liufumingren merged 558 commits from ming into main 2026-11-18 16:13:25 +08:00
2 changed files with 30 additions and 0 deletions
Showing only changes of commit 11167434ac - Show all commits

View File

@ -46,6 +46,7 @@ module.exports = app => {
max_notice_webhook_count: DEFAULT_MAX_NOTICE_WEBHOOK_COUNT,
max_wave_quantity: DEFAULT_MAX_WAVE_QUANTITY,
min_group_order_fetch_quantity: 13,
auto_allocate_express_exclude_remarks: [],
default_express_code: 'STO',
default_platform_code: 'TB',
sender_name: '',
@ -240,6 +241,27 @@ module.exports = app => {
normalized.min_group_order_fetch_quantity = minGroupOrderFetchQuantity;
}
const rawExcludeRemarks = parsed.auto_allocate_express_exclude_remarks;
if (rawExcludeRemarks === undefined || rawExcludeRemarks === null || rawExcludeRemarks === '') {
normalized.auto_allocate_express_exclude_remarks = [];
} else {
if (!Array.isArray(rawExcludeRemarks)) {
throw new Error('subject_config.auto_allocate_express_exclude_remarks 必须是字符串数组');
}
normalized.auto_allocate_express_exclude_remarks = rawExcludeRemarks
.map((item, index) => {
if (item === undefined || item === null || item === '') {
return null;
}
const trimmed = String(item).trim();
if (trimmed === '') {
throw new Error(`subject_config.auto_allocate_express_exclude_remarks[${index}] 不能为空字符串`);
}
return trimmed;
})
.filter(Boolean);
}
normalized.default_express_code = normalizeSubjectConfigText(
parsed.default_express_code,
DEFAULT_SUBJECT_CONFIG.default_express_code

View File

@ -51,6 +51,14 @@ const WAREHOUSE_SETTING_FIELDS = Object.freeze([
required: false,
description: '是否启用订单创建后自动加入团购波次,默认 false(关闭)',
}),
Object.freeze({
key: 'auto_allocate_express_exclude_remarks',
name: '自动分配快递排除备注',
type: 'string_array',
default: [],
required: false,
description: '订单备注命中任一关键字时,跳过自动分配快递,默认 [](不排除任何订单)',
}),
Object.freeze({
key: 'default_express_code',
name: '默认快递编码',