新增
This commit is contained in:
@@ -11,11 +11,16 @@ return [
|
||||
'query_refund' => 'app\common\command\QueryRefund',
|
||||
// 同步企业微信对外收款
|
||||
'sync_wechat_work_bills' => 'app\common\command\SyncWechatWorkBills',
|
||||
'fill_order_creator_from_payee' => 'app\common\command\FillOrderCreatorFromPayee',
|
||||
// 挂号单状态自动更新(过号->4,超8小时->2)
|
||||
'update_appointment_status' => 'app\common\command\UpdateAppointmentStatus',
|
||||
// 诊单腾讯云 IM 聊天记录入库归档
|
||||
'sync_im_chat_archive' => 'app\common\command\SyncImChatArchive',
|
||||
// 药材库拼音首字母回填(name_pinyin_abbr)
|
||||
'sync_medicine_pinyin_abbr' => 'app\common\command\SyncMedicinePinyinAbbr',
|
||||
// 物流自动更新
|
||||
'express:auto-update' => 'app\\command\\ExpressAutoUpdate',
|
||||
// 同步现有订单快递单号
|
||||
'express:sync' => 'app\\command\\SyncTrackingNumbers',
|
||||
],
|
||||
];
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* 物流轨迹(顺丰 / 京东等)
|
||||
* 对接快递100「实时查询」: https://api.kuaidi100.com
|
||||
*
|
||||
* 规则:同时配置好 CUSTOMER、KEY 即自动走快递100(不必再设 ENABLE=true)。
|
||||
* 若需临时关闭(保留密钥):LOGISTICS_KUAIDI100_DISABLE = true
|
||||
*/
|
||||
$stripQuotes = static function (string $v): string {
|
||||
$v = trim($v);
|
||||
if (strlen($v) >= 2 && (($v[0] === '"' && $v[strlen($v) - 1] === '"') || ($v[0] === "'" && $v[strlen($v) - 1] === "'"))) {
|
||||
return substr($v, 1, -1);
|
||||
}
|
||||
|
||||
return $v;
|
||||
};
|
||||
|
||||
// .env 为 INI 格式:写在某个 [section](如 [trtc])下面的键会变成 trtc.xxx,读不到顶层 LOGISTICS_*
|
||||
$envKuaidi = static function (string $suffix, $default = '') use ($stripQuotes) {
|
||||
$top = 'LOGISTICS_KUAIDI100_' . $suffix;
|
||||
$v = env($top, null);
|
||||
if ($v !== null && $v !== '') {
|
||||
return $stripQuotes((string) $v);
|
||||
}
|
||||
$nested = env('trtc.' . $top, $default);
|
||||
|
||||
return $stripQuotes((string) $nested);
|
||||
};
|
||||
|
||||
$customer = $envKuaidi('CUSTOMER', '');
|
||||
$key = $envKuaidi('KEY', '');
|
||||
$hasCreds = $customer !== '' && $key !== '';
|
||||
$forceDisableRaw = env('LOGISTICS_KUAIDI100_DISABLE', null);
|
||||
if ($forceDisableRaw === null || $forceDisableRaw === '') {
|
||||
$forceDisableRaw = env('trtc.LOGISTICS_KUAIDI100_DISABLE', false);
|
||||
}
|
||||
$forceDisable = filter_var($forceDisableRaw, FILTER_VALIDATE_BOOLEAN);
|
||||
// 已填 CUSTOMER+KEY 即启用;需临时关闭时设 LOGISTICS_KUAIDI100_DISABLE=true(LOGISTICS_KUAIDI100_ENABLE 已废弃,可删)
|
||||
$kuaidiEnabled = ! $forceDisable && $hasCreds;
|
||||
|
||||
return [
|
||||
'kuaidi100' => [
|
||||
'enable' => $kuaidiEnabled,
|
||||
'customer' => $customer,
|
||||
'key' => $key,
|
||||
'query_url' => $envKuaidi('QUERY_URL', 'https://poll.kuaidi100.com/poll/query.do'),
|
||||
],
|
||||
];
|
||||
@@ -111,6 +111,12 @@ return [
|
||||
// 消费者处方单:以下角色 + root 可对「待审核」处方进行通过/驳回(驳回即作废处方)
|
||||
'prescription_audit_roles' => [0, 3,6],
|
||||
|
||||
// 处方业务订单 internal_cost 等财务字段:以下角色 ID + root 可见
|
||||
'prescription_order_finance_roles' => [0, 3],
|
||||
|
||||
// 业务订单「关联支付单」审核:以下角色 ID + root 可操作(可与财务角色一致)
|
||||
'prescription_order_payment_audit_roles' => [0, 3],
|
||||
|
||||
// 腾讯云实时音视频(TRTC)配置
|
||||
'trtc' => [
|
||||
'sdkAppId' => (int)env('trtc.sdk_app_id', 1600127710),
|
||||
|
||||
Reference in New Issue
Block a user