发货方式优化及消息功能优化
This commit is contained in:
@@ -75,8 +75,14 @@ class MessageService
|
||||
$lines[] = $name . ':' . $values[$key];
|
||||
}
|
||||
}
|
||||
if (!empty($template['remark'])) {
|
||||
$lines[] = '备注:' . $template['remark'];
|
||||
// 各发送点已把 remark 作为最后一个 value 传入(对应 valueNames 末位的「备注」字段),
|
||||
// 此处仅在正文尚未包含 remark 时才追加,避免出现两行重复的「备注」
|
||||
$remark = $template['remark'] ?? '';
|
||||
if ($remark !== '') {
|
||||
$content = implode("\n", $lines);
|
||||
if (mb_strpos($content, $remark) === false) {
|
||||
$lines[] = '备注:' . $remark;
|
||||
}
|
||||
}
|
||||
$content = implode("\n", $lines);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user